/* Autonomic Studio — marketing site. Dark theme. Tokens copied verbatim from
   apps/web/src/design.css so this site and the app read as one product. Self-contained. */

/* ============ TOKENS (dark) ============ */
:root {
  --bg: #0a0705;
  --bg-grad-top: #110c08;
  --panel: #0e0a07;
  --card: #14100b;
  --card-2: #1a140d;
  --elevated: #221911;
  --hairline: #281c14;
  --hairline-2: #3a291d;

  --fg: #f6eee9;
  --fg-soft: #d4c4ba;
  --muted: #9c857a;
  --faint: #6a534a;

  /* brick — the signature accent */
  --accent: #cd6b4f;
  --accent-hi: #de8268;
  --accent-press: #b5573d;
  --accent-ghost: rgba(205, 107, 79, 0.16);
  --accent-line: rgba(205, 107, 79, 0.42);
  --accent-glow: rgba(205, 107, 79, 0.4);

  --gold: #d9a05b;

  --green: #4fbf8b;
  --green-bg: rgba(79, 191, 139, 0.14);
  --green-fg: #8fe6bb;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --glow-top: rgba(205, 108, 79, 0.12);
  --glow-2: rgba(217, 160, 91, 0.06);

  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

/* Signature background: brick glow top-right + gold glow top-left over a vertical
   gradient, painted on a fixed layer so it stays put while content scrolls. A fixed
   layer (not background-attachment: fixed) is robust on iOS Safari and composites
   correctly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 78% -8%, var(--glow-top), transparent 60%),
    radial-gradient(900px 500px at 8% -2%, var(--glow-2), transparent 55%),
    linear-gradient(180deg, var(--bg-grad-top), var(--bg) 320px);
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.12;
}
h2 { font-size: 32px; letter-spacing: -0.025em; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); }
.soft { color: var(--fg-soft); }
.accent-text { color: var(--accent-hi); }

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

/* Visible focus rings for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ LAYOUT ============ */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}
.section {
  padding-block: 96px;
}
.section-sm { padding-block: 64px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hi);
}
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin-top: 14px; }
.section-head p { color: var(--fg-soft); font-size: 17px; margin-top: 14px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ============ THE "A" MARK ============ */
.mark {
  border-radius: 8px;
  flex: none;
  background: linear-gradient(140deg, var(--accent-hi), var(--accent) 60%, var(--accent-press));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 6px 16px var(--accent-glow);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}
.mark-sm { width: 30px; height: 30px; font-size: 15px; }
.mark-lg { width: 44px; height: 44px; border-radius: 11px; font-size: 22px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--hairline-2);
  background: var(--card-2);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: background .22s var(--ease), border-color .22s var(--ease),
    color .22s, box-shadow .22s var(--ease), transform .18s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.btn:hover {
  background: var(--elevated);
  border-color: var(--accent-line);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0) scale(0.98); transition-duration: .07s; }
.btn .ico { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 18px var(--accent-glow);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent-press));
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 26px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--accent-ghost); color: var(--fg); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-hover {
  transition: border-color .22s var(--ease), transform .22s var(--ease),
    background .22s, box-shadow .22s var(--ease);
}
.card-hover:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

/* ============ BADGE / PILL ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-hi);
  background: var(--accent-ghost);
  border: 1px solid var(--accent-line);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ============ ICON TILE ============ */
.itile {
  width: 42px; height: 42px;
  border-radius: 11px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--card-2);
  border: 1px solid var(--hairline-2);
  color: var(--accent-hi);
}
.itile .ico { width: 21px; height: 21px; }
.ico { stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand .name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.cta-short { display: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.nav-links a {
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: background .16s var(--ease), color .16s;
}
.nav-links a:hover { background: var(--accent-ghost); color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { height: 40px; }

/* ============ HERO ============ */
.hero { padding-block: 88px 84px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-top: 24px;
  max-width: 15ch;
}
.hero .sub {
  color: var(--fg-soft);
  font-size: 19px;
  line-height: 1.55;
  margin-top: 22px;
  max-width: 46ch;
}
.hero-form { margin-top: 32px; max-width: 480px; }
.hero .login-line {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
}
.hero .login-line a { color: var(--accent-hi); font-weight: 600; }

/* ============ WAITLIST FORM ============ */
.waitlist { position: relative; }
.wl-row {
  display: flex;
  gap: 10px;
}
.wl-fields { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.input {
  height: 48px;
  width: 100%;
  padding: 0 15px;
  background: var(--card);
  border: 1px solid var(--hairline-2);
  border-radius: 9px;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-ghost); }
.wl-privacy { margin-top: 12px; color: var(--faint); font-size: 12.5px; }
.wl-privacy a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* Honeypot — visually hidden but present for bots */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Inline notice (PENDING / error) */
.wl-notice {
  display: none;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--accent-ghost);
  border: 1px solid var(--accent-line);
  color: var(--fg-soft);
  font-size: 14px;
  align-items: center;
  gap: 10px;
}
.wl-notice.show { display: flex; }
.wl-notice .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 8px var(--accent-glow); }

/* Success panel */
.form-success {
  display: none;
  padding: 22px 22px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--green-bg);
  box-shadow: var(--shadow);
}
.form-success.show { display: block; }
.form-success .check {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--green-bg); color: var(--green-fg);
  margin-bottom: 14px;
}
.form-success h3 { color: var(--fg); }
.form-success p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* ============ HERO VISUAL (CSS package cluster) ============ */
.hero-visual { position: relative; }
.pkg-stage {
  position: relative;
  border-radius: 20px;
  padding: 26px;
  background:
    radial-gradient(500px 320px at 78% 6%, var(--accent-ghost), transparent 62%),
    linear-gradient(165deg, var(--panel), var(--bg) 78%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.pkg-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 200px at 88% 96%, var(--glow-2), transparent 65%);
  pointer-events: none;
}
.pkg-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}
.pkg-head .title { font-weight: 600; font-size: 14.5px; }
.pkg-head .badge-live {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--green-bg); color: var(--green-fg);
  font-size: 11.5px; font-weight: 600;
}
.pkg-head .badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pkg-tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 11px;
  padding: 14px 13px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pkg-tile .pi {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--hairline-2);
  color: var(--accent-hi);
}
.pkg-tile .pi .ico { width: 16px; height: 16px; }
.pkg-tile .pl { font-size: 12.5px; font-weight: 500; color: var(--fg-soft); line-height: 1.35; }
.pkg-tile.span2 { grid-column: span 2; }
.pkg-tile.feature {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border-color: var(--accent-line);
}
.pkg-tile.feature .pi { background: linear-gradient(140deg, var(--accent-hi), var(--accent) 60%, var(--accent-press)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px var(--accent-glow); }
.pkg-tile .tag-mini {
  position: absolute; top: 11px; right: 11px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-hi);
}
.pkg-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding-top: 15px;
  border-top: 1px solid var(--hairline);
}
.pkg-foot .bar { flex: 1; height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.pkg-foot .bar > i { display: block; height: 100%; width: 82%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); box-shadow: 0 0 12px var(--accent-glow); }
.pkg-foot .pct { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ============ PROBLEM ============ */
.problem { text-align: center; }
.problem .big {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  max-width: 20ch;
  margin: 0 auto;
}
.problem .big .accent-text { color: var(--accent-hi); }
.problem .sub { color: var(--muted); font-size: 17px; margin-top: 22px; max-width: 52ch; margin-inline: auto; }

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.step { padding: 20px 18px; position: relative; }
.step .itile { margin-bottom: 15px; }
.step .st-num {
  position: absolute; top: 18px; right: 18px;
  font-size: 12px; font-weight: 600; color: var(--faint);
}
.step h3 { font-size: 16px; }
.step p { color: var(--muted); font-size: 13.5px; margin-top: 8px; line-height: 1.5; }

.package-callout {
  margin-top: 40px;
  padding: 32px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}
.package-callout h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.package-callout .lead { color: var(--fg-soft); font-size: 16px; margin-top: 12px; line-height: 1.55; }
.deliverables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}
.deliverable {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14.5px;
  color: var(--fg-soft);
}
.deliverable .dv-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--hairline-2);
  color: var(--accent-hi);
}
.deliverable .dv-ico .ico { width: 15px; height: 15px; }

/* ============ AAP ============ */
.aap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.aap-col { padding: 28px 26px; display: flex; flex-direction: column; }
.aap-col .kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-hi);
}
.aap-col h3 { font-size: 21px; font-weight: 700; margin-top: 12px; letter-spacing: -0.02em; }
.aap-col p { color: var(--muted); font-size: 15px; margin-top: 12px; line-height: 1.55; }
.aap-col .itile { margin-bottom: 20px; }
.aap-col.preserve { border-color: var(--accent-line); background: linear-gradient(170deg, var(--card-2), var(--card)); }

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature { padding: 24px 22px; }
.feature .itile { margin-bottom: 16px; }
.feature h3 { font-size: 16.5px; }
.feature p { color: var(--muted); font-size: 14px; margin-top: 9px; line-height: 1.5; }
.feature.wide { grid-column: span 1; }

/* ============ FOUNDING BAND ============ */
.founding {
  padding: 48px;
  text-align: center;
  background:
    radial-gradient(600px 320px at 50% -10%, var(--accent-ghost), transparent 62%),
    linear-gradient(165deg, var(--panel), var(--card) 90%);
  border: 1px solid var(--accent-line);
}
.founding .eyebrow { justify-content: center; }
.founding h2 { margin-top: 16px; font-size: 34px; max-width: 20ch; margin-inline: auto; }
.founding p { color: var(--fg-soft); font-size: 17px; margin-top: 18px; max-width: 54ch; margin-inline: auto; }
.founding .btn { margin-top: 28px; }

/* ============ WAITLIST SECTION ============ */
.waitlist-section .wrap {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}
.waitlist-section .card-form {
  margin-top: 36px;
  padding: 32px;
  text-align: left;
}
.waitlist-section .card-form .field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-soft);
  margin-bottom: 7px;
}
.waitlist-section .card-form .field { margin-bottom: 16px; }
.waitlist-section .card-form .btn { margin-top: 6px; }

/* ============ FAQ ============ */
.faq { max-width: 760px; margin-inline: auto; }
.faq-item {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: var(--accent-line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  margin-left: auto;
  flex: none;
  color: var(--muted);
  transition: transform .24s var(--ease), color .2s;
}
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--accent-hi); }
.faq-item .answer {
  padding: 0 22px 22px;
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 44px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.footer .brand .name { font-size: 15px; }
.footer .tagline { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.footer-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}
.footer-links a { color: var(--muted); font-size: 14px; transition: color .16s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  margin-top: 26px;
  color: var(--faint);
  font-size: 13px;
}

/* ============ SCROLL REVEAL ============
   Content is visible by default, so with JS off (or IntersectionObserver
   unavailable, or reduced-motion) nothing is ever hidden. The hiding only
   applies when <html class="anim"> is set synchronously in the head. */
.reveal { opacity: 1; transform: none; }
html.anim .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 46px; }
  .hero .sub, .hero-form { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .package-callout { grid-template-columns: 1fr; gap: 26px; }
  .aap-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .section { padding-block: 68px; }
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .brand .name { font-size: 15px; }
  .nav-actions .ghost-login { display: none; }
  .nav-actions .btn { height: 38px; padding: 0 13px; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  h2 { font-size: 27px; }
  .hero { padding-block: 56px 60px; }
  .hero h1 { font-size: 38px; }
  .hero .sub { font-size: 17px; }
  .problem .big { font-size: 24px; }
  .founding { padding: 34px 24px; }
  .founding h2 { font-size: 27px; }
  .features-grid { grid-template-columns: 1fr; }
  .deliverables { grid-template-columns: 1fr; }
  .wl-row { flex-direction: column; }
  .wl-row .btn { width: 100%; }
}

@media (max-width: 440px) {
  .steps { grid-template-columns: 1fr; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
}
