/* MisterBest — coming-soon landing (B3)
   Charte: _Design/design-system/charte-brand.md (binding).
   Green is the signature, paper is the stage. Mono-first. */

/* ---------- font ---------- */
@font-face {
  font-family: "Quicksand";
  src: url("../fonts/quicksand-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 500; /* Quicksand body floor — never below 500 */
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  overflow-x: clip;
}

::selection { background: var(--secondary); color: var(--secondary-foreground); }

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* grain — kills flat-vector feel, nearly subliminal */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translateZ(0);
}

/* ---------- header ---------- */
.site-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}
.site-head .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(1rem, 3vw, 1.75rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
}
.brand .mark { width: 44px; height: 44px; fill: var(--primary); }
.brand .word { height: 22px; width: auto; aspect-ratio: 702.82 / 119.14; fill: var(--foreground); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  transition: border-color 200ms ease, transform 200ms ease;
}
.theme-toggle:hover { border-color: var(--primary); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(5.5rem, 12vh, 8rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-foreground);
  width: fit-content;
}
.hero-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.72); opacity: 0.55; }
}

.hero-crest {
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
  width: clamp(84px, 10vw, 116px);
  height: auto;
}
.hero-crest svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-crest path { fill: var(--primary); }

.hero h1 {
  margin-top: clamp(1.2rem, 3vh, 2rem);
  font-size: clamp(2.6rem, 5.6vw, 4.35rem);
  letter-spacing: -0.01em; /* display heading only — never the wordmark */
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero-sub {
  margin-top: clamp(1.1rem, 2.5vh, 1.6rem);
  font-size: var(--text-lg);
  color: var(--muted-foreground);
  max-width: 44ch;
}

.hero-actions {
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: box-shadow 220ms ease;   /* transform owned by GSAP (magnetic) */
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.08);
}
.btn:hover { box-shadow: 0 6px 18px rgb(28 75 60 / 0.22); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-plats {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-foreground);
}
.hero-plats span { color: var(--foreground); }
.hero-plats .sep { color: var(--border); padding-inline: 0.35rem; }

/* mascot stage */
.hero-stage {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 420px);
}
.stage-parallax, .stage-float { will-change: transform; }
.hero-stage img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}
.stage-shadow {
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  width: 62%;
  height: 5.5%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgb(17 17 17 / 0.16), transparent 68%);
  z-index: 1;
  border-radius: 50%;
}
.stage-ring {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 118%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 62%);
  z-index: 0;
  opacity: 0.9;
}

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding-block: 0.9rem;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  /* soft fade at both edges so items enter/leave gracefully */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
}
.ticker-track--a { animation: ticker-left 64s linear infinite; }
.ticker-track--b { animation: ticker-right 78s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > span {
  display: flex;
  gap: 2.5rem;
  padding-right: 2.5rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}
.ticker-track i {
  font-style: normal;
  color: var(--primary);
}
@keyframes ticker-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes ticker-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* ---------- steps ---------- */
.step { padding-block: clamp(4.5rem, 11vh, 7.5rem); }
.step + .step { padding-top: 0; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.step h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  max-width: 22ch;
}
.step .lede {
  margin-top: 1.1rem;
  font-size: var(--text-lg);
  color: var(--muted-foreground);
  max-width: 58ch;
}

/* expression cards */
.faces {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.face-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 260ms ease, box-shadow 260ms ease;
}
.face-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgb(17 17 17 / 0.08); }
.face-card img { aspect-ratio: 488 / 551; object-fit: cover; width: 100%; }
.face-card figcaption {
  padding: 0.9rem 1.1rem 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-foreground);
}
.face-card figcaption strong { color: var(--foreground); display: block; margin-bottom: 0.1rem; }

/* method cards */
.method {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.method-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: box-shadow 260ms ease;   /* transform owned by GSAP (tilt/reveal) */
}
.method-card:hover { box-shadow: 0 10px 30px rgb(17 17 17 / 0.08); }
.method-card .num {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
  background: var(--secondary);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.method-card h3 { margin-top: 1.1rem; font-size: var(--text-xl); }
.method-card p { margin-top: 0.6rem; color: var(--muted-foreground); }

/* step 03 — be there */
.soon .container {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.plats {
  margin-top: clamp(1.6rem, 4vh, 2.2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.plat {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-weight: 600;
  font-size: var(--text-sm);
}
.plat small {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary);
  background: var(--secondary);
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
}
.soon-note {
  margin-top: 1.4rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  max-width: 46ch;
}
.soon-stage {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 300px);
}
.soon-stage img { position: relative; z-index: 2; }
.soon-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  width: 60%;
  height: 5%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgb(17 17 17 / 0.14), transparent 68%);
  z-index: 1;
  border-radius: 50%;
}

/* ---------- imperial band ---------- */
.band {
  background: var(--primary);
  color: var(--primary-foreground);
  padding-block: clamp(3.5rem, 9vh, 6rem);
  text-align: center;
}
.band .container { position: relative; }
.band-word-wrap {
  width: min(72vw, 560px);
  margin-inline: auto;
  overflow: hidden;
  padding-block: 0.5rem;
}
.band .band-word {
  width: 100%;
  height: auto;
  aspect-ratio: 702.82 / 119.14;
  display: block;
  fill: var(--primary-foreground);
  will-change: transform;
}
.band p {
  margin-top: 1.4rem;
  font-weight: 600;
  font-size: var(--text-lg);
  opacity: 0.92;
}

/* ---------- footer ---------- */
.site-foot {
  padding-block: 2.2rem;
}
.site-foot .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-foot .brand .mark { width: 26px; height: 26px; }
.site-foot .brand .word { height: 13px; }
.site-foot p {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  font-weight: 600;
}

/* ---------- entrance ownership (golden rule 7: JS owns these, fromTo only) ---------- */
html.js [data-entrance] { opacity: 0; }
html.js.reduced [data-entrance] { opacity: 1; }
html.js .hero h1 { visibility: hidden; }
html.js.reduced .hero h1 { visibility: visible; }

/* ---------- award motion pass (transform/opacity only; GSAP owns) ---------- */
.hero-crest path { stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero h1, .step h2 { text-wrap: balance; }
.btn { will-change: transform; }
.method { perspective: 1200px; }
.method-card { transform-style: preserve-3d; will-change: transform; }
html.js .method-card { opacity: 0; }
html.js.reduced .method-card { opacity: 1; }

/* ---------- pinned expert scene (expression morph on scroll) ---------- */
.expert.step { padding-block: 0; }
.expert-pin { min-height: 100vh; min-height: 100dvh; display: grid; align-items: center; }
.expert-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.expert-copy { position: relative; }
.expert-visual { display: flex; flex-direction: column; align-items: center; gap: clamp(1rem, 3vh, 1.6rem); }
.expert-states { display: flex; flex-direction: column; gap: 0.4rem; text-align: center; }
.expert-state { margin: 0; font-size: var(--text-lg); color: var(--muted-foreground); }
.expert-state strong { display: block; color: var(--foreground); font-size: var(--text-xl); }
.expert-dots { display: none; gap: 0.55rem; justify-content: center; }
.expert-dots span { width: 9px; height: 9px; border-radius: 999px; background: var(--primary); opacity: 0.3; }
.expert-stage { position: relative; width: min(100%, 420px); aspect-ratio: 488 / 551; margin: 0 auto; }
.expert-face { display: block; width: 100%; height: 100%; object-fit: contain; }
/* non-pinned (mobile / no-JS): show the first face, list the states in flow */
.expert-stage .expert-face:not(:first-child) { display: none; }

/* pinned mode (JS, >= 701px) */
.expert.is-pinned .expert-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.expert.is-pinned .expert-states { position: relative; width: min(100%, 460px); min-height: 4.4em; }
.expert.is-pinned .expert-state { position: absolute; inset: 0; }
.expert.is-pinned .expert-dots { display: flex; }
.expert.is-pinned .expert-stage { width: min(100%, 400px); }
.expert.is-pinned .expert-stage .expert-face { position: absolute; inset: 0; will-change: opacity; }
.expert.is-pinned .expert-stage .expert-face:not(:first-child) { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-stage { width: min(72%, 330px); }
  .faces, .method { grid-template-columns: 1fr; max-width: 480px; }
  .soon .container { grid-template-columns: 1fr; }
  .soon-stage { width: min(58%, 250px); }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .faces, .method { gap: 1rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* ticker keeps its gentle marquee on purpose (decorative, aria-hidden, requested) */
  .hero-chip .dot { animation: none; }
  .btn, .face-card, .method-card, .theme-toggle { transition: none; }
}
