/* ============ Filament design tokens ============ */
:root {
  /* Brand gradient (the Filament) */
  --grad-filament: linear-gradient(135deg, #C44828 0%, #D87830 38%, #E8A848 65%, #F8D878 100%);

  /* Dark foundation (hero + footer) */
  --bg-hero:    #0A0806;
  --bg-dark:    #141210;
  --fg-on-dark: #F5F0E8;
  --fg-on-dark-muted: #A09480;
  --border-dark: #302820;
  --border-dark-strong: #40362C;

  /* Light foundation ("what it does" strip) */
  --bg-light:   #FAF8F5;
  --bg-elevated:#FFFEFA;
  --fg:         #1C1810;
  --fg-muted:   #706858;
  --border:     #E8E0D4;
  --border-strong:#D4CAB8;
  --link:       #9C4C18;

  /* Accents */
  --beam-cta-text: #1C1810;       /* dark text on the gradient — never white */
  --shadow-beam: 0 4px 14px rgba(216,120,48,.30);
  --shadow-lg:   0 10px 15px rgba(100,70,30,.08), 0 4px 6px rgba(100,70,30,.04);

  /* Spacing (4px grid) */
  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;

  --radius: 8px;  --radius-lg: 12px;

  --font: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--fg); background: var(--bg-light); line-height: 1.6; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ============ Shared button ============ */
.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: var(--radius); cursor: pointer;
  transition: filter .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn--gradient { background: var(--grad-filament); color: var(--beam-cta-text); }
.btn--gradient:hover { filter: brightness(1.02); box-shadow: var(--shadow-beam); }
/* frosted-glass secondary: faint warm fill + backdrop blur, not fully transparent */
.btn--outline-dark {
  color: var(--fg-on-dark);
  background-color: rgba(245, 240, 232, 0.07);
  border: 1px solid rgba(245, 240, 232, 0.20);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn--outline-dark:hover {
  background-color: rgba(245, 240, 232, 0.12);
  border-color: rgba(245, 240, 232, 0.34);
}

:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-dark), 0 0 0 4px rgba(216,120,48,.45); }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; background: var(--bg-hero); padding: var(--space-12) var(--space-6);
}
.hero__glow {
  position: absolute; top: 50%; left: 50%;
  width: min(680px, 90vw); height: 340px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 60% 50% at center,
              rgba(216,120,48,.30) 0%, rgba(216,120,48,.08) 42%, rgba(10,8,6,0) 72%);
  pointer-events: none; z-index: 0;
}
.hero__canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__lockup { margin-bottom: var(--space-8); }
.hero__logo { height: clamp(60px, 6.5vw, 80px); width: auto; margin: 0 auto; }
.hero__headline {
  color: var(--fg-on-dark); font-weight: 700; line-height: 1.1;
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: clamp(44px, 7vw, 64px);   /* gap for the thermionic beam to rest in */
  text-shadow: 0 2px 30px rgba(10,8,6,.6);
}
.hero__sub {
  color: var(--fg-on-dark-muted); font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.55; max-width: 520px; margin: 0 auto var(--space-8);
}
.hero__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ============ Hero ignition (added by hero.js via .ignite) ============ */
.hero__glow { transform: translate(-50%, -50%); will-change: transform; }
.hero.ignite .hero__glow   { animation: heroBloom 1100ms cubic-bezier(.4,0,.2,1) both; }
.hero.ignite .hero__lockup { animation: heroRise 500ms 120ms ease-out both; }
.hero.ignite .hero__headline { animation: heroRise 500ms 260ms ease-out both; }
.hero.ignite .hero__sub    { animation: heroRise 500ms 380ms ease-out both; }
.hero.ignite .hero__actions{ animation: heroRise 500ms 500ms ease-out both; }

@keyframes heroBloom { from { opacity: 0; transform: translate(-50%,-50%) scale(.6); }
                       to   { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
@keyframes heroRise  { from { opacity: 0; transform: translateY(14px); }
                       to   { opacity: 1; transform: translateY(0); } }

/* ============ "What it does" strip ============ */
.what { background: var(--bg-light); padding: var(--space-12) var(--space-6); }
.what__grid {
  max-width: 1040px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-10);
}
.what__title { font-size: 19px; font-weight: 600; color: var(--fg); margin-bottom: var(--space-3); }
.what__body  { font-size: 15px; color: var(--fg-muted); line-height: 1.6; max-width: 34ch; }
@media (max-width: 720px) {
  .what__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .what__body { max-width: none; }
}

/* ============ Footer ============ */
.foot { background: var(--bg-dark); padding: var(--space-12) var(--space-6); }
.foot__inner { max-width: 1040px; margin: 0 auto; text-align: center;
               display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.foot__logo { height: 32px; width: auto; }
.foot__tag  { color: var(--fg-on-dark); font-weight: 500; font-size: 16px; }
.foot__links { display: flex; gap: var(--space-6); margin-top: var(--space-2); }
.foot__links a { color: var(--fg-on-dark-muted); font-size: 14px; font-weight: 500; }
.foot__links a:hover { color: var(--fg-on-dark); }
.foot__copy { color: var(--fg-on-dark-muted); font-size: 13px; margin-top: var(--space-4); }

/* ============ Responsive + a11y polish ============ */
@media (max-width: 480px) {
  .hero { padding: var(--space-10) var(--space-4); }
  .hero__actions .btn { width: 100%; }      /* full-width stacked buttons on phones */
}
/* Belt-and-suspenders: even if hero.js somehow runs, kill canvas + ignition for reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .hero__canvas { display: none; }
  .hero.ignite .hero__glow,
  .hero.ignite .hero__lockup,
  .hero.ignite .hero__headline,
  .hero.ignite .hero__sub,
  .hero.ignite .hero__actions { animation: none; }
}

/* ============ Error pages (404 / generic) ============ */
.err {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; background: var(--bg-hero); padding: var(--space-12) var(--space-6);
}
.err__glow {
  position: absolute; top: 50%; left: 50%;
  width: min(680px, 90vw); height: 340px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 60% 50% at center,
              rgba(216,120,48,.30) 0%, rgba(216,120,48,.08) 42%, rgba(10,8,6,0) 72%);
  pointer-events: none; z-index: 0;
}
.err__inner { position: relative; z-index: 1; max-width: 520px; }
.err__code {
  font-size: clamp(64px, 14vw, 120px); font-weight: 700; line-height: 1;
  color: var(--fg-on-dark-muted); letter-spacing: .02em; margin-bottom: var(--space-4);
}
.err__beam {
  width: 200px; height: 4px; margin: 0 auto var(--space-8); border-radius: 2px;
  background: var(--grad-filament); filter: blur(3px); opacity: .65;
}
.err__title {
  color: var(--fg-on-dark); font-weight: 700; line-height: 1.15;
  font-size: clamp(24px, 4vw, 34px); margin-bottom: var(--space-3);
}
.err__sub {
  color: var(--fg-on-dark-muted); font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.55; margin: 0 auto var(--space-8); max-width: 420px;
}
.err__actions { display: flex; justify-content: center; }
