/* Nyynno Studio — shared styles for nyynno.com */

@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/bvp-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/bvp-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/bvp-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ground: #080d19;
  --ground-2: #0d1528;
  --raised: #121c33;
  --line: rgba(150, 180, 230, 0.14);
  --line-strong: rgba(150, 180, 230, 0.28);
  --ink: #edf3fc;
  --ink-2: #aebbd0;
  --ink-3: #8191aa;
  --cyan: #2fc6ff;
  --blue: #1668d9;
  --blue-hover: #1a6de0;
  --blue-deep: #1259c0;
  /* World Block piece colours, taken from the game */
  --b-rose: #ff5a7a;
  --b-amber: #ffb03a;
  --b-lemon: #ffe04a;
  --b-mint: #5be38a;
  --b-sky: #3ac8ff;
  --b-indigo: #6a8cff;
  --b-violet: #c77dff;

  --unit: 8px;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1200px;
  --radius: 14px;
  --ease: 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; scrollbar-color: #2a3a5c var(--ground); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  caret-color: var(--cyan);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(47, 198, 255, 0.32); color: #fff; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #22314f; border-radius: 12px; border: 3px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: #2d4169; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.skip { position: absolute; left: -9999px; top: 8px; padding: 10px 16px; background: var(--ink); color: var(--ground); border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(8, 13, 25, 0.86); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.site-head.scrolled { border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(1px)) { .site-head { backdrop-filter: saturate(1.4) blur(14px); } }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 42px; }
.brand .word { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
@media (max-width: 420px) {
  .brand .mark { width: 34px; } .brand .word { height: 24px; }
  .nav { gap: 14px; font-size: 14px; }
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 inherit; font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6); }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.7); }
.btn-primary:active { transform: translateY(0); background: var(--blue-deep); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-2); background: rgba(255, 255, 255, 0.04); }

/* ---------- studio hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-field-fallback { position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(50% 45% at 74% 45%, rgba(30, 124, 242, 0.2), transparent 100%); }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; min-height: min(760px, calc(100svh - 72px)); padding-top: 56px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(42px, 7vw, 88px); max-width: 11ch; }
.hero .lede { margin-top: 24px; max-width: 34ch; font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); }
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-mark { justify-self: center; width: min(62%, 260px); filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.45)); }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
  .hero-mark { justify-self: end; width: min(100%, 400px); }
}

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4.4vw, 56px); }
.section-head p { max-width: 44ch; color: var(--ink-2); }

/* product feature (one per game; more games add more rows) */
.product {
  display: grid; grid-template-columns: 1fr; overflow: hidden;
  background: var(--ground-2); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
}
.product-art { position: relative; min-height: 300px; background: #0b1630; overflow: hidden; }
.product-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.product-body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.product-body h3 { font-size: clamp(30px, 3.4vw, 44px); }
.product-body p { color: var(--ink-2); max-width: 42ch; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-2); }
.platforms li { display: flex; align-items: center; gap: 8px; }
.platforms svg { width: 18px; height: 18px; flex: none; }
.platforms .live { color: var(--ink); }
.platforms .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--b-mint); }
.product .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@media (min-width: 900px) {
  .product { grid-template-columns: 1.1fr 0.9fr; }
  .product-art { min-height: 460px; }
}

/* about */
.about { display: grid; gap: 40px; }
.about h2 { font-size: clamp(32px, 4.4vw, 56px); max-width: 14ch; }
.about-text { display: grid; gap: 20px; max-width: 60ch; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); }
.about-text strong { color: var(--ink); font-weight: 600; }
@media (min-width: 900px) { .about { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

/* contact */
.contact { text-align: left; }
.contact h2 { font-size: clamp(32px, 4.4vw, 56px); }
.contact p { margin-top: 16px; color: var(--ink-2); max-width: 46ch; }
.mail {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 32px;
  font-size: clamp(22px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.02em; text-decoration: none;
  border-bottom: 2px solid var(--line-strong); padding-bottom: 6px; transition: border-color 0.2s, color 0.2s;
  overflow-wrap: anywhere;
}
.mail:hover { border-color: var(--cyan); color: #fff; }
.mail svg { width: 0.8em; height: 0.8em; flex: none; color: var(--cyan); transition: transform 0.3s var(--ease); }
.mail:hover svg { transform: translate(3px, -3px); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--ink-3); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-foot .brand .mark { width: 30px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---------- World Block page ---------- */
.game-hero { position: relative; overflow: hidden; isolation: isolate; background:
  radial-gradient(55% 50% at 78% 40%, rgba(106, 140, 255, 0.15), transparent 100%); }
.game-hero .wrap { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 88px; min-height: min(780px, calc(100svh - 72px)); }
.game-title { font-size: clamp(54px, 9vw, 120px); letter-spacing: -0.035em; line-height: 0.95; }
.game-title span { display: block; }
.game-title .w2 { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.game-hero .lede { margin-top: 28px; max-width: 36ch; font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); }
.game-hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.soon { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.soon svg { width: 18px; height: 18px; }
.board-stage { justify-self: center; width: min(100%, 460px); aspect-ratio: 1; position: relative; }
.board-stage canvas { width: 100%; height: 100%; display: block; }
@media (min-width: 900px) { .game-hero .wrap { grid-template-columns: 1.1fr 0.9fr; } .board-stage { justify-self: end; } }

.features { display: grid; gap: 0; border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: 56px 1fr; gap: 8px 24px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.feature svg { width: 56px; height: 56px; grid-row: span 2; }
.feature h3 { font-size: clamp(22px, 2.2vw, 28px); align-self: end; }
.feature p { color: var(--ink-2); max-width: 58ch; }
@media (min-width: 900px) {
  .features { grid-template-columns: repeat(3, 1fr); border-top: 0; }
  .feature { grid-template-columns: 1fr; padding: 0 40px 0 0; border-bottom: 0; }
  .feature + .feature { padding-left: 40px; border-left: 1px solid var(--line); }
  .feature svg { grid-row: auto; margin-bottom: 16px; }
}

.modes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.modes li { display: grid; grid-template-columns: 1fr; gap: 6px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.modes li:last-child { border-bottom: 1px solid var(--line); }
.modes strong { font-size: clamp(20px, 2vw, 26px); font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 14px; }
.modes strong i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.c-rose { background: var(--b-rose); } .c-amber { background: var(--b-amber); } .c-mint { background: var(--b-mint); } .c-sky { background: var(--b-sky); } .c-violet { background: var(--b-violet); }
.modes span { color: var(--ink-2); }
@media (min-width: 760px) { .modes li { grid-template-columns: 280px 1fr; align-items: baseline; } }

.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(34px, 5vw, 64px); }
.cta-band p { margin: 18px auto 0; color: var(--ink-2); max-width: 40ch; }
.cta-band .actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; }

/* ---------- privacy (reading page) ---------- */
.doc { padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.doc .wrap { display: grid; gap: 48px; }
.doc-head h1 { font-size: clamp(38px, 5.4vw, 64px); }
.doc-head p { margin-top: 16px; color: var(--ink-2); }
.toc { font-size: 15px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 12px; padding: 7px 0; color: var(--ink-2); text-decoration: none; }
.toc a::before { content: counter(toc); min-width: 1.4em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 68ch; counter-reset: sec; }
.prose section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.prose section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 16px; counter-increment: sec; }
.prose h2::before { content: counter(sec) ". "; color: var(--ink-3); }
.prose h3 { font-size: 18px; margin: 24px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose li::marker { color: var(--cyan); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--cyan); }
@media (min-width: 1000px) {
  .doc .wrap { grid-template-columns: 260px 1fr; column-gap: 80px; }
  .doc-head { grid-column: 1 / -1; }
  .toc { position: sticky; top: 104px; align-self: start; }
}

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - 72px - 130px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost h1 { font-size: clamp(40px, 6vw, 72px); }
.lost p { margin: 16px auto 32px; color: var(--ink-2); max-width: 36ch; }

/* entrance: content is visible by default; JS adds .reveal-ready only when motion is allowed */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-ready [data-reveal].in { opacity: 1; transform: none; }
