/* ============================================================
   FIERI — shared design system for thefieriapp.com
   Onyx + warm paper · one ember accent.

   Mirrors the app's styles.css so the site and the product read as
   one brand. Every page links this file; page-specific layout stays
   in the stylesheet owned by that page family.
   ============================================================ */

/* ---------- tokens ----------
   Base hues are the only literals. Every tint derives from them via
   color-mix, so retuning the palette means editing the values below
   and nothing else. Pages may override --onyx/--onyx-raised to sit
   darker (the campaign landers do). */

:root {
  /* surface: onyx, warm & candlelit */
  --onyx: #15110C;
  --onyx-raised: #1E1811;

  /* ink: text on onyx */
  --ink: #EFE6D6;
  --ink-2: #B7AB97;
  /* Small metadata text must remain AA-readable on both base surfaces. */
  --ink-3: #918574;

  /* ember: the single warm-metal accent */
  --ember: #D99A4E;
  --ember-hi: #ECC079;
  --ember-lo: #C4823A;
  --ember-deep: #8F5E2C;
  --ember-ink: #2A1C0C;   /* text sitting on an ember fill */

  /* derived ember tints */
  --ember-glow:   color-mix(in srgb, var(--ember) 40%, transparent);
  --ember-tint:   color-mix(in srgb, var(--ember) 10%, transparent);
  --ember-line:   color-mix(in srgb, var(--ember) 22%, transparent);
  --ember-line-2: color-mix(in srgb, var(--ember) 28%, transparent);

  /* hairlines, derived from ink so they stay warm against onyx */
  --border:   color-mix(in srgb, var(--ink) 8.5%, transparent);
  --border-2: color-mix(in srgb, var(--ink) 14%, transparent);

  /* one ember lift, shared by every primary action */
  --ember-lift:       0 1px 0 rgba(255, 255, 255, 0.25) inset,
                      0 10px 30px -8px var(--ember-glow);
  --ember-lift-hover: 0 1px 0 rgba(255, 255, 255, 0.32) inset,
                      0 14px 34px -8px var(--ember-glow);

  /* geometry — the app rounds cards softly and buttons fully */
  --radius-card: 22px;    /* panels and feature cards */
  --radius-row: 16px;     /* wide, short content rows */
  --radius-tile: 16px;    /* 40–52px icon tiles */
  --radius-tile-sm: 10px; /* ~28px numeral badges */
  --radius-pill: 999px;   /* buttons, inputs, chips */

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', -apple-system, system-ui, sans-serif;
}

/* ---------- base ----------
   One reset and one canvas for every page. Pages layer their own
   layout on top; none of them restates these. */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--onyx);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* Film grain over the whole canvas, screen only — position: fixed
   would repeat it on every printed page. */
@media screen {
  body::before {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    content: "";
    pointer-events: none;
  }
}

/* ---------- type primitives ---------- */

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26.4px;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-tile-sm);
  background: var(--ink);
  color: var(--onyx);
  font-family: var(--sans);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--ember-hi);
  outline-offset: 4px;
}

/* ---------- site chrome ---------- */

/* Sticky by default; the home page swaps to fixed so the hero can
   start underneath the translucent bar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--onyx) 86%, transparent);
  backdrop-filter: blur(20px);
}

.site-header .wordmark {
  display: inline-flex;
  align-items: center;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  line-height: normal;
}

.site-header nav a {
  color: var(--ink-3);
  font-size: 12.8px;
  letter-spacing: normal;
  text-decoration: none;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header nav a.nav-waitlist {
  padding: 8px 18.4px;
  color: var(--ember-ink);
  font-size: 12.8px;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ember-hi);
  text-underline-offset: 0.3em;
}

.site-footer {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 32px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.site-footer a {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.site-footer a:hover {
  color: var(--ember-hi);
  text-decoration-color: currentColor;
}

.site-footer a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--ember-hi);
}

.serif {
  font-family: var(--serif);
  font-optical-sizing: auto;
}

/* Section label. The app's spec (11px / 600 / 0.22em / uppercase); the
   site colours it ember, because a landing page has far fewer ember
   touchpoints than the app and needs the accent to keep its rhythm. */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}

/* ---------- primary action ----------
   One definition for every ember button across the site. Callers set
   size only. Fully rounded, as in the app. */

.btn-ember {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--ember-hi), var(--ember));
  color: var(--ember-ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--ember-lift);
  transition: transform 180ms var(--ease), box-shadow 220ms var(--ease);
}

.btn-ember:hover {
  transform: translateY(-1px);
  box-shadow: var(--ember-lift-hover);
}

.btn-ember:active { transform: scale(0.975); }

.btn-ember:disabled { cursor: default; }
.btn-ember:disabled:hover { transform: none; box-shadow: var(--ember-lift); }

/* ---------- icons ----------
   Stroked line icons from the app's ui.jsx, referenced from the sprite
   each page inlines. Colour comes from the parent via currentColor. */

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Rounded ember tile the icons sit in, per the app's EmptyState. */
.icon-tile {
  display: grid;
  place-items: center;
  border-radius: var(--radius-tile);
  background: var(--ember-tint);
  color: var(--ember);
}

/* ---------- voice orb ----------
   The app's signature element, ember variant, idle/breathing only.
   The app's listening / thinking / speaking states are app-shell
   concerns and are deliberately not ported. */

.orb {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  --pulse: 5.4s;
}

.orb > * {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orb-glow {
  inset: -22%;
  background: radial-gradient(circle at 50% 50%,
    var(--ember-glow),
    color-mix(in srgb, var(--ember) 12%, transparent) 42%,
    transparent 68%);
  filter: blur(8px);
  opacity: 0.85;
  animation: orbBreath var(--pulse) ease-in-out infinite;
}

.orb-body {
  inset: 14%;
  background: radial-gradient(circle at 38% 30%,
    var(--ember-hi) 0%, var(--ember) 26%,
    var(--ember-lo) 52%, var(--ember-deep) 78%, #3C2611 100%);
  box-shadow:
    inset 0 -14px 36px rgba(40, 22, 6, 0.7),
    inset 0 10px 26px rgba(255, 224, 170, 0.45),
    0 18px 50px -12px var(--ember-glow);
  animation: orbBreath var(--pulse) ease-in-out infinite;
}

.orb-sheen {
  inset: 14%;
  background:
    radial-gradient(60% 55% at 42% 26%, rgba(255, 240, 210, 0.85), transparent 60%),
    conic-gradient(from 0deg at 50% 50%,
      rgba(255, 225, 170, 0), rgba(255, 225, 170, 0.35),
      rgba(140, 80, 30, 0) 40%, rgba(255, 225, 170, 0.22) 72%, rgba(255, 225, 170, 0));
  mix-blend-mode: screen;
  filter: blur(2px);
  opacity: 0.8;
  animation: orbSpin 16s linear infinite;
}

@keyframes orbBreath {
  0%, 100% { transform: scale(0.97); opacity: 0.7; }
  50%      { transform: scale(1.05); opacity: 1; }
}

@keyframes orbSpin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }

  .site-header nav {
    gap: 12.8px;
  }

  .nav-secondary {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .site-footer nav {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .nav-support {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
