/* OwlVision — site styles */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #000;
  --ink: #F5F5F7;
  --muted: #86868B;
  --soft: #A1A1A6;
  --tile: #101012;
  --hair: #2C2C2E;
  --amber: #F6A23A;

  /* per-game theme, overridden on game pages and sections */
  --accent: var(--amber);
  --glow: #3B2A12;
  --surface: var(--tile);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --wrap: 980px;
  --wrap-wide: 1200px;
  --gutter: max(22px, 4vw);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: var(--wrap-wide); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #000; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

/* Type scale, following Apple's product pages */
.t-hero { font-size: clamp(48px, 8vw, 96px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
.t-head { font-size: clamp(40px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; }
.t-lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.38; letter-spacing: -0.02em; color: var(--soft); font-weight: 500; }

/* ---------- Global nav (glass) ---------- */
.gnav {
  position: sticky; top: 0; z-index: 50; height: 52px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.gnav.is-static { position: relative; }
.gnav .wrap-wide { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.gnav nav { display: flex; gap: 2px; }
.gnav nav a { font-size: 14px; color: #D2D2D7; text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: color .2s var(--ease); }
.gnav nav a:hover { color: #fff; }

/* ---------- Local nav (game pages) ---------- */
.lnav {
  position: sticky; top: 0; z-index: 45; height: 54px;
  background: rgba(22, 22, 23, .78);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.lnav .wrap-wide { height: 100%; display: flex; align-items: center; gap: 22px; }
.lnav-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.lnav-links { display: flex; gap: 22px; }
.lnav-links a { font-size: 12px; color: #D2D2D7; text-decoration: none; letter-spacing: -0.01em; transition: color .2s var(--ease); }
.lnav-links a:hover, .lnav-links a.is-active { color: #fff; }
.lnav .pill { min-height: 28px; padding: 0 14px; font-size: 12px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: 980px;
  font: inherit; font-size: 17px; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; cursor: pointer;
  background: var(--accent); color: #000; border: 1px solid var(--accent);
  transition: filter .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.pill:hover { filter: brightness(1.08); }
.pill:active { transform: scale(.97); }
.pill-ghost { background: transparent; color: var(--accent); }
.pill-ghost:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); filter: none; }
.pill svg { width: 16px; height: 16px; flex: none; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Home hero ---------- */
.hero { position: relative; min-height: calc(100svh - 52px); display: grid; place-items: center; padding: 48px 0 96px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 36%; width: 900px; height: 600px; z-index: -1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(246, 162, 58, .16), rgba(246, 162, 58, .04) 55%, transparent);
}
.js .hero::before { opacity: 0; transition: opacity 2.4s var(--ease) .9s; }
.js .hero.is-awake::before { opacity: 1; }
.hero-inner { display: grid; justify-items: center; text-align: center; gap: 22px; }
.owl { width: clamp(150px, 22vw, 240px); overflow: visible; filter: drop-shadow(0 30px 60px rgba(0,0,0,.9)); }
.owl .ov-eyes { transform-box: view-box; transform-origin: 60px 68px; }
.owl .ov-p { transition: transform .18s ease-out; }
.owl .ov-glow { animation: ov-breathe 5s ease-in-out infinite 2.4s; }
.js .owl .ov-eyes { opacity: 0; }
.js .owl.is-awake .ov-eyes { opacity: 1; animation: ov-open .9s var(--ease-out) both; }
.js .owl.is-open .ov-eyes { animation: none; }
.js .owl.is-open.is-blinking .ov-eyes { animation: ov-blink .2s ease-in-out; }
.js .owl .ov-head { opacity: 0; transition: opacity 1.8s var(--ease) .1s; }
.js .owl.is-lit .ov-head { opacity: 1; }
@keyframes ov-open { 0% { transform: scaleY(.05); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 1; } }
@keyframes ov-blink { 50% { transform: scaleY(.08); } }
@keyframes ov-breathe { 50% { opacity: .35; } }
.hero h1 { max-width: 12ch; }
.hero .t-lead { max-width: 34ch; }
.hero .actions { margin-top: 10px; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid #48484A; border-radius: 12px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--muted); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Game showcase on home ---------- */
.showcase { position: relative; padding: clamp(80px, 12vw, 140px) 0 clamp(48px, 7vw, 90px); overflow: hidden; isolation: isolate; }
.showcase::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 55% at 50% 72%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%);
}
.showcase + .showcase { border-top: 1px solid #111; }
.showcase-copy { display: grid; justify-items: center; text-align: center; gap: 14px; }
.showcase-logo { width: min(78vw, 420px); }
.showcase .t-head { max-width: 16ch; }
.showcase .t-lead { max-width: 38ch; }
.showcase .actions { margin-top: 8px; }
.status { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent); }

.stage { margin-top: clamp(40px, 6vw, 64px); }
.zoom {
  --p: 1;
  position: relative; display: block; overflow: hidden;
  border-radius: calc(36px - var(--p) * 14px);
  transform: scale(calc(.84 + var(--p) * .16));
  transform-origin: 50% 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 60px 120px -50px var(--glow);
  background: var(--surface);
  aspect-ratio: 1600 / 895;
}
.zoom img { width: 100%; height: 100%; object-fit: cover; }
a.zoom img { transition: transform 1.2s var(--ease-out); }
a.zoom:hover img { transform: scale(1.025); }

/* Logo image fade so cropped art blends into the page */
.fade-edges {
  --fx: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  --fy: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: var(--fx), var(--fy); -webkit-mask-composite: source-in;
  mask-image: var(--fx), var(--fy); mask-composite: intersect;
}

/* ---------- Studio bento ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section-title { text-align: center; max-width: 18ch; margin: 0 auto; }
.section-intro { text-align: center; max-width: 40ch; margin: 18px auto 0; }
.bento { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento-tile {
  position: relative; overflow: hidden; border-radius: 28px; background: var(--tile);
  padding: clamp(26px, 3.4vw, 40px); min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
}
.bento-tile:nth-child(1) { grid-column: span 4; background: radial-gradient(70% 90% at 100% 0%, #2A1B08, transparent 70%), var(--tile); }
.bento-tile:nth-child(2) { grid-column: span 2; }
.bento-tile:nth-child(3) { grid-column: span 2; }
.bento-tile:nth-child(4) { grid-column: span 4; background: radial-gradient(70% 90% at 100% 100%, #1A1430, transparent 70%), var(--tile); }
.bento-tile h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; line-height: 1.12; }
.bento-tile p { color: var(--muted); max-width: 40ch; }
.bento-icon { position: absolute; top: clamp(24px, 3vw, 36px); left: clamp(26px, 3.4vw, 40px); width: 52px; height: 52px; color: var(--amber); }
.bento-icon svg { width: 100%; height: 100%; }
.bento-icon .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .bento-tile .draw { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out) .25s; }
.js .bento-tile.is-in .draw { stroke-dashoffset: 0; }

/* ---------- Contact ---------- */
.contact { padding: clamp(80px, 12vw, 140px) 0 clamp(90px, 13vw, 160px); text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 50%; bottom: -260px; width: 1000px; height: 560px; transform: translateX(-50%); z-index: -1; background: radial-gradient(closest-side, rgba(246,162,58,.14), transparent); }
.contact .t-head { max-width: 15ch; margin: 0 auto; }
.contact .t-lead { max-width: 40ch; margin: 18px auto 0; }
.email-big {
  display: inline-block; margin-top: 34px;
  font-size: clamp(24px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(90deg, var(--amber), var(--amber)) no-repeat 0 100% / 0 2px;
  transition: background-size .6s var(--ease-out), color .3s var(--ease);
  padding-bottom: 6px;
}
.email-big:hover { background-size: 100% 2px; color: #fff; }
.contact .actions { margin-top: 28px; }
.copy-btn .ic-check { display: none; }
.copy-btn.is-copied .ic-check { display: block; animation: pop .35s var(--ease-out); }
.copy-btn.is-copied .ic-copy { display: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.contact-strip { padding: clamp(64px, 9vw, 110px) 0; text-align: center; border-top: 1px solid #111; }
.contact-strip h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.025em; line-height: 1.12; max-width: 22ch; margin: 0 auto; }
.contact-strip .actions { margin-top: 24px; }

/* ---------- Footer ---------- */
.footer { background: #0A0A0B; border-top: 1px solid #1C1C1E; color: var(--muted); font-size: 12px; line-height: 1.5; letter-spacing: -0.01em; padding: 28px 0 36px; }
.footer .wrap-wide { display: grid; gap: 14px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #1C1C1E; }
.footer-top img { height: 24px; width: auto; }
.footer a { color: #D2D2D7; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.age { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid #6E6E73; border-radius: 50%; font-weight: 700; font-size: 10px; color: #D2D2D7; margin-right: 8px; vertical-align: middle; letter-spacing: 0; }

/* ---------- Game page ---------- */
.game-hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 0; isolation: isolate; overflow: hidden; }
.game-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 50% at 50% 78%, color-mix(in srgb, var(--glow) 60%, transparent), transparent 70%);
}
.game-hero-copy { display: grid; justify-items: center; text-align: center; gap: 16px; }
.game-logo { width: min(80vw, 460px); }
.game-hero .t-hero { max-width: 14ch; }
.game-hero .t-lead { max-width: 36ch; }
.game-hero .stage { padding-bottom: clamp(56px, 8vw, 100px); }
.js .boot { animation: boot 1.4s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes boot { from { opacity: 0; transform: translateY(30px) scale(.97); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.glance { padding: clamp(64px, 9vw, 100px) 0; border-top: 1px solid #111; }
.glance h2 { text-align: center; }
.specs { margin: clamp(32px, 5vw, 56px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 40px 24px; text-align: center; }
.specs div { display: flex; flex-direction: column; }
.specs dt { order: 2; color: var(--muted); font-size: 14px; margin-top: 6px; }
.specs dd { font-variant-numeric: tabular-nums; margin: 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.specs dd.is-text { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; padding-top: .3em; }

.overview { padding: clamp(80px, 12vw, 140px) 0; }
.overview p { font-size: clamp(24px, 3.2vw, 40px); line-height: 1.22; letter-spacing: -0.028em; font-weight: 600; color: var(--ink); max-width: 30ch; }

/* Features: pinned visual + scrolling steps */
.features { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 110px); }
.features h2 { text-align: center; }
.story { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.story-visual { position: sticky; top: calc(54px + 7vh); height: min(76vh, 620px); border-radius: 32px; overflow: hidden; background: radial-gradient(60% 60% at 50% 55%, color-mix(in srgb, var(--glow) 75%, transparent), var(--surface) 80%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.story-visual figure { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.9); transition: opacity .7s var(--ease), transform 1s var(--ease-out); }
.story-visual figure.is-active { opacity: 1; transform: none; }
.story-visual img { max-height: 78%; max-width: 78%; width: auto; height: auto; object-fit: contain; }
.feature-img { -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); }
.story-steps { display: grid; }
.step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; opacity: .25; transition: opacity .5s var(--ease); }
.step.is-active { opacity: 1; }
.step h3 { font-size: clamp(32px, 3.6vw, 48px); letter-spacing: -0.03em; line-height: 1.06; }
.step p { font-size: clamp(19px, 1.7vw, 21px); color: var(--soft); max-width: 30ch; line-height: 1.4; }
.step-art { display: none; }

/* Screenshot carousel */
.gallery { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 12vw, 140px); border-top: 1px solid #111; }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.rail {
  --edge: max(var(--gutter), calc((100vw - var(--wrap-wide)) / 2 + var(--gutter)));
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(80vw, 820px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0 var(--edge) 8px; scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.shot { scroll-snap-align: start; margin: 0; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--surface); border-radius: 24px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1600 / 895; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.shot button:hover img { transform: scale(1.02); }
.shot figcaption { margin-top: 14px; color: var(--muted); font-size: 15px; }
.rail-ctrl { display: flex; gap: 12px; }
.round {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: #1D1D1F; color: #D2D2D7; transition: background-color .2s var(--ease), opacity .2s var(--ease);
}
.round:hover { background: #2C2C2E; color: #fff; }
.round:disabled { opacity: .35; cursor: default; }
.round svg { width: 20px; height: 20px; }

/* Lightbox */
.lightbox { width: min(1240px, 94vw); max-width: none; padding: 0; border: 0; background: transparent; color: var(--ink); }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.lightbox[open] { animation: lb-in .45s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(.94); } }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; border-radius: 18px; }
.lightbox figcaption { margin-top: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.lightbox-bar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 12px; }

/* More games */
.more { padding: clamp(64px, 9vw, 110px) 0; border-top: 1px solid #111; }
.more h2 { text-align: center; }
.more-grid { margin-top: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.more-grid .mini { flex: 1 1 340px; max-width: 580px; }
.mini { position: relative; display: block; text-decoration: none; border-radius: 28px; overflow: hidden; background: var(--surface); aspect-ratio: 16 / 10; isolation: isolate; }
.mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-out); }
.mini::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.92), rgba(0,0,0,.2) 55%, transparent); }
.mini:hover img { transform: scale(1.04); }
.mini-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; display: grid; gap: 4px; }
.mini-copy h3 { font-size: 28px; letter-spacing: -0.025em; }
.mini-copy p { color: var(--soft); }

.not-found { min-height: 70vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; padding: 80px var(--gutter); }
.not-found img { width: 110px; }
.not-found p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-tile:nth-child(n) { grid-column: auto; min-height: 250px; }
  .story { grid-template-columns: minmax(0, 1fr); }
  .story-visual { display: none; }
  .step { min-height: 0; opacity: 1; padding: 22px 0; }
  .step-art { display: flex; align-items: center; justify-content: center; height: 260px; border-radius: 24px; padding: 24px; background: radial-gradient(60% 60% at 50% 55%, color-mix(in srgb, var(--glow) 75%, transparent), var(--surface) 80%); margin-bottom: 10px; }
  .step-art img { max-height: 210px; max-width: 80%; width: auto; height: auto; object-fit: contain; }
  .lnav-links { display: none; }
}
@media (max-width: 560px) {
  .gnav nav a { padding: 8px 7px; }
  .brand img { height: 22px; }
  .actions .pill { flex: 1 1 auto; }
  .lnav-title { font-size: 17px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-head .rail-ctrl { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .zoom { transform: none !important; border-radius: 22px !important; }
}
