/* ==========================================================================
   Twenty819 — site styles
   Light theme by default, dark theme via [data-theme="dark"].
   Type: Archivo (headings) / IBM Plex Sans (body).
   ========================================================================== */

:root {
  /* Brand constants — identical in both themes */
  --ember: #E8734A;
  --ember-deep: #C1541F;   /* accessible ember for text on light */
  --gold: #F0AE4A;
  --gold-deep: #9A6F14;
  --ink: #0B0B0F;
  --brand-dark: #201E1D;
  --brand-cream: #F7F4EF;

  /* Light theme surfaces */
  --canvas: #F2F3F5;
  --panel: #FFFFFF;
  --panel-2: #FFFFFF;
  --text: #26262E;
  --heading: #0B0B0F;
  --muted: #63636F;
  --line: #E1E3E7;
  --line-strong: #C8CBD1;
  --link: var(--ember-deep);
  --shadow: 0 1px 2px rgba(11, 11, 15, .05), 0 8px 20px -12px rgba(11, 11, 15, .16);
  --shadow-lift: 0 2px 4px rgba(11, 11, 15, .06), 0 16px 32px -16px rgba(11, 11, 15, .28);
  --head-bg: rgba(255, 255, 255, .85);

  --measure: 64ch;
  --wrap: 1160px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --canvas: #0B0B0F;
  --panel: #16161C;
  --panel-2: #1D1D25;
  --text: #D6D6E0;
  --heading: #FFFFFF;
  --muted: #91919E;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .22);
  --link: var(--gold);
  --shadow: none;
  --shadow-lift: 0 18px 34px -20px rgba(0, 0, 0, .8);
  --head-bg: rgba(11, 11, 15, .86);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 100;
  background: var(--ember); color: #fff;
  padding: .6rem 1rem; border-radius: 4px;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.028em;
  margin: 0 0 .55em;
}

h1 { font-size: clamp(2.3rem, 5.8vw, 4.1rem); line-height: 1.03; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.35rem); line-height: 1.14; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.018em; margin-bottom: .4em; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1.05rem; }

.lede { font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.52; color: var(--text); }
.muted { color: var(--muted); }

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--head-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-head.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -18px rgba(11, 11, 15, .55);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.mark { display: flex; align-items: center; color: var(--brand-dark); }
a.mark:hover { text-decoration: none; }
[data-theme="dark"] .mark { color: var(--brand-cream); }
.site-foot .mark { color: var(--brand-cream); }
.lockup { height: 34px; width: auto; display: block; }
@media (max-width: 620px) { .lockup { height: 28px; } }

.head-right { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--heading);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.theme-toggle:hover { border-color: var(--ember); background: rgba(232, 117, 73, .1); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--heading);
  font: inherit;
  font-size: .85rem;
  padding: .45rem .8rem;
  cursor: pointer;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 1.8vw, 1.5rem);
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  color: var(--text);
  font-size: .93rem;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--heading); text-decoration: none; border-bottom-color: var(--ember); }
.nav a[aria-current="page"] { color: var(--heading); border-bottom-color: var(--ember); }

.nav .cta-link {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: .45rem .9rem;
  color: var(--heading);
}
.nav .cta-link:hover { border-color: var(--ember); background: rgba(232, 117, 73, .1); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .25rem clamp(1.1rem, 4vw, 2.5rem) 1.1rem;
  }
  .nav li { border-top: 1px solid var(--line); }
  .nav a { display: block; padding: .8rem 0; font-size: 1rem; border-bottom: 0; }
  .nav .cta-link { border: 0; color: var(--ember-deep); padding-inline: 0; }
  [data-theme="dark"] .nav .cta-link { color: var(--gold); }
}

/* ---------- Sections ---------- */

section { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.band { background: var(--panel); border-block: 1px solid var(--line); }
[data-theme="dark"] .band { background: #101016; }

.head-block { max-width: 44rem; margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem); }
.head-block p:last-child { margin-bottom: 0; }

/* ---------- Hero (dark in both themes) ---------- */

.hero {
  background: var(--ink);
  color: #E6E6EC;
  padding-block: clamp(3.5rem, 8.5vw, 6.5rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(52rem 28rem at 84% -18%, rgba(232, 117, 73, .30), transparent 62%),
    radial-gradient(38rem 24rem at 2% 112%, rgba(234, 176, 76, .16), transparent 64%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 19ch; }
.hero .lede { color: #C9C9D4; max-width: 50ch; }
.hero .crumbs, .hero .crumbs a { color: #8E8E9C; }
.hero-meta {
  margin-top: 1.9rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #9494A2; font-size: .94rem; max-width: 52ch;
}


/* ---------- Animated brand mark in the hero ---------- */

.hero-mark {
  position: absolute;
  z-index: 1;
  right: clamp(1.5rem, 7vw, 6rem);
  top: 50%;
  width: clamp(230px, 25vw, 370px);
  margin-top: -1rem;
  opacity: .92;
  pointer-events: none;
  filter: drop-shadow(0 0 30px rgba(232, 115, 74, .20));
  animation: mark-in 1s var(--ease) .25s both;
}
.hero-mark svg { width: 100%; height: auto; display: block; }
.hero .wrap { z-index: 2; }

/* Each bar rises and falls on its own clock, so the group never marches in step. */
.hero-mark rect {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: eq 2.8s ease-in-out infinite;
}
.hero-mark rect:nth-child(1) { --amp: .70; animation-duration: 2.4s; animation-delay: -.40s; }
.hero-mark rect:nth-child(2) { --amp: .82; animation-duration: 3.3s; animation-delay: -1.05s; }
.hero-mark rect:nth-child(3) { --amp: .64; animation-duration: 2.7s; animation-delay: -.75s; }
.hero-mark rect:nth-child(4) { --amp: .76; animation-duration: 3.7s; animation-delay: -2.10s; }
.hero-mark rect:nth-child(5) { --amp: .72; animation-duration: 2.9s; animation-delay: -1.55s; }

@keyframes eq {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(var(--amp, .6)); }
}

@keyframes mark-in {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: .92; transform: none; }
}

@media (max-width: 980px) { .hero-mark { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-mark { animation: none; opacity: .92; }
  .hero-mark rect { animation: none; transform: none; }
}

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.75rem; }
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .96rem; font-weight: 500;
  padding: .78rem 1.45rem;
  border: 1px solid var(--ember);
  border-radius: 6px;
  background: var(--ember);
  color: #fff;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s var(--ease);
}
.btn:hover { background: #D9642F; border-color: #D9642F; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--heading); }
.btn-ghost:hover { background: rgba(232, 117, 73, .09); border-color: var(--ember); color: var(--heading); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: #fff; }

/* ---------- Launchpad tiles ---------- */

.group { margin-bottom: clamp(2rem, 4.5vw, 3.25rem); }
.group:last-child { margin-bottom: 0; }

.group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: .65rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.group-head h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 0; }
.group-head p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; max-width: 42ch; }
.group-head .group-link { font-size: .92rem; font-weight: 500; white-space: nowrap; }

.launchpad {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: .8rem;
}

.tile {
  display: flex; flex-direction: column;
  min-height: 13.25rem;
  padding: 1rem 1rem .85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: border-color .18s ease, box-shadow .22s var(--ease), transform .22s var(--ease);
}
a.tile:hover {
  text-decoration: none;
  border-color: var(--ember);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}
a.tile:hover .tile-body svg { stroke: var(--ember-deep); }
[data-theme="dark"] a.tile:hover { background: var(--panel-2); }
[data-theme="dark"] a.tile:hover .tile-body svg { stroke: var(--ember); }

.tile-head h3 {
  font-family: var(--sans);
  font-size: 1rem; font-weight: 600; line-height: 1.3;
  letter-spacing: -.006em;
  color: var(--heading);
  margin: 0 0 .18rem;
}
.tile-head p { margin: 0; font-size: .855rem; line-height: 1.4; color: var(--muted); max-width: none; }

.tile-body { flex: 1; display: flex; align-items: flex-end; padding-top: 1rem; }
.tile-body svg {
  width: 38px; height: 38px;
  stroke: var(--ember); stroke-width: 1.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .18s ease;
}

.tile-num {
  font-family: var(--display);
  font-size: 2.6rem; font-weight: 700; line-height: 1;
  letter-spacing: -.035em;
  color: var(--ember-deep);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .tile-num { color: var(--gold); }
.tile-num small {
  display: block; font-family: var(--sans);
  font-size: .8rem; font-weight: 400; letter-spacing: 0;
  color: var(--muted); margin-top: .35rem;
}

.tile-foot {
  margin-top: .85rem; padding-top: .58rem;
  border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--muted);
}

.tile-wide { grid-column: span 2; }
.tile-wide .tile-head p { max-width: 40ch; }

.tile-step .tile-num, [data-theme="dark"] .tile-step .tile-num { color: var(--ember); }

@media (max-width: 620px) {
  .launchpad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .tile { min-height: 10.75rem; padding: .85rem .85rem .75rem; border-radius: 8px; }
  .tile-head h3 { font-size: .92rem; }
  .tile-head p { font-size: .78rem; }
  .tile-body { padding-top: .7rem; }
  .tile-body svg { width: 28px; height: 28px; }
  .tile-num { font-size: 2rem; }
  .tile-foot { font-size: .74rem; margin-top: .7rem; }
}

/* ---------- Panels ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: .8rem;
}
.panels-wide { grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow);
}
.panel h3 { font-family: var(--display); font-size: 1.22rem; }
.panel p { margin-bottom: 0; max-width: none; }
.panel p + p { margin-top: .8rem; }

.cols { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cols > div { max-width: 34ch; }
.cols p { margin: 0; color: var(--text); }

.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li {
  padding: .5rem 0 .5rem 1.45rem;
  border-bottom: 1px solid var(--line);
  position: relative; color: var(--text); max-width: none;
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
}

.ledger { margin: 0; padding: 0; list-style: none; }
.ledger > li {
  max-width: none;
  border-top: 1px solid var(--line);
  padding: 1.35rem 0;
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: .35rem var(--gap);
  align-items: start;
}
.ledger > li:last-child { border-bottom: 1px solid var(--line); }
.ledger h3 { margin: 0; font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.ledger p { margin: 0; }
@media (max-width: 760px) { .ledger > li { grid-template-columns: 1fr; } }

/* ---------- Accordion ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 2.5rem 1.05rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: .5rem; top: 1.5rem;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ember);
  border-bottom: 2px solid var(--ember);
  transform: rotate(45deg);
  transition: transform .22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.75rem; }
.faq summary:hover { color: var(--ember-deep); }
[data-theme="dark"] .faq summary:hover { color: var(--gold); }
.faq .answer { padding: 0 0 1.15rem; }
.faq .answer p { margin: 0; }
.faq details[open] .answer { animation: unfold .3s var(--ease); }
@keyframes unfold {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Callout ---------- */

.callout {
  background: var(--ink);
  color: #E6E6EC;
  border-radius: 12px;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  position: relative; overflow: hidden;
}
.callout::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(34rem 20rem at 92% -30%, rgba(232, 117, 73, .32), transparent 62%);
  pointer-events: none;
}
.callout > * { position: relative; z-index: 1; }
.callout h2 { color: #fff; margin-bottom: .35em; }
.callout p { color: #C9C9D4; margin-bottom: 0; }
.callout .btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.callout .btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: #fff; }

/* ---------- Form ---------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .89rem; font-weight: 500; margin-bottom: .35rem; color: var(--text); }
.field .req { color: var(--ember-deep); }
[data-theme="dark"] .field .req { color: var(--ember); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--heading);
  font: inherit; font-size: .96rem;
  padding: .7rem .8rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(232, 117, 73, .16);
  outline: none;
}
.hp { position: absolute; left: -9999px; }

.crumbs { font-size: .87rem; color: var(--muted); margin-bottom: 1.1rem; }
.crumbs a { color: var(--muted); }

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink);
  color: #9494A2;
  padding-block: 3rem 1.9rem;
  font-size: .92rem;
}
.foot-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1.3fr) repeat(auto-fit, minmax(9rem, 1fr));
  margin-bottom: 2.1rem;
}
.foot-grid h3 {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .01em; color: #fff; margin-bottom: .75rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .42rem; }
.foot-grid a, .site-foot a { color: #A5A5B3; }
.foot-grid a:hover, .site-foot a:hover { color: #fff; }
.foot-grid p { font-size: .92rem; max-width: 34ch; }
.foot-bar {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: space-between; font-size: .86rem;
}

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s var(--ease);
  transition-delay: var(--d, 0ms);
}

.hero h1, .hero .lede, .hero .actions, .hero .hero-meta, .hero .crumbs {
  animation: rise .7s var(--ease) both;
}
.hero .crumbs { animation-delay: .02s; }
.hero h1 { animation-delay: .12s; }
.hero .lede { animation-delay: .22s; }
.hero .actions { animation-delay: .32s; }
.hero .hero-meta { animation-delay: .42s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}
