/* Portfolio: calm dark page. Clash Display for headings, Satoshi for everything else (both
   self-hosted in fonts/, free licence from Fontshare). One frame style for every picture/video. */
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('fonts/clash-display-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #0a0a0b; --panel: #111113; --line: #222226; --line-2: #2e2e33;
  --text: #ededed; --muted: #a1a1a6; --dim: #6e6e73; --live: #3ddc84; --amber: #f5c518;
  --f: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --h: 'Clash Display', 'Satoshi', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--f); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 32px; }

/* keyboard users */
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 500; }
.skip:focus { top: 16px; }

/* headings all use the heading font */
.brand, h1, h2, h3 { font-family: var(--h); font-weight: 600; letter-spacing: -.005em; }

/* header */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(10,10,11,.72); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 16px; letter-spacing: .01em; }
.nav nav { display: flex; gap: 30px; font-size: 15px; color: var(--muted); }
.nav nav a { transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font: 500 15px var(--f); transition: background .2s, border-color .2s, transform .2s ease-out; cursor: pointer;
  transform: translate(var(--bx, 0px), var(--by, 0px)); }  /* --bx/--by: buttons lean toward the mouse (main.js) */
.btn:active { transform: translate(var(--bx, 0px), var(--by, 0px)) scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: #55555c; background: #151517; }

/* hero */
.hero { padding-block: 110px 0; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(61,220,132,.18); flex: none; }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,197,24,.18); }
.hero h1 { margin-top: 28px; font-size: clamp(40px, 6.2vw, 80px); line-height: 1.02; }
.hero h1 span { color: var(--dim); }
.hero .sub { margin-top: 24px; max-width: 560px; font-size: 19px; color: var(--muted); }
.actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.reel { margin-top: 72px; }

/* frames: every picture and video sits in the same quiet frame */
.frame { position: relative; overflow: hidden; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.frame video, .frame img { width: 100%; height: 100%; object-fit: cover; }
.screen { aspect-ratio: 2272 / 956; }
.reel.frame { box-shadow: 0 40px 100px -40px rgba(0,0,0,.8); }

/* work */
.section { padding-top: 150px; }
.label { font-size: 14px; color: var(--dim); display: flex; align-items: center; gap: 14px; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.project { margin-top: 44px; }
.project + .project { margin-top: 130px; }

/* project stages: a big scene that turns toward the mouse, its layers at different depths (main.js) */
.stage { position: relative; height: 680px; perspective: 1700px; }
.stage::before { content: ""; position: absolute; inset: 0; border-radius: 28px; pointer-events: none; border: 1px solid var(--line);
  background: radial-gradient(700px circle at var(--gx, 30%) var(--gy, 40%), rgba(61,220,132,.14), transparent 65%), linear-gradient(180deg, #0f1211, #0b0c0d); }
.stage--raiders { height: auto; aspect-ratio: 1136 / 610; }  /* height follows width, so no empty strip under the game on narrower screens */
.stage--raiders::before { background: radial-gradient(700px circle at var(--gx, 60%) var(--gy, 40%), rgba(245,197,24,.12), transparent 65%), linear-gradient(180deg, #121110, #0b0b0c); }
.scene { position: absolute; inset: 0; transform-style: preserve-3d; }
.layer { position: absolute; }
.stage[data-tilt] .scene, .stage[data-tilt] .layer { will-change: transform; }

/* a browser window */
.win { border-radius: 14px; overflow: hidden; background: #0b0e0d; border: 1px solid #2a2d31; box-shadow: 0 50px 100px -30px rgba(0,0,0,.85); }
.win-bar { height: 32px; display: flex; align-items: center; gap: 7px; padding-inline: 14px; background: #0f1312; border-bottom: 1px solid #1d2321; }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a322e; }
.win-bar span { margin-inline: auto; font-size: 12px; color: #7d8a83; background: #151b19; padding: 2px 12px; border-radius: 6px; }
.win video { width: 100%; aspect-ratio: 2272 / 956; object-fit: cover; }

/* the real phone app, big, on a nearer layer */
.dev-phone { border-radius: 52px; padding: 11px; background: #050606; border: 1px solid #2c2f33; box-shadow: 0 70px 120px -30px rgba(0,0,0,.95), inset 0 0 0 2px #121416; }
.dev-phone video { height: 100%; width: auto; max-width: none; aspect-ratio: 540 / 1212; border-radius: 41px; object-fit: cover; background: #000; }
.glare { position: absolute; inset: 11px; border-radius: 41px; pointer-events: none; opacity: .6;
  background: linear-gradient(var(--ga, 115deg), rgba(255,255,255,.13) 0%, rgba(255,255,255,0) 38%); mix-blend-mode: screen; }

/* Impra: the phone stands on the left, over the terminal's market list; chart and trade panel stay clear */
.stage--impra .win { right: 0; top: 138px; width: 76%; }
.stage--impra .dev-phone { left: 5%; top: 28px; height: 624px; }

/* Raiders: the gameplay big, two pictures floating in front */
.stage--raiders .game { left: 4%; top: 48px; width: 80%; border-radius: 16px; overflow: hidden; border: 1px solid #2d2b27; box-shadow: 0 50px 100px -30px rgba(0,0,0,.85); }
.stage--raiders .game video { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.card { border-radius: 12px; overflow: hidden; border: 1px solid #34312b; box-shadow: 0 40px 80px -20px rgba(0,0,0,.9); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.stage--raiders .card--a { right: 2%; bottom: 40px; width: 30%; }
.stage--raiders .card--b { right: 9%; top: 18px; width: 22%; }

/* the soft glow that follows the cursor (made by main.js, mouse only) */
.glow { position: fixed; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(61,220,132,.07), transparent); opacity: 0; transition: opacity .6s; will-change: transform; }
.glow.on { opacity: 1; }

.info { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 40px; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.info h2 { font-size: 40px; line-height: 1.1; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 12px 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.info .one { margin-top: 14px; font-size: 19px; color: var(--muted); max-width: 440px; }
.info .btn { margin-top: 28px; }
.facts div { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 20px; }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--dim); padding-top: 2px; }
.facts dd { font-size: 16px; color: #d6d6d9; }

/* how I work */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.steps .n { font-size: 14px; color: var(--dim); }
.steps h3 { margin-top: 14px; font-size: 22px; line-height: 1.25; }
.steps p { margin-top: 10px; color: var(--muted); }

/* contact */
.contact { padding-block: 170px 60px; }
.contact h2 { font-size: clamp(38px, 5.6vw, 72px); line-height: 1.04; }
.contact h2 span { color: var(--dim); }
.foot { margin-top: 120px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 14px; }
.foot nav { display: flex; gap: 24px; }
.foot a:hover { color: var(--text); }

/* one gentle entrance, nothing else moves */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* tablet and phone */
@media (max-width: 900px) {
  .wrap { padding-inline: 20px; }
  .nav nav a:not(:last-child) { display: none; }
  .hero { padding-top: 64px; }
  .hero .sub { font-size: 17px; }
  .reel { margin-top: 48px; }
  .frame { border-radius: 12px; }
  .section { padding-top: 100px; }
  .project + .project { margin-top: 90px; }
  /* stages stack: no tilt, still big */
  .stage, .stage--raiders { height: auto; aspect-ratio: auto; perspective: none; padding: 18px 14px 26px; }
  .stage::before { border-radius: 20px; }
  .scene, .layer { position: relative; inset: auto; transform: none !important; }
  .stage--impra .scene { display: flex; flex-direction: column; align-items: center; }
  .stage--impra .win { width: 100%; top: 0; right: auto; }
  .stage--impra .dev-phone { margin: -40px auto 0; height: min(78vh, 600px); width: max-content; left: auto; top: auto; }
  .stage--raiders .scene { display: flex; flex-wrap: wrap; gap: 12px; }
  .stage--raiders .game { width: 100%; left: 0; top: 0; }
  .stage--raiders .card { width: calc(50% - 6px); right: auto; top: auto; bottom: auto; }
  .info { grid-template-columns: 1fr; gap: 30px; margin-top: 28px; }
  .info h2 { font-size: 32px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .steps { grid-template-columns: 1fr; gap: 30px; margin-top: 32px; }
  .contact { padding-block: 110px 40px; }
  .foot { margin-top: 80px; }
}
