/* ===========================================================
   Emberhall landing — warm "fireside fantasy" aesthetic
   Display: Fraunces · Body: Hanken Grotesk · Mono: JetBrains Mono
   =========================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
  --bg:        #16110d;
  --bg-2:      #1d1610;
  --surface:   #241c15;
  --surface-2: #2c2218;
  --border:    #3a2e23;
  --text:      #f4ede4;
  --text-muted:#b6a895;
  --ember:     #ff7a1a;
  --ember-2:   #ffb24d;
  --spark:     #ffd773;
  --success:   #4fd08a;
  --error:     #ff6b6b;
  --on-ember:  #1a0e05;
  --glow: 0 0 60px rgba(255,122,26,.28);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --maxw: 1160px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-full: 999px;
}

[data-theme="light"] {
  --bg:        #f7f0e6;
  --bg-2:      #f1e7d8;
  --surface:   #fffaf2;
  --surface-2: #f3e9da;
  --border:    #e2d4bf;
  --text:      #271c12;
  --text-muted:#6f5f4c;
  --ember:     #d4540a;
  --ember-2:   #b8470a;
  --spark:     #c77d0a;
  --success:   #1e9e5a;
  --error:     #c4322f;
  --on-ember:  #fff6ec;
  --glow: 0 0 50px rgba(212,84,10,.18);
  --shadow: 0 18px 44px rgba(120,80,30,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* subtle grain + warm vignette */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(255,122,26,.10), transparent 60%),
    radial-gradient(80% 60% at 100% 0%, rgba(255,178,77,.06), transparent 55%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -.01em;
  font-weight: 600;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

a { color: var(--ember-2); text-decoration: none; }
em { font-style: italic; color: var(--ember); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ember); color: var(--on-ember);
  padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; min-height: 46px; padding: 0 22px;
  border-radius: var(--r-full); font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-ember {
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  color: var(--on-ember);
  box-shadow: 0 8px 24px rgba(255,122,26,.30);
}
.btn-ember:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,122,26,.42); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ember); color: var(--ember-2); }
.btn-link { background: transparent; color: var(--text-muted); padding: 0 6px; }
.btn-link:hover { color: var(--ember-2); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.brand-mark { fill: var(--ember); filter: drop-shadow(0 0 8px rgba(255,122,26,.5)); flex: none; }
.brand-name { font-family: "Fraunces", serif; font-weight: 900; font-size: 1.4rem; letter-spacing: -.02em; }
.nav { display: flex; gap: 26px; margin-left: 8px; }
.nav a { color: var(--text-muted); font-weight: 500; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: var(--text);
}
.theme-toggle:hover { border-color: var(--ember); }
.theme-icon { width: 16px; height: 16px; display: block; position: relative; }
.theme-icon::before { content: "☾"; font-size: 16px; line-height: 1; }
[data-theme="light"] .theme-icon::before { content: "☀"; }

.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r-sm); cursor: pointer; flex-direction: column;
  gap: 4px; align-items: center; justify-content: center; }
.menu-btn span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-menu { display: none; flex-direction: column; gap: 6px; padding: 16px 24px 24px;
  border-bottom: 1px solid var(--border); background: var(--bg-2); }
.mobile-menu a { padding: 10px 0; color: var(--text); font-weight: 500; }
.mobile-menu .btn { margin-top: 6px; }

/* ---------- Ember particles ---------- */
.ember-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ember-field span {
  position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, var(--spark), var(--ember) 60%, transparent 70%);
  opacity: 0; animation: rise 9s linear infinite;
}
.ember-field span:nth-child(1){ left: 8%;  animation-delay: 0s;  }
.ember-field span:nth-child(2){ left: 20%; animation-delay: 2.4s; width: 4px; height: 4px; }
.ember-field span:nth-child(3){ left: 33%; animation-delay: 4.1s; }
.ember-field span:nth-child(4){ left: 46%; animation-delay: 1.2s; width: 6px; height: 6px; }
.ember-field span:nth-child(5){ left: 58%; animation-delay: 5.5s; }
.ember-field span:nth-child(6){ left: 67%; animation-delay: 3.2s; width: 4px; height: 4px; }
.ember-field span:nth-child(7){ left: 76%; animation-delay: 6.3s; }
.ember-field span:nth-child(8){ left: 85%; animation-delay: 1.9s; width: 6px; height: 6px; }
.ember-field span:nth-child(9){ left: 92%; animation-delay: 4.8s; }
.ember-field span:nth-child(10){ left: 14%; animation-delay: 7.1s; }
.ember-field.soft span { animation-duration: 11s; }
@keyframes rise {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(1); }
  10%  { opacity: .9; }
  80%  { opacity: .6; }
  100% { opacity: 0; transform: translateY(-380px) translateX(28px) scale(.4); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { font-family: "JetBrains Mono", monospace; font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ember-2); margin-bottom: 18px; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 600; }
.hero-sub { color: var(--text-muted); font-size: 1.15rem; max-width: 30em; margin: 24px 0 32px; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px;
  color: var(--text-muted); font-size: .92rem; }
.hero-trust span { white-space: nowrap; }

/* ---------- Product mock ---------- */
.hero-visual { position: relative; }
.mock {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow), var(--glow); overflow: hidden;
  transform: rotate(.6deg);
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-url { margin-left: 10px; font-family: "JetBrains Mono", monospace; font-size: .72rem;
  color: var(--text-muted); }
.mock-head { display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; }
.mock-head .round { font-family: "Fraunces", serif; font-size: 1.15rem; font-weight: 600; }
.mock-head .live { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--success);
  letter-spacing: .1em; }
.initiative { list-style: none; padding: 4px 12px 8px; }
.initiative li { display: grid; grid-template-columns: 30px 1fr 70px auto; align-items: center;
  gap: 10px; padding: 9px 8px; border-radius: var(--r-sm); }
.initiative li.active { background: color-mix(in srgb, var(--ember) 14%, transparent);
  box-shadow: inset 3px 0 0 var(--ember); }
.initiative li.down { opacity: .5; }
.initiative .init { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--text-muted);
  text-align: center; }
.initiative .combatant { font-weight: 600; font-size: .92rem; }
.initiative .combatant small { color: var(--text-muted); font-weight: 400; margin-left: 5px; }
.initiative .hp { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.initiative .hp i { display: block; height: 100%; background: var(--ember); border-radius: var(--r-full); }
.initiative .hp.good i { background: var(--success); }
.initiative .hp.low i { background: var(--error); }
.initiative .num { font-family: "JetBrains Mono", monospace; font-size: .78rem; font-weight: 700;
  text-align: right; }
.initiative .num.muted { color: var(--text-muted); font-weight: 500; }
.mock-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px 18px; border-top: 1px solid var(--border); }
.chip { font-size: .72rem; padding: 4px 10px; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text-muted); }
.mock-foot .roll { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: .78rem;
  color: var(--text-muted); }
.mock-foot .roll b { color: var(--spark); }

/* ---------- Trust strip ---------- */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-2); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 26px 24px; }
.trust-inner div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.trust-inner strong { font-family: "Fraunces", serif; font-size: 1.2rem; color: var(--text); }
.trust-inner span { color: var(--text-muted); font-size: .86rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section:nth-of-type(even) { background: var(--bg-2); }
.section-head { max-width: 40rem; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { font-family: "JetBrains Mono", monospace; font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ember-2); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }

/* ---------- Audiences ---------- */
.aud-tabs { display: inline-flex; gap: 6px; padding: 6px; border: 1px solid var(--border);
  border-radius: var(--r-full); background: var(--surface); margin-bottom: 28px; }
.aud-tab { border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
  font: inherit; font-weight: 600; padding: 10px 20px; border-radius: var(--r-full); }
.aud-tab.is-active { background: linear-gradient(135deg, var(--ember), var(--ember-2));
  color: var(--on-ember); }
.aud-panel { display: none; }
.aud-panel.is-active { display: block; animation: fade .35s ease; }
.aud-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; }
.aud-list li { position: relative; padding-left: 30px; color: var(--text-muted); }
.aud-list li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--ember); }
.aud-list b { color: var(--text); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bento-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px; position: relative; overflow: hidden;
  transition: transform .18s ease, border-color .2s ease; }
.bento-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ember) 45%, var(--border)); }
.bento-card.span-2 { grid-column: span 2; }
.bc-icon { font-size: 1.7rem; margin-bottom: 14px; }
.bento-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.bento-card p { color: var(--text-muted); }
.bento-card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,122,26,.10), transparent 70%); pointer-events: none; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px 26px; }
.step-no { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--ember) 16%, transparent); color: var(--ember);
  font-family: "Fraunces", serif; font-weight: 900; font-size: 1.3rem; margin-bottom: 16px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 8px; }
.steps p { color: var(--text-muted); }

/* ---------- Use cases ---------- */
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.uc-card { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.uc-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--ember-2); }
.uc-card p { color: var(--text-muted); }

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px; }
.quote blockquote { font-family: "Fraunces", serif; font-size: 1.18rem; line-height: 1.4;
  font-style: italic; }
.quote figcaption { margin-top: 16px; color: var(--text); font-weight: 600; font-size: .92rem; }
.quote figcaption span { color: var(--text-muted); font-weight: 400; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 22px;
  justify-content: center; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.plan-featured { border-color: var(--ember); box-shadow: var(--glow); }
.plan-flag { position: absolute; top: -13px; left: 32px; background: linear-gradient(135deg, var(--ember), var(--ember-2));
  color: var(--on-ember); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-full); }
.plan h3 { font-size: 1.6rem; }
.price { font-family: "Fraunces", serif; }
.price span { font-size: 2.6rem; font-weight: 900; color: var(--text); }
.price small { color: var(--text-muted); }
.plan ul { list-style: none; display: grid; gap: 10px; margin: 6px 0 8px; }
.plan li { position: relative; padding-left: 26px; color: var(--text-muted); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plan .btn { margin-top: auto; }
.plan-note { color: var(--text-muted); font-size: .84rem; text-align: center; }
.pricing-foot { text-align: center; color: var(--text-muted); margin-top: 28px; }

/* ---------- FAQ ---------- */
.accordion { display: grid; gap: 12px; }
.accordion details { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 22px; }
.accordion summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600;
  font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--ember); font-size: 1.4rem; transition: transform .2s ease; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion p { color: var(--text-muted); padding: 0 0 18px; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; overflow: hidden; text-align: center;
  padding: clamp(72px, 11vw, 140px) 0;
  background: radial-gradient(110% 130% at 50% 120%, rgba(255,122,26,.22), transparent 60%), var(--bg-2);
  border-top: 1px solid var(--border); }
.final-inner { position: relative; z-index: 1; }
.final-cta h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.final-cta p { color: var(--text-muted); font-size: 1.15rem; margin: 14px 0 30px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; max-width: 26em; }
.footer-col h4 { font-family: "Hanken Grotesk", sans-serif; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted); margin-bottom: 14px; font-weight: 700; }
.footer-col a { display: block; color: var(--text); padding: 5px 0; }
.footer-col a:hover { color: var(--ember-2); }
.footer-fine { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: .82rem; }
.footer-fine .disclaimer { margin-top: 8px; opacity: .8; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-actions .btn-ghost, .header-actions .btn-ember { display: none; }
  .menu-btn { display: flex; }
  .mobile-menu.open { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; }
  .bento, .steps, .uc-grid, .quotes { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: auto; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .aud-list { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .hero-trust { gap: 8px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .aud-tabs { width: 100%; }
  .aud-tab { flex: 1; padding: 12px 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ember-field span { animation: none; display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .bento-card { transition: none; }
  .aud-panel.is-active { animation: none; }
  .mock { transform: none; }
}
