/* ============================================================
   EQBook — Shared Stylesheet
   Palette: warm parchment + burnt orange / light browns
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  /* Neutrals / Parchment */
  --cream:       #faf8f5;
  --parchment:   #f3ede0;
  --sand:        #e8d9c0;
  --sand-dk:     #d5c4a1;

  /* Browns */
  --brown-lt:    #c8a87a;
  --brown-mid:   #9a7050;
  --brown:       #7a5230;
  --brown-dk:    #5a3518;
  --brown-xdk:   #3a2010;

  /* Accent — Burnt Orange */
  --orange:      #c85a20;
  --orange-lt:   #e07840;
  --orange-dk:   #a04018;
  --orange-pale: #f5e5d8;

  /* Text */
  --text:        #2a1a0a;
  --text-body:   #4a3020;
  --text-muted:  #7a6050;

  /* Utility */
  --white:       #ffffff;
  --nav-h:       68px;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 2px 8px rgba(58,32,16,.09);
  --shadow-md:   0 8px 28px rgba(58,32,16,.13);
  --shadow-lg:   0 20px 60px rgba(58,32,16,.18);

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--orange); text-decoration: none; transition: color .18s; }
a:hover { color: var(--orange-dk); }

/* ── Typography ────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-serif); color: var(--brown-xdk); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { max-width: 68ch; }
code { font-family: var(--font-mono); font-size: .87em;
       background: var(--parchment); border: 1px solid var(--sand);
       padding: 1px 6px; border-radius: 4px; }

/* ── Layout ────────────────────────────────────────────── */
.container   { width: min(1120px, 92vw); margin-inline: auto; }
.section     { padding-block: 80px; }
.section--alt  { background: var(--parchment); }
.section--dark {
  background: var(--brown-xdk);
  color: var(--sand);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--cream); }
.section--dark p  { color: var(--brown-lt); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250,248,245,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--sand);
  display: flex; align-items: center;
}
.nav__inner {
  width: min(1120px, 92vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700;
  color: var(--brown-xdk);
}
.nav__logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(140deg, var(--orange-lt), var(--orange-dk));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav__logo-mark svg { width: 20px; height: 20px; }
.nav__links { display: flex; gap: 2px; align-items: center; }
.nav__links a {
  padding: 7px 15px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--text-body);
  transition: background .18s, color .18s;
}
.nav__links a:hover, .nav__links a.active {
  background: var(--parchment); color: var(--orange);
}
.nav__cta {
  background: var(--orange) !important; color: #fff !important;
  padding: 8px 20px !important; border-radius: 9px !important;
  font-weight: 500 !important; margin-left: 6px;
}
.nav__cta:hover { background: var(--orange-dk) !important; color: #fff !important; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--brown); margin: 5px 0; border-radius: 2px; }

@media (max-width: 780px) {
  .nav__links {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--sand);
    padding: 16px 20px 20px; gap: 4px;
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: .93rem; font-weight: 500;
  border: 2px solid transparent; cursor: pointer; transition: all .18s;
  text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dk); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline { border-color: var(--brown-mid); color: var(--brown-dk); background: transparent; }
.btn--outline:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-pale); }
.btn--ghost { color: var(--text-muted); }
.btn--ghost:hover { color: var(--orange); }
.btn--lg { padding: 14px 34px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 7px 16px; font-size: .82rem; border-radius: 8px; }
.btn--dark { background: var(--brown-xdk); color: var(--cream); border-color: var(--brown-xdk); }
.btn--dark:hover { background: var(--brown-dk); color: var(--cream); }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--sand);
  border-radius: var(--radius-lg); padding: 28px 30px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-lt), var(--orange));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; flex-shrink: 0;
}
.card__icon svg { width: 22px; height: 22px; color: #fff; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding-block: 96px 80px;
  background: linear-gradient(158deg, var(--cream) 0%, var(--parchment) 55%, var(--sand) 100%);
  position: relative; overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; top: -120px; right: -80px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,90,32,.07) 0%, transparent 72%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange-pale); border: 1px solid rgba(200,90,32,.22);
  color: var(--orange-dk); border-radius: 100px;
  padding: 5px 14px; font-size: .8rem; font-weight: 500; margin-bottom: 22px;
}
.hero__eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.hero__title em { font-style: italic; color: var(--orange); }
.hero__title { margin-bottom: 20px; }
.hero__desc { font-size: 1.08rem; color: var(--text-muted); margin-bottom: 36px; max-width: 50ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 20px; font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.hero__note svg { width: 14px; height: 14px; color: var(--orange); flex-shrink: 0; }

/* App window mockup */
.app-window {
  background: #fff;
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--sand);
}
.app-window__bar {
  background: var(--parchment); height: 44px;
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border-bottom: 1px solid var(--sand);
}
.app-window__dot { width: 12px; height: 12px; border-radius: 50%; }
.app-window__title { flex: 1; text-align: center; font-size: .75rem; color: var(--text-muted); font-family: var(--font-sans); }
.app-window__body { display: grid; grid-template-columns: 200px 1fr; min-height: 340px; }
.app-window__sidebar { background: var(--parchment); border-right: 1px solid var(--sand); padding: 16px 12px; }
.app-window__sidebar-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; font-family: var(--font-sans); font-weight: 600; }
.app-window__source-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: .78rem; color: var(--text-body); margin-bottom: 2px; }
.app-window__source-row.active { background: rgba(200,90,32,.1); color: var(--orange-dk); }
.app-window__source-icon { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.app-window__content { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.app-window__chat-bubble { border-radius: 10px; padding: 9px 13px; font-size: .78rem; line-height: 1.5; max-width: 86%; }
.app-window__chat-bubble--user { background: var(--orange); color: #fff; align-self: flex-end; }
.app-window__chat-bubble--ai { background: var(--parchment); color: var(--text-body); align-self: flex-start; border: 1px solid var(--sand); }
.app-window__citation { display: inline-block; background: rgba(200,90,32,.12); color: var(--orange-dk); border-radius: 4px; padding: 1px 5px; font-size: .72rem; border-bottom: 2px dotted var(--orange); margin-left: 4px; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__desc { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__note { justify-content: center; }
}

/* ── Section header ────────────────────────────────────── */
.section-label {
  display: inline-block; font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--orange);
  margin-bottom: 10px;
}
.section-title { margin-bottom: 14px; }
.section-intro { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 48px; }

/* ── Feature pill ──────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--parchment); border: 1px solid var(--sand);
  border-radius: 100px; padding: 5px 14px;
  font-size: .83rem; color: var(--brown-dk);
}
.pill svg { width: 13px; height: 13px; color: var(--orange); flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* ── Page hero (inner pages) ───────────────────────────── */
.page-hero {
  background: linear-gradient(150deg, var(--brown-xdk) 0%, var(--brown-dk) 100%);
  padding-block: 72px 56px; text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% -10%, rgba(200,90,32,.3) 0%, transparent 65%);
}
.page-hero .section-label { color: var(--orange-lt); position: relative; }
.page-hero h1  { color: var(--cream); position: relative; }
.page-hero p   { color: var(--brown-lt); position: relative; margin-inline: auto; }

/* ── Limit item ────────────────────────────────────────── */
.limit-item {
  display: flex; gap: 16px;
  background: var(--white); border-left: 4px solid var(--brown-lt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.limit-item h4 { margin-bottom: 4px; }
.limit-item p  { font-size: .88rem; color: var(--text-muted); }

/* ── Tip card ──────────────────────────────────────────── */
.tip-card {
  background: var(--parchment); border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 18px 22px;
  display: flex; gap: 14px;
}
.tip-num {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .82rem; flex-shrink: 0; margin-top: 2px;
}

/* ── Download card ─────────────────────────────────────── */
.dl-card {
  background: var(--white); border: 1px solid var(--sand);
  border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.dl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dl-card__os { display: flex; align-items: center; gap: 14px; }
.dl-card__os svg { width: 44px; height: 44px; }
.dl-card__name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: var(--brown-xdk); }
.dl-card__sub  { font-size: .8rem; color: var(--text-muted); }

/* ── Tags ──────────────────────────────────────────────── */
.tag { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .76rem; font-weight: 500; }
.tag--green  { background: #e8f5e9; color: #2e7d32; }
.tag--orange { background: var(--orange-pale); color: var(--orange-dk); }
.tag--brown  { background: var(--parchment); color: var(--brown-dk); }
.tag--blue   { background: #e3f2fd; color: #1565c0; }

/* ── Table (prose) ─────────────────────────────────────── */
.prose-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: 28px; }
.prose-table th { background: var(--parchment); padding: 11px 14px; text-align: left; border: 1px solid var(--sand); font-weight: 600; color: var(--brown-dk); font-family: var(--font-sans); }
.prose-table td { padding: 10px 14px; border: 1px solid var(--sand); }
.prose-table tr:nth-child(even) td { background: rgba(243,237,224,.45); }

/* ── Prose (legal pages) ───────────────────────────────── */
.prose h2 { font-size: 1.45rem; margin-top: 44px; margin-bottom: 12px; }
.prose h3 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 8px; color: var(--brown-dk); }
.prose p  { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose a  { color: var(--orange); }
.prose strong { color: var(--brown-xdk); }
.prose hr { border: none; border-top: 1px solid var(--sand); margin-block: 40px; }

/* ── Code block ────────────────────────────────────────── */
.code-block {
  background: var(--brown-xdk); color: #abb2bf;
  border-radius: var(--radius); padding: 16px 20px;
  font-family: var(--font-mono); font-size: .82rem;
  overflow-x: auto; margin-top: 8px; line-height: 1.7;
}
.code-block .hl { color: var(--orange-lt); }
.code-block .gr { color: #98c379; }
.code-block .dim { color: #5c6370; }

/* ── Image placeholder ─────────────────────────────────── */
.img-ph {
  background: linear-gradient(135deg, var(--parchment), var(--sand));
  border: 2px dashed var(--brown-lt); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--text-muted); font-size: .83rem; text-align: center;
  padding: 28px; min-height: 300px;
}
.img-ph svg { width: 38px; height: 38px; opacity: .45; }
.img-ph strong { color: var(--brown-dk); font-size: .9rem; }
.img-ph em { font-style: normal; color: var(--orange); }

/* ── Divider ───────────────────────────────────────────── */
hr.divider { border: none; border-top: 1px solid var(--sand); margin-block: 56px; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--brown-xdk); color: var(--brown-lt);
  padding-block: 56px 28px;
}
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(196,168,120,.14);
}
.footer__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700;
  color: var(--cream); margin-bottom: 10px;
}
.footer__tagline { font-size: .88rem; line-height: 1.65; max-width: 28ch; }
.footer__col h5 {
  color: var(--sand); font-family: var(--font-sans); font-size: .77rem;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px;
}
.footer__col a { display: block; font-size: .88rem; color: var(--brown-lt); margin-bottom: 8px; transition: color .18s; }
.footer__col a:hover { color: var(--orange-lt); }
.footer__bottom {
  padding-top: 22px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: .8rem; color: rgba(196,168,120,.55);
}
.footer__bottom a { color: rgba(196,168,120,.7); }
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__inner > div:first-child { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* ── Scroll reveal ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Utilities ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.flex        { display: flex; }
.flex-wrap   { flex-wrap: wrap; }
.items-center{ align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }
.tick  { color: #388e3c; font-size: 1.05rem; }
.cross { color: #c62828; font-size: 1.05rem; }
