/* site/styles/app.css */
*, *::before, *::after { box-sizing: border-box; }
/* clip (not hidden) so decorative atmosphere never contributes to scroll width
   and never creates a scroll container at any width */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Subtle film grain for atmosphere. Fixed and behind everything, so it never adds
   scroll. The accent atmosphere is carried solely by the hero glow (the one
   sanctioned gradient); depth elsewhere comes from solid surfaces + shadow. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.035; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  position: relative; z-index: 2;
}
.topbar__mark {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: 0.04em; color: var(--color-text-faint); font-size: var(--text-xs);
  text-transform: lowercase;
}
.topbar__mark:hover { color: var(--color-text-muted); }

.stage {
  flex: 1; width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-block: var(--space-section) var(--space-section-tight);
  padding-inline: var(--space-5);
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 2;
}

/* ---- hero: emblem + wordmark read as one tight unit, then a wide beat ---- */
.hero {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: var(--space-hero); text-align: center;
  margin-bottom: var(--space-section);
}
/* focal light: a centered radial that sits behind the whole hero. Constrained so
   it cannot exceed the viewport. The only gradient on the page, used as atmosphere. */
.hero__glow {
  position: absolute; z-index: -1;
  left: 50%; top: 38%;
  width: min(120vw, 760px); aspect-ratio: 1.35 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--color-accent-glow), transparent 72%);
  opacity: 0.9;
  filter: blur(14px);
}
.emblem {
  width: clamp(86px, 17vw, 132px); height: auto; color: var(--color-accent);
  filter: drop-shadow(0 6px 26px var(--color-accent-glow));
  will-change: transform;
}
.emblem__body,
.emblem__tail { fill: currentColor; }

.wordmark {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-wordmark); line-height: 0.92; letter-spacing: -0.035em;
  text-wrap: balance;
  font-feature-settings: "ss01";
}
/* "studios" reads as a deliberate, quieter suffix: lighter, slightly smaller,
   gently tracked so it sits as a secondary clause, not a second word of equal weight */
.wordmark__suffix {
  color: var(--color-text-faint);
  font-weight: 400;
  font-size: 0.84em;
  letter-spacing: -0.01em;
}

/* ---- featured card: real internal hierarchy + designed elevation/states ---- */
.card {
  width: 100%; max-width: 30rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon eyebrow"
    "icon title"
    "icon desc"
    "action action";
  column-gap: var(--space-4); row-gap: 2px;
  align-items: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  /* measured beat from the card down to the waitlist (tighter than the hero beat) */
  margin-bottom: var(--space-section-tight);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-hairline);
  box-shadow:
    0 1px 0 0 oklch(100% 0 0 / 0.06) inset,
    0 24px 50px -28px oklch(0% 0 0 / 0.7);
  /* animate transform/opacity only; color + shadow shifts apply with the lift */
  transition: transform var(--dur-normal) var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--color-hairline-strong);
  box-shadow:
    0 1px 0 0 oklch(100% 0 0 / 0.08) inset,
    0 34px 64px -28px oklch(0% 0 0 / 0.78);
}
/* keyboard focus anywhere inside the card lifts it too, so focus and hover agree */
.card:focus-within {
  border-color: var(--color-hairline-strong);
}
.card__icon {
  grid-area: icon;
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px oklch(100% 0 0 / 0.06), 0 8px 18px -8px oklch(0% 0 0 / 0.6);
}
.card__text { display: contents; }
.card__eyebrow {
  grid-area: eyebrow;
  margin: 0 0 4px; font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent);
}
.card__title {
  grid-area: title;
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-lg); line-height: 1.1; letter-spacing: -0.02em;
}
.card__desc {
  grid-area: desc;
  margin: 4px 0 0; color: var(--color-text-muted); font-size: var(--text-sm);
  line-height: 1.45;
}
.card .btn {
  grid-area: action;
  margin-top: var(--space-4);
  justify-self: start;
}

/* ---- buttons: considered hover / focus-visible / active on every control.
   Only transform + opacity are transitioned. The hover wash is an overlay that
   fades via opacity, so the color feedback is smooth without animating color. ---- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7em 1.35em; border-radius: var(--radius-pill);
  font: inherit; font-weight: 500; letter-spacing: -0.005em;
  line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--color-hairline-strong);
  background: oklch(100% 0 0 / 0.015);
  color: var(--color-text);
  transition: transform var(--dur-press) var(--ease-out);
}
/* hover wash overlay (accent tint), fades in via opacity */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: oklch(70% 0.17 252 / 0.12);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); border-color: var(--color-accent); }
  .btn:hover::before { opacity: 1; }
}
.btn:active { transform: scale(0.975); }
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--color-accent);
  color: oklch(20% 0.04 264);
  border-color: transparent;
  font-weight: 600;
}
/* primary hover: brighter accent wash on top of the solid accent */
.btn--primary::before { background: var(--color-accent-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { border-color: transparent; }
}
.btn[aria-busy="true"] {
  pointer-events: none;
  color: oklch(20% 0.04 264 / 0.75);
  animation: btn-pulse 1.1s var(--ease-out) infinite alternate;
}
@keyframes btn-pulse { from { opacity: 0.78; } to { opacity: 0.95; } }

/* ---- waitlist ---- */
.waitlist {
  width: 100%; max-width: 30rem; text-align: center;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.waitlist__title {
  margin: 0; font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-lg); letter-spacing: -0.02em; text-wrap: balance;
}
/* the form is one tactile pill: input + button share a rounded surface,
   and a focus-within ring treats the pair as a single field */
.waitlist__form {
  display: flex; gap: var(--space-2);
  padding: 5px; border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-hairline);
}
/* focus indicator appears instantly (correct for focus rings); no color tween */
.waitlist__form:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.waitlist__input {
  flex: 1; min-width: 0;
  padding: 0.7em 1em;
  border-radius: var(--radius-pill);
  border: 0; background: transparent;
  color: var(--color-text); font: inherit; letter-spacing: -0.005em;
}
.waitlist__input::placeholder { color: var(--color-text-faint); }
.waitlist__input:focus { outline: none; }
.waitlist__form .btn { flex: none; }
.waitlist__status {
  margin: 0; min-height: 1.25rem; font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.waitlist__status[data-state="success"] {
  color: var(--color-accent-strong);
  animation: status-in var(--dur-normal) var(--ease-out);
}
.waitlist__status[data-state="error"] {
  color: oklch(74% 0.16 25);
  animation: status-in var(--dur-normal) var(--ease-out);
}
@keyframes status-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* ---- footer ---- */
.footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  color: var(--color-text-faint); font-size: var(--text-xs);
  letter-spacing: -0.005em;
}

/* ===== motion: purposeful, subtle, distinct per element (no uniform reflex) ===== */

/* emblem leads: it scales up from near-full (never from 0) and fades, then settles
   into a slow glide (realized by the compound .emblem rule further below). */
.wordmark { animation: rise-word var(--dur-slow) var(--ease-out-expo) 90ms both; }
.card { animation: rise var(--dur-slow) var(--ease-out-expo) 200ms both; }
.waitlist { animation: rise var(--dur-slow) var(--ease-out-expo) 300ms both; }

@keyframes emblem-in {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-word {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* slow emblem glide: starts only after the entrance has settled, so the two
   animations on .emblem do not fight. ease-in-out for natural on-screen drift. */
.emblem {
  animation:
    emblem-in var(--dur-slow) var(--ease-out-expo) both,
    glide 7.5s ease-in-out 1s infinite;
}
@keyframes glide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (max-width: 30rem) {
  .waitlist__form { flex-direction: column; padding: var(--space-2); }
  .waitlist__input { text-align: center; }
}

/* reduced motion: kill all movement. No translate/scale/loop, no transform transitions. */
@media (prefers-reduced-motion: reduce) {
  .emblem, .wordmark, .card, .waitlist,
  .btn, .btn[aria-busy="true"],
  .waitlist__status[data-state] {
    animation: none !important;
  }
  .card, .btn, .btn::before { transition: none; }
  .btn:hover, .btn:active, .card:hover { transform: none; }
  .emblem { will-change: auto; }
}
