/* ============================================
   AI Visibility Playbook - Design System
   Domain: llmvisibilityguide.com
   Accent: Emerald Green (#059669)
   ============================================ */

/* RESET & VARIABLES */
*{margin:0;padding:0;box-sizing:border-box}
:root{
  --ink:#111827;
  --body:#374151;
  --muted:#6b7280;
  --accent:#059669;
  --accent-dark:#047857;
  --accent-light:#d1fae5;
  --accent-lighter:#ecfdf5;
  --bg:#f9fafb;
  --white:#fff;
  --border:#e5e7eb;
  --border-light:#f3f4f6;
  --radius:8px;
  --radius-lg:12px;
  --max:760px;
  --max-wide:1080px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.05);
  --shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06);
  --shadow-md:0 4px 6px rgba(0,0,0,.07),0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:0 10px 15px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);
  --transition:0.2s ease;
}

/* BASE */
body{
  font-family:'Georgia','Cambria','Times New Roman',serif;
  color:var(--body);
  background:var(--bg);
  line-height:1.8;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4,h5,h6{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  color:var(--ink);
  line-height:1.3;
  letter-spacing:-0.01em;
}
a{
  color:var(--accent);
  text-decoration:underline;
  text-decoration-color:rgba(5,150,105,.3);
  text-underline-offset:2px;
  transition:text-decoration-color var(--transition),color var(--transition);
}
a:hover{
  text-decoration-color:var(--accent);
  color:var(--accent-dark);
}
img{max-width:100%;height:auto}
hr{border:none;border-top:1px solid var(--border);margin:48px 0}

/* ============================================
   NAVIGATION
   ============================================ */
nav{
  background:var(--white);
  border-bottom:1px solid var(--border);
  padding:0 24px;
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:var(--shadow-sm);
}
nav .inner{
  max-width:var(--max-wide);
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:60px;
}
.site-name{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-weight:700;
  font-size:1rem;
  color:var(--ink);
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:8px;
}
.site-name:hover{color:var(--accent)}
.site-name svg{flex-shrink:0}
nav .links{
  display:flex;
  gap:6px;
  align-items:center;
}
nav .links a{
  color:var(--muted);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.85rem;
  text-decoration:none;
  padding:6px 12px;
  border-radius:6px;
  transition:background var(--transition),color var(--transition);
}
nav .links a:hover{
  color:var(--ink);
  background:var(--border-light);
}
nav .links a.active{
  color:var(--accent);
  background:var(--accent-lighter);
  font-weight:600;
}

/* Mobile hamburger (CSS-only) */
.nav-toggle{display:none}
.nav-toggle-label{display:none;cursor:pointer;padding:8px}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after{
  display:block;
  background:var(--ink);
  height:2px;
  width:22px;
  border-radius:2px;
  position:relative;
  transition:all .3s;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after{
  content:'';
  position:absolute;
}
.nav-toggle-label span::before{top:-7px}
.nav-toggle-label span::after{top:7px}

/* ============================================
   HERO SECTION
   ============================================ */
.hero{
  background:linear-gradient(135deg,var(--ink) 0%,#1e3a2f 50%,var(--accent-dark) 100%);
  color:var(--white);
  padding:80px 24px;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:'';
  position:absolute;
  top:-50%;right:-20%;
  width:600px;height:600px;
  background:radial-gradient(circle,rgba(5,150,105,.15) 0%,transparent 70%);
  border-radius:50%;
}
.hero::after{
  content:'';
  position:absolute;
  bottom:-30%;left:-10%;
  width:400px;height:400px;
  background:radial-gradient(circle,rgba(5,150,105,.1) 0%,transparent 70%);
  border-radius:50%;
}
.hero .inner{
  max-width:var(--max);
  margin:0 auto;
  position:relative;
  z-index:1;
}
.hero h1{
  color:var(--white);
  font-size:clamp(2.2rem,5vw,3.2rem);
  margin-bottom:20px;
  line-height:1.15;
}
.hero .subtitle{
  font-size:1.2rem;
  color:rgba(255,255,255,.8);
  max-width:600px;
  margin-bottom:32px;
  line-height:1.7;
}
.hero .cta-group{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.9rem;
  font-weight:600;
  padding:12px 24px;
  border-radius:var(--radius);
  text-decoration:none;
  transition:all var(--transition);
  cursor:pointer;
  border:none;
}
.btn-primary{
  background:var(--accent);
  color:var(--white);
}
.btn-primary:hover{
  background:var(--accent-dark);
  color:var(--white);
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
}
.btn-secondary{
  background:rgba(255,255,255,.12);
  color:var(--white);
  border:1px solid rgba(255,255,255,.25);
}
.btn-secondary:hover{
  background:rgba(255,255,255,.2);
  color:var(--white);
}

/* ============================================
   CONTENT / PAGE
   ============================================ */
.page{
  max-width:var(--max);
  margin:0 auto;
  padding:60px 24px 80px;
}
.page h1{
  font-size:clamp(2rem,4.5vw,2.8rem);
  margin-bottom:16px;
}
.page .subtitle{
  font-size:1.15rem;
  color:var(--muted);
  margin-bottom:48px;
  max-width:600px;
}
.page h2{
  font-size:1.6rem;
  margin:56px 0 16px;
  padding-top:24px;
  border-top:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:10px;
}
.page h2 .icon{
  flex-shrink:0;
  color:var(--accent);
}
.page h3{
  font-size:1.2rem;
  margin:36px 0 12px;
}
.page p{margin-bottom:20px}
.page ul,.page ol{margin:0 0 24px 20px}
.page li{margin-bottom:10px}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.84rem;
  color:var(--muted);
  margin-bottom:32px;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.breadcrumb a{
  color:var(--accent);
  text-decoration:none;
  transition:color var(--transition);
}
.breadcrumb a:hover{
  text-decoration:underline;
  color:var(--accent-dark);
}
.breadcrumb .sep{
  color:var(--border);
  font-size:.75rem;
  user-select:none;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:24px 28px;
  margin-bottom:48px;
  box-shadow:var(--shadow-sm);
}
.toc h4{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:14px;
  display:flex;
  align-items:center;
  gap:6px;
}
.toc ol{margin:0;padding-left:18px}
.toc li{margin-bottom:6px;font-size:.9rem}
.toc a{
  color:var(--ink);
  text-decoration:none;
  transition:color var(--transition);
}
.toc a:hover{color:var(--accent)}

/* ============================================
   GUIDES GRID
   ============================================ */
.guides-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin:48px 0;
}
.guide-card{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px;
  transition:box-shadow var(--transition),transform var(--transition);
  position:relative;
}
.guide-card:hover{
  box-shadow:var(--shadow-md);
  transform:translateY(-2px);
}
.guide-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:var(--accent);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  opacity:0;
  transition:opacity var(--transition);
}
.guide-card:hover::before{opacity:1}
.guide-card h3{
  margin-top:0;
  margin-bottom:12px;
  font-size:1.1rem;
}
.guide-card p{
  font-size:.95rem;
  margin-bottom:16px;
  color:var(--body);
}
.guide-card a{display:inline-block;margin-top:8px}
.guide-card .tag{
  display:inline-block;
  background:var(--accent-lighter);
  color:var(--accent-dark);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.7rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:3px 8px;
  border-radius:4px;
  margin-bottom:12px;
}

/* ============================================
   CALLOUT / ALERT BOXES
   ============================================ */
.callout{
  background:var(--accent-light);
  border-left:4px solid var(--accent);
  padding:20px 24px;
  border-radius:0 var(--radius) var(--radius) 0;
  margin:32px 0;
  font-size:.95rem;
}
.callout strong{color:var(--ink)}
.callout.callout-neutral{
  background:var(--border-light);
  border-left-color:var(--muted);
}

/* ============================================
   BLOCKQUOTE
   ============================================ */
blockquote{
  border-left:3px solid var(--accent);
  padding:12px 20px;
  margin:28px 0;
  color:var(--muted);
  font-style:italic;
  background:var(--accent-lighter);
  border-radius:0 var(--radius) var(--radius) 0;
}

/* ============================================
   TABLES
   ============================================ */
table{
  width:100%;
  border-collapse:collapse;
  margin:24px 0;
  font-size:.9rem;
  background:var(--white);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}
th,td{
  padding:12px 16px;
  text-align:left;
  border-bottom:1px solid var(--border);
}
th{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-weight:600;
  background:var(--border-light);
  color:var(--ink);
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.03em;
}
tr:last-child td{border-bottom:none}
tr:hover td{background:var(--accent-lighter)}

/* ============================================
   CODE BLOCK
   ============================================ */
.code-block{
  background:var(--ink);
  color:#e5e7eb;
  border-radius:var(--radius);
  padding:20px;
  margin:24px 0;
  overflow-x:auto;
  font-family:'Monaco','Menlo','Consolas',monospace;
  font-size:.85rem;
  line-height:1.6;
  box-shadow:var(--shadow);
}
code{
  font-family:'Monaco','Menlo','Consolas',monospace;
  font-size:.88em;
  background:var(--border-light);
  padding:2px 6px;
  border-radius:3px;
  color:var(--accent-dark);
}
.code-block code{
  background:none;
  padding:0;
  color:inherit;
}

/* ============================================
   CASE STUDY CARDS
   ============================================ */
.case-study{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:32px;
  margin:32px 0;
  box-shadow:var(--shadow-sm);
}
.case-study h3{margin-top:0}
.metrics{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin:24px 0;
}
.metric{
  background:var(--accent-light);
  padding:20px;
  border-radius:var(--radius);
  text-align:center;
}
.metric-label{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  display:block;
  margin-bottom:6px;
}
.metric-value{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:1.5rem;
  font-weight:700;
  color:var(--accent-dark);
}

/* ============================================
   TOOL CARDS
   ============================================ */
.tool-card{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px;
  margin:24px 0;
  transition:box-shadow var(--transition);
}
.tool-card:hover{box-shadow:var(--shadow-md)}
.tool-card h3{margin-top:0;margin-bottom:8px}
.tool-badge{
  display:inline-block;
  background:var(--accent);
  color:var(--white);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  padding:4px 10px;
  border-radius:4px;
  margin-bottom:12px;
}
.tool-card .description{
  color:var(--body);
  margin-bottom:12px;
  font-size:.95rem;
}
.tool-card .best-for{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:.9rem;
  color:var(--muted);
  margin:12px 0;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section{
  margin:48px 0;
}
.faq-section h2{
  margin-bottom:24px;
}
.faq-item{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius);
  margin-bottom:12px;
  overflow:hidden;
}
.faq-item summary{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-weight:600;
  font-size:1rem;
  color:var(--ink);
  padding:18px 24px;
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition:background var(--transition);
}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{
  content:'+';
  font-size:1.3rem;
  font-weight:300;
  color:var(--accent);
  flex-shrink:0;
  margin-left:16px;
  transition:transform var(--transition);
}
.faq-item[open] summary::after{
  content:'-';
}
.faq-item summary:hover{background:var(--accent-lighter)}
.faq-item .faq-answer{
  padding:0 24px 20px;
  font-size:.95rem;
  line-height:1.8;
}

/* ============================================
   GLOSSARY
   ============================================ */
.glossary-grid{
  display:grid;
  gap:16px;
  margin:32px 0;
}
.glossary-term{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px 24px;
  transition:box-shadow var(--transition);
}
.glossary-term:hover{box-shadow:var(--shadow)}
.glossary-term dt{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-weight:700;
  font-size:1.05rem;
  color:var(--ink);
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:8px;
}
.glossary-term dd{
  font-size:.95rem;
  color:var(--body);
  line-height:1.7;
}
.glossary-letter{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:1.4rem;
  font-weight:800;
  color:var(--accent);
  margin:36px 0 12px;
  padding-bottom:8px;
  border-bottom:2px solid var(--accent-light);
}

/* ============================================
   FOOTER
   ============================================ */
footer{
  background:var(--ink);
  color:#9ca3af;
  padding:60px 24px 40px;
  font-size:.85rem;
}
footer .footer-inner{
  max-width:var(--max-wide);
  margin:0 auto;
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:48px;
  margin-bottom:48px;
}
footer h4{
  color:var(--white);
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:16px;
}
footer p{
  line-height:1.7;
  margin-bottom:8px;
}
footer a{
  color:#d1d5db;
  text-decoration:none;
  transition:color var(--transition);
}
footer a:hover{color:var(--white)}
footer .footer-links{
  list-style:none;
  padding:0;
  margin:0;
}
footer .footer-links li{margin-bottom:8px}
footer .footer-links a{font-size:.85rem}
footer .footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);
  padding-top:24px;
  text-align:center;
  font-size:.8rem;
  color:#6b7280;
}
footer .footer-bottom a{color:#9ca3af}

/* Trust badge in footer */
.trust-signals{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:12px;
  flex-wrap:wrap;
}
.trust-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:.75rem;
  color:#9ca3af;
  background:rgba(255,255,255,.05);
  padding:4px 10px;
  border-radius:4px;
}

/* ============================================
   404 PAGE
   ============================================ */
.page-404{
  text-align:center;
  padding:100px 24px;
  max-width:560px;
  margin:0 auto;
}
.page-404 .error-code{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:6rem;
  font-weight:800;
  color:var(--accent);
  line-height:1;
  margin-bottom:16px;
  opacity:.7;
}
.page-404 h1{
  font-size:1.8rem;
  margin-bottom:16px;
}
.page-404 p{
  color:var(--muted);
  margin-bottom:24px;
}
.page-404 .links-404{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:32px;
}

/* ============================================
   DECORATIVE SVG ICONS
   ============================================ */
.section-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  background:var(--accent-light);
  border-radius:8px;
  color:var(--accent);
  flex-shrink:0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media(max-width:768px){
  .guides-grid{grid-template-columns:1fr}
  .metrics{grid-template-columns:1fr}
  footer .footer-inner{grid-template-columns:1fr;gap:32px}
  .hero{padding:56px 24px}
  .hero h1{font-size:clamp(1.8rem,5vw,2.6rem)}
}

@media(max-width:640px){
  .page{padding:36px 16px 48px}

  /* Mobile nav */
  .nav-toggle-label{display:flex;align-items:center}
  nav .links{
    display:none;
    position:absolute;
    top:60px;
    left:0;right:0;
    background:var(--white);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    padding:12px 0;
    box-shadow:var(--shadow-md);
  }
  nav .links a{
    padding:12px 24px;
    border-radius:0;
  }
  .nav-toggle:checked ~ .links{display:flex}
  .nav-toggle:checked + .nav-toggle-label span{background:transparent}
  .nav-toggle:checked + .nav-toggle-label span::before{top:0;transform:rotate(45deg)}
  .nav-toggle:checked + .nav-toggle-label span::after{top:0;transform:rotate(-45deg)}

  .case-study{padding:20px}
  .hero .cta-group{flex-direction:column}
  .hero .cta-group .btn{text-align:center;justify-content:center}
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print{
  nav,footer,.hero::before,.hero::after{display:none}
  body{background:white;color:black}
  .page{padding:20px 0;max-width:100%}
  a{color:black;text-decoration:underline}
  .callout{border:1px solid #ccc;background:#f5f5f5}
}
