/* Wonderverse — home v2: grainy sky, black UI, sparkle mark */

:root {
  --bg: oklch(0.07 0 0);
  --surface: oklch(0.13 0 0);
  --line: oklch(1 0 0 / 0.12);
  --line-strong: oklch(1 0 0 / 0.22);
  --ink: oklch(0.965 0 0);
  --ink-2: oklch(0.78 0 0);
  --ink-3: oklch(0.66 0 0);

  /* sky palette, sampled from the faded film print */
  --sky: oklch(0.66 0.07 235);
  --sky-deep: oklch(0.48 0.08 240);
  --sky-pale: oklch(0.86 0.04 230);
  --cloud: oklch(0.97 0.005 230);
  --on-sky: oklch(0.16 0.015 240);
  --on-sky-2: oklch(0.28 0.03 240);

  --font-sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --font-serif: 'Castoro', 'Times New Roman', Georgia, serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 66ch;
  --z-scene: 0; --z-content: 1; --z-nav: 10;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--sky-pale); outline-offset: 4px; border-radius: 2px; }
.sky a:focus-visible { outline-color: var(--on-sky); }
img { display: block; max-width: 100%; }

/* ---------- Sky bands ---------- */

.sky {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--on-sky);
  background: var(--sky);
}
.sky__photo {
  position: absolute; inset: -4% 0;
  z-index: var(--z-scene);
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  animation: drift 40s linear infinite alternate;
}
.sky--hero .sky__photo { background-image: url("sky.jpg"); }
.sky--raise .sky__photo { background-image: url("sky-2.jpg"); background-position: center 45%; }

/* Animated film grain over the whole band */
.sky__grain {
  position: absolute; inset: -20%;
  z-index: var(--z-scene);
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
  animation: grain 0.9s steps(6) infinite;
}
.sky__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: var(--z-scene);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.sky.has-webgl .sky__canvas { opacity: 1; }
.sky.has-webgl .sky__photo, .sky.has-webgl .sky__grain { opacity: 0; transition: opacity 1.2s ease; }
.sky__inner { position: relative; z-index: var(--z-content); }

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

.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1.1rem, 2.5vw, 1.75rem) var(--gutter);
}
.site-header.is-static { position: relative; }
.wordmark { display: inline-flex; align-items: center; gap: 0.45rem; }
.wordmark__mark { width: auto; height: 1.6rem; }
.wordmark__text { width: auto; height: 1.15rem; }
.wordmark__text--dark { filter: brightness(0) opacity(0.92); }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: 0.9375rem; }
.site-nav a { opacity: 0.72; transition: opacity 0.3s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-header--dark { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  padding-bottom: clamp(6rem, 14vh, 9rem);
  display: grid;
  place-items: center;
  padding: clamp(6rem, 14vh, 9rem) var(--gutter) clamp(5rem, 12vh, 8rem);
}
.hero__inner {
  text-align: center; max-width: 54rem;
  display: grid; justify-items: center; gap: clamp(1.25rem, 3vw, 2rem);
}
.mark-hero {
  width: clamp(3.4rem, 5.5vw, 4.5rem); height: auto;
  filter: drop-shadow(0 6px 18px oklch(0.45 0.2 290 / 0.35));
  animation: rise 1.2s var(--ease-out-expo) both;
}
.headline {
  font-weight: 500;
  font-size: clamp(2.75rem, 8.5vw, 5.75rem);
  line-height: 1.02; letter-spacing: -0.03em;
  color: var(--on-sky);
}
.headline .line { display: block; animation: rise 1.2s var(--ease-out-expo) both; }
.headline .line:nth-child(1) { animation-delay: 0.1s; }
.headline .line:nth-child(2) { animation-delay: 0.28s; }
.headline .line:nth-child(3) { animation-delay: 0.46s; }
.headline .wonder {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.01em; font-size: 1.06em;
}
.lede {
  color: var(--on-sky-2);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem); font-weight: 500;
  max-width: 36rem; line-height: 1.55;
  animation: rise 1.2s var(--ease-out-expo) 0.7s both;
}
.hero__actions { display: grid; justify-items: center; gap: 0.9rem; margin-top: 0.5rem; animation: rise 1.2s var(--ease-out-expo) 0.9s both; }

.cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.4rem 0.9rem; border-radius: 999px;
  background: var(--on-sky); color: var(--cloud);
  font-weight: 500; font-size: 1rem;
  box-shadow: 0 12px 30px -14px oklch(0 0 0 / 0.6);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo), background 0.3s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px oklch(0 0 0 / 0.65); }
.cta__arrow { transition: transform 0.5s var(--ease-out-expo); }
.cta:hover .cta__arrow { transform: translateX(3px); }
.cta--light { background: var(--cloud); color: var(--on-sky); }

.hero__note { font-size: 0.875rem; color: var(--on-sky-2); }
.hero__note a { border-bottom: 1px solid oklch(0.16 0.015 240 / 0.4); }
.hero__note a:hover { border-color: var(--on-sky); }

/* ---------- Hero footer row ---------- */

.hero__footer {
  position: absolute; inset: auto 0 0 0;
  z-index: var(--z-nav);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1.25rem var(--gutter) max(1.25rem, env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  color: var(--on-sky-2);
}
.hero__footer .motto { font-family: var(--font-serif); font-style: italic; font-size: 0.95rem; text-align: center; }
.hero__footer .legal { display: flex; justify-content: flex-end; gap: 1.1rem; flex-wrap: wrap; }
.hero__footer a { border-bottom: 1px solid oklch(0.16 0.015 240 / 0.3); }
.hero__footer a:hover { color: var(--on-sky); border-color: var(--on-sky); }
@media (max-width: 640px) {
  .hero__footer { grid-template-columns: 1fr; text-align: center; gap: 0.4rem; }
  .hero__footer .legal { justify-content: center; }
  .hero__footer .motto { display: none; }
}

/* ---------- Products (black) ---------- */

.products { padding: clamp(5rem, 12vw, 8rem) var(--gutter); scroll-margin-top: 1rem; }
.products__inner { max-width: 68rem; margin-inline: auto; display: grid; gap: 1.5rem; }
.section-title { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 0.5rem; }
.section-title svg { width: 0.85rem; height: 0.85rem; color: var(--sky); }
.product-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
@media (min-width: 820px) { .product-list { grid-template-columns: 1.5fr 1fr; } }
.product {
  position: relative; border-radius: 1.25rem;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; overflow: hidden;
}
.product--featured::before {
  /* a strip of sky along the top of the featured card */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 7rem;
  background: url("sky.jpg") center 30% / cover;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
  mask-image: linear-gradient(to bottom, black, transparent);
  opacity: 0.55;
}
.product__link, .product--soon { position: relative; display: grid; align-content: start; gap: 0.6rem; padding: clamp(1.5rem, 3vw, 2.25rem); height: 100%; border-radius: inherit; }
.product--featured { transition: transform 0.6s var(--ease-out-expo), border-color 0.6s; }
.product--featured:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.product__tag { justify-self: start; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-sky); background: var(--cloud); padding: 0.25rem 0.6rem; border-radius: 999px; margin-bottom: 0.4rem; }
.product__name { font-family: var(--font-serif); font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.1; color: var(--ink); }
.product--soon .product__name { color: var(--ink-2); }
.product__desc { color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 34rem; }
.product__url { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9375rem; font-weight: 500; color: var(--sky-pale); }
.product__url svg { transition: transform 0.5s var(--ease-out-expo); }
.product--featured:hover .product__url svg { transform: translateX(3px); }

/* ---------- Team (black) ---------- */

.team { padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(5rem, 12vw, 9rem); scroll-margin-top: 1rem; }
.team__inner { max-width: 68rem; margin-inline: auto; display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.team__title { font-size: clamp(1.9rem, 3.8vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
.team__title .em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--sky-pale); letter-spacing: 0; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.person { display: grid; gap: 1.25rem; align-content: start; }
.person__figure { position: relative; margin: 0; isolation: isolate; }
.person__figure img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, black 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, black 52%, transparent 100%);
}
.person__body { display: grid; gap: 0.5rem; margin-top: -0.5rem; }
.person__name { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.01em; line-height: 1.1; }
.person__handle { color: var(--ink-3); font-size: 0.9375rem; }
.socials { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.socials a { display: inline-block; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 0.9rem; font-weight: 500; transition: color 0.4s, border-color 0.4s, background 0.4s; }
.socials a:hover { color: var(--on-sky); background: var(--cloud); border-color: var(--cloud); }

/* ---------- Raise (sky band) ---------- */

.raise {
  min-height: 80svh;
  display: grid; place-items: center;
  padding: clamp(6rem, 14vh, 9rem) var(--gutter);
  scroll-margin-top: 0;
}
.raise__inner { text-align: center; max-width: 44rem; display: grid; justify-items: center; gap: 1.5rem; }
.raise__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.01em; line-height: 1.08; color: var(--on-sky); }
.raise__copy { color: var(--on-sky-2); font-weight: 500; font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.6; max-width: 40rem; }
.placeholder { color: oklch(0.42 0.12 30); font-weight: 600; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem var(--gutter) max(1.75rem, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  font-size: 0.875rem; color: var(--ink-3);
}
.site-footer .motto { font-family: var(--font-serif); font-style: italic; font-size: 1rem; color: var(--ink-2); text-align: center; }
.site-footer .legal { display: flex; justify-content: flex-end; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a:hover { color: var(--ink); }
@media (max-width: 640px) { .site-footer { grid-template-columns: 1fr; text-align: center; gap: 0.75rem; } .site-footer .legal { justify-content: center; } }

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

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { from { transform: translateX(-1.5%) scale(1.04); } to { transform: translateX(1.5%) scale(1.04); } }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(-5%, -4%); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky__photo, .sky__grain, .mark-hero, .headline .line, .lede, .hero__actions { animation: none; }
  .sky__canvas, .sky.has-webgl .sky__photo, .sky.has-webgl .sky__grain { transition: none; }
  .cta, .cta__arrow, .product--featured { transition: none; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 640px) {
  .site-nav { gap: 1rem; }
  .site-nav a[href="#studio"], .site-nav a[href="#raise"] { display: none; }
}

/* ---------- Legal pages (black UI) ---------- */

.legal-page {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(5rem, 10vw, 8rem);
  isolation: isolate;
}
.legal-page::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 40vh;
  background: radial-gradient(ellipse 60% 80% at 50% -20%, oklch(0.66 0.07 235 / 0.22), transparent 70%);
  z-index: -1; pointer-events: none;
}
.legal { max-width: var(--measure); margin-inline: auto; }
.legal__head { display: grid; gap: 0.75rem; padding-bottom: 2rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.legal__head h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.legal__head h1 .swap { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 1.02em; }
.legal__meta { color: var(--ink-3); font-size: 0.9375rem; }
.legal ul.legal__toc { list-style: none; margin: 0 0 3.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.9375rem; color: var(--ink-2); }
.legal ul.legal__toc li { margin: 0; }
.legal__toc a { border-bottom: 1px solid var(--line-strong); transition: color .3s, border-color .3s; }
.legal__toc a:hover { color: var(--ink); border-color: var(--ink); }
.legal section { margin-bottom: 2.75rem; scroll-margin-top: 2rem; }
.legal h2 { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.legal h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: var(--ink); }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 0.9rem; }
.legal ul { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.legal li + li { margin-top: 0.4rem; }
.legal a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.legal a:hover { border-color: var(--ink); }
.legal .plain { padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--surface); margin-bottom: 2.5rem; }
.legal .plain h2 { font-family: var(--font-serif); font-weight: 400; font-style: italic; font-size: 1.4rem; }
.legal .caps { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.01em; }
.legal .signoff { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.9375rem; }
.legal .signoff .motto { font-family: var(--font-serif); font-style: italic; }
