/* Herald landing — Atelier / Truora brand. Tokens are vendored verbatim
   from the Atelier design system; this file only references them.
   Design intent: one action per screen, generous space, few elements. */

@import url('./tokens/fonts.css');
@import url('./tokens/colors.css');
@import url('./tokens/typography.css');
@import url('./tokens/spacing.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body, section, footer { overflow-x: clip; }
body {
  margin: 0;
  font: var(--body-font);
  color: var(--text-body);
  background: var(--midnight);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--violet-100); color: var(--midnight); }
:where(a, button, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--violet-300); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }
.wrap.narrow { max-width: 520px; }
.overline { font: var(--overline-font); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--violet-300); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 var(--space-8);
  border-radius: var(--radius-pill); border: 0;
  font: var(--weight-medium) var(--text-base)/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
/* Naranja = the page's single action. Midnight label (≈7:1); white fails AA. */
.btn-cta { background: var(--cta); color: var(--midnight); }
.btn-cta:hover { background: var(--orange-300); }
.btn-ghost { background: transparent; color: var(--on-midnight); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: var(--glass-fill-strong); }
.link-quiet { background: none; border: 0; padding: var(--space-2); font: var(--small-font); color: var(--neutral-400); cursor: pointer; }
.link-quiet:hover { color: var(--on-midnight); }

/* ---------- Glass + brand shape ---------- */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-highlight);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.shape { position: absolute; background: var(--brand); border-radius: var(--radius-2xl); z-index: 0; }

/* ---------- Hero ---------- */
.dark { color: var(--neutral-200); overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-6) var(--space-6); }
.topbar form { margin: 0; }
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--on-midnight); text-decoration: none; font: var(--weight-medium) var(--text-md)/1 var(--font-display); }
.brand img { border-radius: var(--radius-xs); }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; min-height: calc(100vh - 88px); min-height: calc(100dvh - 88px); padding-top: var(--space-8); padding-bottom: var(--space-24); }
.hero h1 { font: var(--weight-medium) clamp(3rem, 6.4vw, var(--text-5xl))/1 var(--font-display); letter-spacing: -0.025em; color: var(--on-midnight); margin: var(--space-5) 0 var(--space-6); }
.hero h1 em { font-style: normal; color: var(--violet-300); }
.hero .lead { font: var(--weight-light) var(--text-md)/1.55 var(--font-sans); color: var(--neutral-300); max-width: 30rem; margin-bottom: var(--space-10); }

.hero-visual { position: relative; }
.hero-visual .shape { width: 55%; height: 60%; right: -6%; top: -6%; transform: rotate(8deg); }
.graph-pane { position: relative; z-index: 1; padding: var(--space-6); }
.graph { display: block; width: 100%; height: auto; }
.graph .edge { stroke: var(--neutral-600); stroke-width: 1.2; }
.graph .edge.hot { stroke: var(--violet-300); stroke-width: 1.6; stroke-dasharray: 4 6; animation: flow 1.6s linear infinite; }
.graph .n-you { fill: var(--on-midnight); }
.graph .n-person { fill: var(--lightblue-300); }
.graph .n-meeting { fill: var(--violet-300); }
.graph .n-topic { fill: var(--neutral-25); fill-opacity: 0.18; stroke: var(--neutral-300); stroke-width: 1.2; }
.graph text { font-family: var(--font-sans); font-size: 13px; fill: var(--neutral-200); }
.graph text.you { fill: var(--midnight); font-weight: var(--weight-semibold); font-size: 14px; }
.graph .pulse { fill: none; stroke: var(--on-midnight); stroke-opacity: 0.35; animation: pulse 3.2s var(--ease-out) infinite; transform-origin: 260px 200px; }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes pulse { 0% { transform: scale(1); stroke-opacity: 0.4; } 100% { transform: scale(2.2); stroke-opacity: 0; } }

.ask-card {
  position: absolute; z-index: 2; left: -8%; bottom: -14%; width: min(300px, 70%);
  padding: var(--space-4) var(--space-5); background: var(--neutral-800);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius-sm); box-shadow: var(--shadow-xl);
}
.ask-card .q { font-size: var(--text-sm); color: var(--on-midnight); font-weight: var(--weight-medium); }
.ask-card .a { margin: var(--space-2) 0 var(--space-3); font-size: var(--text-sm); line-height: 1.5; color: var(--neutral-300); }
.chip { display: inline-block; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); line-height: 1.6; background: var(--glass-fill-strong); color: var(--neutral-100); }

/* ---------- Pillars (light band) ---------- */
section.band { padding: var(--space-24) 0; }
.pillars-band { background: var(--surface-page); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12); }
.pillar .icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--brand-subtle); display: grid; place-items: center; margin-bottom: var(--space-5); }
.pillar .icon svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pillar h2 { font: var(--h3-font); color: var(--brand); }
.pillar p { margin-top: var(--space-2); font: var(--weight-light) var(--text-md)/1.5 var(--font-sans); color: var(--text-body); max-width: 20rem; }
.trust { margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--border-subtle); font-size: var(--text-sm); color: var(--text-muted); text-align: center; }

/* ---------- Waitlist ---------- */
.waitlist { color: var(--neutral-200); }
.form-holder { position: relative; }
.form-holder .shape { width: 60%; height: 70%; left: -8%; top: -8%; transform: rotate(-6deg); }
.form-pane { position: relative; z-index: 1; padding: var(--space-10); }
.form-pane h2 { font: var(--h2-font); color: var(--on-midnight); }
.form-pane .sub { margin-top: var(--space-3); color: var(--neutral-300); }
.identity { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-8) 0 var(--space-6); }
.identity .avatar { flex: none; width: 36px; height: 36px; border-radius: var(--radius-circle); background: var(--lightblue-300); color: var(--midnight); display: grid; place-items: center; font-weight: var(--weight-semibold); }
.identity .id-text { display: flex; flex-direction: column; min-width: 0; }
.identity .name { color: var(--on-midnight); font-size: var(--text-sm); }
.identity .mail { color: var(--neutral-400); font-family: var(--font-mono); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; }
.form-pane label { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--neutral-200); margin-bottom: var(--space-2); }
.form-pane .opt { color: var(--neutral-500); }
.form-pane textarea {
  display: block; width: 100%; resize: vertical;
  font: var(--weight-regular) var(--text-base)/1.45 var(--font-sans);
  color: var(--on-midnight); background: var(--neutral-800);
  border: 1px solid var(--neutral-600); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.form-pane textarea::placeholder { color: var(--neutral-500); }
.form-pane textarea:focus { border-color: var(--violet-300); outline: none; box-shadow: var(--shadow-focus); }
.form-pane .btn-cta { width: 100%; margin-top: var(--space-6); }

.joined { display: none; }
.joined .check { width: 48px; height: 48px; border-radius: var(--radius-circle); background: var(--success-500); display: grid; place-items: center; margin-bottom: var(--space-6); }
.joined .check svg { width: 24px; height: 24px; stroke: var(--neutral-0); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.joined p { margin-top: var(--space-3); color: var(--neutral-300); }
body[data-joined="true"] .joined { display: block; }
body[data-joined="true"] .join-form { display: none; }
body[data-joined="true"] .when-open { display: none; }
body[data-joined="false"] .when-joined { display: none; }

footer { color: var(--neutral-500); font-size: var(--text-sm); text-align: center; padding: 0 0 var(--space-12); }

/* ---------- Gate + message (single-card screens) ---------- */
.stage { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--space-6); position: relative; overflow: hidden; }
.stage .shape.a { width: 360px; height: 360px; left: calc(50% - 320px); top: calc(50% - 260px); transform: rotate(12deg); }
.stage .shape.b { width: 140px; height: 140px; right: calc(50% - 280px); bottom: calc(50% - 250px); background: var(--lightblue-300); border-radius: var(--radius-xl); transform: rotate(-10deg); }
.card { position: relative; z-index: 1; width: min(420px, 100%); padding: var(--space-12) var(--space-8); text-align: center; color: var(--neutral-200); }
.card .logo { height: 22px; width: auto; }
.card .mark { width: 64px; height: 64px; border-radius: var(--radius-md); margin: var(--space-10) auto var(--space-5); display: block; }
.card h1 { font: var(--h1-font); color: var(--on-midnight); }
.card .tag { margin-top: var(--space-3); font: var(--body-light-font); color: var(--neutral-200); }
.card .why { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--neutral-400); }
.card .gis { margin-top: var(--space-8); display: flex; justify-content: center; min-height: 44px; }
.card .fallback { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--neutral-400); }
.card .btn { margin-top: var(--space-8); }
.card .body { margin-top: var(--space-4); color: var(--neutral-200); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: var(--space-12); padding-top: var(--space-10); }
  .ask-card { left: auto; right: var(--space-4); bottom: -10%; }
  .pillars { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); }
}
@media (max-width: 560px) {
  .wrap, .topbar { padding-left: var(--space-4); padding-right: var(--space-4); }
  .hero .btn-cta { width: 100%; }
  .ask-card { position: relative; right: auto; bottom: auto; width: 100%; margin-top: var(--space-4); }
  section.band { padding: var(--space-16) 0; }
  .form-pane { padding: var(--space-6); }
  .stage .shape.a { width: 240px; height: 240px; left: -60px; top: 12%; }
  .stage .shape.b { right: -30px; bottom: 10%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
