/* SnM Technologies: warm black, bone ink, one amber accent (the "n" in the mark).
   Layout: single 1080px column; hero, games, contact; legal pages use a 68ch reading column. */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(/assets/fonts/manrope-latin-400-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: 800; font-display: swap; src: url(/assets/fonts/manrope-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #0b0b0d;
  --surface: #141416;
  --line: #26262a;
  --ink: #f2eee6;
  --muted: #9d978c;
  --accent: #ffb020;
  --font: Manrope, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
}

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand img { width: 56px; }
.brand span { font-size: 13px; letter-spacing: .28em; color: var(--muted); }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }

/* hero */
.hero { padding-block: clamp(56px, 12vw, 128px) clamp(48px, 9vw, 96px); }
.hero svg { width: clamp(150px, 26vw, 240px); margin-bottom: 40px; overflow: visible; }
.hero h1 {
  font-weight: 800; font-size: clamp(38px, 7vw, 76px); line-height: 1.02; letter-spacing: -.035em;
  margin: 0; max-width: 14ch; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 52ch; margin: 24px 0 0; }

/* the mark draws itself once on load */
.draw path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .7s cubic-bezier(.6, 0, .2, 1) forwards; }
.draw path:nth-child(2) { animation-delay: .35s; }
.draw path:nth-child(3) { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .draw path { animation: none; stroke-dashoffset: 0; } }

/* sections */
section { padding-block: clamp(48px, 8vw, 88px); border-top: 1px solid var(--line); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
h2 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }

.game {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: clamp(24px, 5vw, 64px); align-items: center;
}
.game .shot { border-radius: 26px; border: 1px solid var(--line); overflow: hidden; background: #07040f; }
.game h3 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.game .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.game p { max-width: 50ch; margin: 0 0 14px; }
.facts { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 8px; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ''; position: absolute; left: 0; top: .65em; width: 10px; height: 2px; background: var(--accent); }
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.contact p { color: var(--muted); margin: 0; max-width: 46ch; }
.email { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.01em; word-break: break-word; }

/* footer */
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 28px calc(28px + env(safe-area-inset-bottom)); }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }

/* legal pages */
.doc { max-width: 68ch; padding-block: clamp(40px, 8vw, 80px); }
.doc h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 22px; margin: 44px 0 12px; }
.doc p, .doc li { color: #d9d4ca; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.table-scroll { overflow-x: auto; }

@media (max-width: 720px) {
  .game { grid-template-columns: 1fr; }
  .game .shot { max-width: 280px; }
  .brand span { display: none; }
  .nav { gap: 16px; }
}

/* games grid (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 20px; margin-top: 32px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card-img > img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; background: #07040f; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: 16px; flex: 1; }
.card-head { display: flex; align-items: center; gap: 14px; }
.card h3 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.card h3 a { text-decoration: none; }
.card .meta, .gamehead .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.icon { width: 56px; height: 56px; border-radius: 22%; border: 1px solid var(--line); flex: none; }

/* what we build */
.build { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 32px; }
.build h3 { font-size: 22px; font-weight: 800; margin: 0 0 8px; padding-top: 16px; border-top: 2px solid var(--accent); }
.build p { color: var(--muted); margin: 0; max-width: 40ch; }
.build-cta { margin: 36px 0 0; font-weight: 800; font-size: 20px; }

/* game pages */
.gamepage { padding-block: clamp(32px, 6vw, 64px) clamp(40px, 7vw, 72px); }
.gamepage .eyebrow a { text-decoration: none; }
.gamehead { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.gamehead .icon { width: clamp(72px, 12vw, 112px); height: auto; aspect-ratio: 1; }
.gamehead h1 { font-weight: 800; font-size: clamp(34px, 6vw, 60px); letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.gamebody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 52ch; margin: 0; }
.feature { width: 100%; border-radius: 18px; border: 1px solid var(--line); background: #07040f; }
.gallery { list-style: none; margin: 0; padding: 0 0 12px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery li { flex: 0 0 min(220px, 62vw); scroll-snap-align: start; }
.gallery img { width: 100%; }
.gallery span { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.4; }
@media (min-width: 900px) {
  .gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
}
@media (max-width: 720px) {
  .gamebody { grid-template-columns: 1fr; }
  .gamebody .feature-wrap { order: -1; }
}

/* ---- motion layer: phone frames, hero fan, screenshot reel, reveals ----
   Only transform/opacity animate. Every game carries --game (its own colour world) for glows. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --game: var(--accent); }

/* phone frame: thin bezel, radius scales with the frame */
.phone {
  display: block; padding: 3.2%; border-radius: 13% / 7.4%; background: #050506;
  box-shadow: 0 0 0 1px #2e2b27, 0 22px 44px -18px rgba(0, 0, 0, .85), 0 0 46px -14px color-mix(in srgb, var(--game) 60%, transparent);
}
.phone img { width: 100%; border-radius: 10.5% / 5.9%; background: #07040f; }

/* nav underline */
.nav a { position: relative; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current]::after { transform: scaleX(1); }

/* hero: copy + fanned phones */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 64px); align-items: center; overflow-x: clip; }
.fan { position: relative; width: 100%; max-width: 440px; aspect-ratio: 10 / 9; justify-self: end; }
.fan-item { position: absolute; width: 38%; top: 13%; animation: fan-in 1s var(--ease-out) both; }
.fan-item.l { left: 5%; rotate: -8deg; animation-delay: 1.05s; }
.fan-item.r { right: 5%; rotate: 8deg; animation-delay: 1.2s; }
.fan-item.c { left: 27%; width: 46%; top: 0; z-index: 1; animation-delay: .9s; }
.fan .phone {
  animation: float 6.5s ease-in-out infinite alternate;
  translate: calc(var(--px, 0) * var(--depth) * 1px) calc(var(--py, 0) * var(--depth) * 1px);
  transition: translate .8s var(--ease-out);
}
.fan .l .phone { animation-duration: 7.5s; animation-delay: -2s; }
.fan .r .phone { animation-duration: 8.5s; animation-delay: -4s; }
@keyframes fan-in { from { opacity: 0; transform: translateY(48px) scale(.94); } }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .fan { max-width: 340px; justify-self: center; margin-top: 8px; }
}

/* screenshot reel: full-bleed, infinite, pauses on hover/focus or via the toggle */
.reel { padding-block: clamp(32px, 5vw, 48px) clamp(16px, 3vw, 32px); overflow: clip; }
.reel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.reel-head .eyebrow { margin: 0; }
.reel-toggle {
  font: 600 14px/1 var(--font); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.reel-toggle::before { content: ''; width: 8px; height: 10px; border: solid currentColor; border-width: 0 3px; box-sizing: border-box; }
.reel-toggle[aria-pressed="true"]::before { width: 0; height: 0; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent currentColor; }
.reel-toggle:hover, .reel-toggle[aria-pressed="true"] { color: var(--ink); border-color: #4a4640; }
.reel-toggle[hidden] { display: none; }
.reel-view {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.reel-view:focus-visible { outline-offset: -2px; }
.reel-track { display: flex; width: max-content; animation: reel 80s linear infinite; }
.reel-view:hover .reel-track, .reel-view:focus .reel-track, .reel.paused .reel-track { animation-play-state: paused; }
.reel-set { display: flex; gap: clamp(16px, 2vw, 24px); list-style: none; margin: 0; padding: 20px clamp(16px, 2vw, 24px) 28px 0; }
.reel-set li { flex: none; width: clamp(124px, 13vw, 168px); }
@keyframes reel { to { transform: translateX(-50%); } }

/* game cards: per-game lift + glow, a phone peeking out of the key art */
.card { transition: translate .45s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out); }
.card:hover, .card:focus-within {
  translate: 0 -6px; border-color: color-mix(in srgb, var(--game) 55%, var(--line));
  box-shadow: 0 26px 50px -26px color-mix(in srgb, var(--game) 70%, transparent);
}
.card-img { display: block; position: relative; overflow: hidden; }
.card-img > img { transition: transform .8s var(--ease-out); }
.card:hover .card-img > img, .card:focus-within .card-img > img { transform: scale(1.04); }
.peek { position: absolute; right: 6%; top: 40%; width: 22%; rotate: 7deg; transition: transform .6s var(--ease-out); }
.card:hover .peek, .card:focus-within .peek { transform: translateY(-16%); }

/* game page: accent glow behind key art */
.gamepage { overflow-x: clip; }
.feature-wrap { position: relative; isolation: isolate; }
.feature-wrap::before {
  content: ''; position: absolute; inset: -14% -6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--game) 42%, transparent), transparent);
  opacity: .55; animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe { to { opacity: .95; transform: scale(1.06); } }
.gallery { padding-top: 8px; padding-bottom: 28px; }

/* contact: amber glow follows the pointer (added by site.js) */
#contact { position: relative; overflow: hidden; }
#contact .wrap { position: relative; }
.glow {
  position: absolute; left: -200px; top: -200px; width: 400px; height: 400px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 176, 32, .13), transparent); opacity: 0; transition: opacity .4s;
}
#contact:hover .glow { opacity: 1; }

/* scroll reveal: only once site.js has run and flagged an element below the fold */
.js .rv { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rv:not(.in) { opacity: 0; transform: translateY(22px); }

@media (prefers-reduced-motion: reduce) {
  .fan-item, .fan .phone, .feature-wrap::before, .reel-track { animation: none; }
  .fan .phone, .card, .card-img > img, .peek, .nav a::after { transition: none; }
  .reel-view { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scroll-snap-type: x mandatory; }
  .reel-set li { scroll-snap-align: start; }
  .reel-set { padding-left: max(20px, env(safe-area-inset-left)); }
  .reel-set[aria-hidden] { display: none; }
  .reel-toggle { display: none; }
  .js .rv, .js .rv:not(.in) { opacity: 1; transform: none; transition: none; }
}
