/* Alphasyn public website -- layout layer.
   The design kit (design/) owns tokens, elements, and components; this file adds
   page scaffolding, the responsive breakpoints the kit deliberately omits
   (DESIGN.md: stack at 720px, cap content at 1080px), and the site's motion
   system. No new colors, no new shadows (the console window carries the kit's
   one --shadow-soft as the page's single floating element). */

:root {
  --space-section: 96px;
  --wrap: 1080px;
  --wrap-wide: 1160px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.55s;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: 76px; }

::selection { background: var(--clay-weak); color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, button:focus-visible { border-radius: 999px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 30px; }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 30px; }

/* ---- button-styled links (kit button declarations, anchor semantics) ---- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  border: none; border-radius: 999px; padding: 9px 18px;
  background: var(--clay); color: #fff; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--clay-hover); color: #fff; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--ink-2); border: 1px solid var(--border-strong); }
.btn.secondary:hover { background: var(--panel); color: var(--ink-2); }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; padding-bottom: 13px; }
.topbar .brand a, a.brand-link { color: var(--ink); text-decoration: none; }
.brand-lockup { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-lockup:hover { text-decoration: none; }
.brand-lockup .brand { gap: 0; }
.brand-mark { display: block; flex: none; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a:not(.btn) { color: var(--ink-2); font-size: 13.5px; font-weight: 500; transition: color 0.15s ease; }
.topnav a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* mobile nav drawer (details/summary: works without JS) */
.nav-drawer { display: none; position: relative; }
.nav-drawer summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: 7px; border-radius: 8px; color: var(--ink); }
.nav-drawer summary::-webkit-details-marker { display: none; }
.nav-drawer[open] summary { background: var(--panel); }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 8px;
}
.nav-panel a:not(.btn) { display: block; padding: 10px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); border-radius: 8px; }
.nav-panel a:not(.btn):hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.nav-panel .btn { display: block; text-align: center; margin: 8px 4px 4px; }

/* login / platform-waitlist popover (details: works without JS) */
.login-pop { position: relative; }
.login-pop > summary { list-style: none; cursor: pointer; }
.login-pop > summary::-webkit-details-marker { display: none; }
.login-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20;
  width: 300px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 16px;
}
.login-panel p { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 6px 0 12px; }
.login-panel button { width: 100%; margin-top: 4px; }
.login-panel .toast { margin: 0; }

/* ---- hero ---- */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 4.6vw, 56px); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.06; margin: 0 0 18px; max-width: 17ch;
  text-wrap: balance;
}
.hero .prose { font-size: 17.5px; line-height: 1.6; max-width: 52ch; margin: 0 0 26px; }
.hero-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.hero-proof {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-2);
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row button { margin-top: 0; }

/* ---- console mock (the page's one floating element) ---- */
.console { margin: 0; }
.console-window {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft);
}
.console-chrome { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--border); }
.console-chrome .brand { font-size: 15px; }
.console-chrome .meta { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.console-body { background: var(--panel); padding: 14px; }
.console-body .card { margin-bottom: 10px; padding: 14px 16px; }
.console-body .card:last-child { margin-bottom: 0; }
.console-toast-slot { min-height: 42px; margin-bottom: 10px; }
.console-toast-slot .toast { margin-bottom: 0; }
.console-title-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.console-name { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.console-caption { font-size: 12px; color: var(--muted); margin-top: 10px; }

html.js .console-toast-slot .toast { transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
html.js .console.rewound .console-toast-slot .toast { opacity: 0; transform: translateY(-6px); }
@keyframes chip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.pulse { animation: chip-pulse 0.9s ease 1; }

/* ---- sections ---- */
.section { padding: var(--space-section) 0; border-top: 1px solid var(--border); }
.section h2 {
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 34px); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 14px; max-width: 24ch;
  text-wrap: balance;
}
.section .lede { margin: 0 0 32px; }
.section-cta { margin: 24px 0 0; font-size: 14px; }

/* numbered research-report kicker */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--faint); font-weight: 700; margin: 0 0 12px;
}
.kicker .no { font-variant-numeric: tabular-nums; }
.kicker .rule { width: 24px; height: 1px; background: var(--border-strong); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-3 .card { margin-bottom: 0; }
.card p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.card p + p { margin-top: 8px; }

/* one italic serif aside, footnote register */
.aside-note { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--muted); margin: 16px 0 0; max-width: var(--max-copy); }

/* ---- founder ---- */
.founder-sig { margin-top: 24px; }
.founder-name { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink); }
.founder-role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 700; margin-top: 3px; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 48px; align-items: start; }
.next-steps { max-width: 420px; }
.next-step { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.next-step:last-child { border-bottom: 1px solid var(--border); }
.next-step .no { font-variant-numeric: tabular-nums; color: var(--faint); font-weight: 600; }
.form-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* ---- resources hub + articles ---- */
.crumbs { font-size: 12.5px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

.resource-card { transition: border-color 0.15s ease; }
.resource-card:hover { border-color: var(--border-strong); }
.resource-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.resource-card h3 a { color: var(--ink); }
.resource-card h3 a:hover { color: var(--clay-ink); text-decoration: none; }
.resource-more { font-size: 13px; margin-top: 10px; }
.resource-meta { font-size: 11.5px; color: var(--faint); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.article-head { padding: 40px 0 8px; }
.article-head h1 {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.18; margin: 8px 0 12px; max-width: 26ch;
  text-wrap: balance;
}
.article-body { font-family: var(--serif); font-size: 16px; line-height: 1.7; color: #2B2925; max-width: var(--max-copy); padding-bottom: 24px; }
.article-body h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; margin: 40px 0 10px; border-top: 1px solid var(--border); padding-top: 24px; }
.article-body h3 {
  font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); font-weight: 700; margin: 24px 0 8px;
}
.article-body p { margin: 10px 0; }
.article-body ul { padding-left: 20px; }
.article-body li { margin: 6px 0; }
.article-body .card { font-family: var(--sans); }
.article-foot { border-top: 1px solid var(--border); padding: 20px 0 40px; }

.table-scroll { overflow-x: auto; }
.table-scroll table.table { min-width: 520px; }

/* ---- footer folio ---- */
.footer { border-top: 1px solid var(--border); margin-top: var(--space-section); padding: 26px 0 46px; }
.footer nav { display: flex; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.footer nav a { color: var(--muted); font-size: 12.5px; }
.footer nav a:hover { color: var(--ink); }
.folio { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.folio .line { font-size: 12.5px; color: var(--muted); }

/* ---- scroll-reveal (JS-gated: no-JS never hides content) ---- */
html.js .reveal { opacity: 0; transform: translateY(12px); }
html.js .reveal.in {
  opacity: 1; transform: translateY(0);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
html.js .reveal.d1.in { transition-delay: 80ms; }
html.js .reveal.d2.in { transition-delay: 160ms; }
html.js .reveal.d3.in { transition-delay: 240ms; }
html.js .reveal.d4.in { transition-delay: 320ms; }

/* ---- breakpoints (the kit ships none; the site owns these) ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .console { max-width: 560px; }
}
@media (max-width: 720px) {
  :root { --space-section: 56px; }
  .wrap, .wrap-wide { padding: 0 20px; }
  .grid-3, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 .card, .two-col .card { margin-bottom: 0; }
  /* mobile topbar: brand + Log in + hamburger; full nav lives in the drawer */
  .topnav > a:not(.btn) { display: none; }
  .topnav > .btn:not(.secondary) { display: none; }
  .nav-drawer { display: block; }
  .hero { padding: 44px 0 40px; }
  .next-steps { max-width: none; }
}

/* ---- reduced motion: everything renders, nothing moves ---- */
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .console, .console * { transition: none !important; animation: none !important; }
}
