/* Hexberry — coming soon. The live 3D stage fills the window; the page floats over it. */

@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url(assets/fonts/sora-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url(assets/fonts/sora-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 800; font-display: swap; src: url(assets/fonts/sora-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url(assets/fonts/manrope-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url(assets/fonts/manrope-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(assets/fonts/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-display: swap; src: url(assets/fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --ink: #07051a;
  --line: rgba(170, 185, 255, 0.16);
  --line-2: rgba(170, 185, 255, 0.3);
  --text: #eef0ff;
  --muted: #aab1e2;
  --dim: #7980b6;
  --blue: #2c62ff;
  --grad: linear-gradient(90deg, #5482ff, #a46bff);
  --grad-btn: linear-gradient(100deg, #2c62ff 0%, #4a3cf5 55%, #7a2cf0 100%);
  --pad: clamp(18px, 4.2vw, 64px);
  --nav-h: 84px;
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh; background: var(--ink); color: var(--text);
  font: 500 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, p { margin: 0; }
:focus-visible { outline: 2px solid #6f95ff; outline-offset: 3px; border-radius: 10px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hexdot { display: inline-block; width: 11px; height: 10px; margin-right: 10px; background: var(--grad-btn); clip-path: polygon(0 50%, 25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%); }
.label, .eyebrow, .mono { font: 600 12.5px/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: #9db4ff; }

/* ---------------------------------------------------------------- stage + HUD */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; z-index: 0; }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 6; height: var(--nav-h); display: flex; align-items: center; gap: 16px; padding: 0 var(--pad); pointer-events: none; }
.nav > * { pointer-events: auto; }
.brand img { display: block; height: 30px; width: auto; opacity: 0; } /* pack minimum is 120 px wide; this is ~173 px */
.no-intro .brand img, .nav-word-on .brand img { opacity: 1; }
.no-intro .brand img { transition: opacity 0.8s var(--ease) 0.2s; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: rgba(14, 10, 40, 0.55); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 600 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; transition: background-color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.pill:hover { background: rgba(40, 32, 100, 0.7); border-color: rgba(170, 185, 255, 0.5); transform: translateY(-1px); }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill-cta { background: var(--grad-btn); border-color: transparent; }
.pill-cta:hover { background: var(--grad-btn); filter: brightness(1.1); }

/* ---------------------------------------------------------------- layout */
.layout {
  position: relative; z-index: 2; min-height: 100svh; display: grid; grid-template-columns: minmax(360px, 0.92fr) 1.08fr;
  padding: var(--nav-h) var(--pad) 70px; gap: clamp(16px, 3vw, 48px); pointer-events: none;
  overflow: clip; /* a zoomed device must not widen the page (phones would zoom out) */
}
.copy { position: relative; z-index: 1; align-self: center; max-width: 560px; pointer-events: auto; padding-bottom: 20px; } /* above a zoomed device */
/* while the scene is zoomed, a soft dark glow keeps the copy readable over whatever slides under it */
.copy::before {
  content: ''; position: absolute; inset: -28px -36px; z-index: -1; border-radius: 80px; pointer-events: none;
  background: rgba(7, 5, 26, 0.8); filter: blur(40px);
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.scene-zoomed .copy::before { opacity: 1; }
.stage-slot { position: relative; min-height: 360px; pointer-events: none; }

.eyebrow { display: flex; align-items: center; }
h1 { font: 800 clamp(64px, 9vw, 138px)/0.92 var(--display); letter-spacing: -0.05em; margin: 22px 0 26px; }
h1 .ln { display: block; overflow: hidden; padding: 0 0.04em 0.06em; margin: 0 -0.04em -0.06em; }
h1 .ln > span { display: inline-block; }
.lede { color: var(--muted); font-size: clamp(16.5px, 1.35vw, 19px); max-width: 470px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 700 16px/1 var(--body); transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.25s, border-color 0.25s;
}
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 12px 34px -12px rgba(70, 80, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(90, 90, 255, 0.95); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(8px); }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.07); }
.peek { margin-top: 38px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(14, 10, 40, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 700 15px/1 var(--body); transition: transform 0.3s var(--out-back), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.chip svg { width: 20px; height: 20px; fill: none; stroke: #a9bcff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip:hover { transform: translateY(-2px); border-color: rgba(170, 185, 255, 0.55); }
.chip[aria-pressed='true'] { background: var(--grad-btn); border-color: transparent; box-shadow: 0 10px 28px -10px rgba(80, 80, 255, 0.9); }
.chip[aria-pressed='true'] svg { stroke: #fff; }

/* footer */
.foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 0 var(--pad) 26px; font-size: 13.5px; color: var(--dim); opacity: 0; transition: opacity 1s var(--ease) 1.1s;
}
.live .foot { opacity: 1; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .mono { font-size: 11px; color: var(--dim); }
.foot .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.linkish { margin-left: auto; padding: 0; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.linkish:hover { color: var(--text); }

/* ---------------------------------------------------------------- staged reveal (the page builds after the hand-off) */
.js .copy .r { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .copy .ln > span { transform: translateY(105%); transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.live .copy .r, .live .copy .ln > span { opacity: 1; transform: none; }
.live .copy .eyebrow { transition-delay: 0.05s; }
.live .copy .ln:nth-child(1) > span { transition-delay: 0.12s; }
.live .copy .ln:nth-child(2) > span { transition-delay: 0.22s; }
.live .copy .lede { transition-delay: 0.38s; }
.live .copy .cta-row { transition-delay: 0.5s; }
.live .copy .peek { transition-delay: 0.62s; }
.js .chip { opacity: 0; transform: scale(0.8); }
.live .chip { opacity: 1; transform: none; transition: transform 0.5s var(--out-back), opacity 0.4s, background-color 0.25s, border-color 0.25s, box-shadow 0.25s; }
.live .chip:nth-child(1) { transition-delay: 0.72s, 0.72s, 0s, 0s, 0s; }
.live .chip:nth-child(2) { transition-delay: 0.8s, 0.8s, 0s, 0s, 0s; }
.live .chip:nth-child(3) { transition-delay: 0.88s, 0.88s, 0s, 0s, 0s; }
.live .chip:hover { transform: translateY(-2px); transition-delay: 0s; }

/* ---------------------------------------------------------------- intro + hand-off */
#intro { position: fixed; inset: 0; z-index: 9; background: #000; transition: opacity 0.45s ease; }
#intro video { width: 100%; height: 100%; object-fit: cover; display: block; }
#intro.gone { opacity: 0; pointer-events: none; }
.intro-ui { position: absolute; right: var(--pad); bottom: 26px; display: flex; gap: 10px; }
.handoff-layer { position: fixed; inset: 0; z-index: 8; pointer-events: none; display: none; }
.handoff .handoff-layer { display: block; }
.handoff-layer img { position: absolute; transform-origin: 0 0; }
.handoff-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.handoff.live .handoff-layer canvas, .handoff .handoff-layer canvas.out { opacity: 0; transform: translateY(18px); }
.handoff-layer canvas { opacity: 1; }
body.handoff:not(.live) .handoff-layer canvas { transition-delay: 0s; }

/* ---------------------------------------------------------------- small screens: berry on top, copy below */
@media (max-width: 860px), (max-aspect-ratio: 4/5) {
  :root { --nav-h: 70px; }
  .layout { grid-template-columns: 1fr; grid-template-rows: auto auto; padding-bottom: 110px; gap: 26px; }
  .stage-slot { order: -1; height: clamp(300px, 44svh, 520px); min-height: 0; }
  .copy { max-width: none; text-align: left; }
  h1 { font-size: clamp(56px, 17vw, 96px); margin: 16px 0 18px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .foot { position: relative; padding-top: 10px; }
  .linkish { margin-left: 0; }
  .brand img { height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001s !important; animation: none !important; }
}
/* shown only when the browser blocks autoplay and the visitor asked for the intro */
.intro-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 30px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: 700 18px/1 var(--body);
  background: var(--grad-btn); box-shadow: 0 16px 44px -12px rgba(70, 80, 255, 0.9);
}
.intro-play[hidden] { display: none; }
.no-webgl .stage-slot { background: url(assets/hexberry-film-wide-poster.jpg) center / contain no-repeat; }
