/* Simple Gear Games — home page */

:root {
  --bg: #1b2246;
  --bg-alt: #212a55;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f4ff;
  --muted: #aab1d8;
  --dim: #8a93c4;
  --blue: #7fb2ff;
  --gold: #ffcb5c;
  --glow: #7fb2ff;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #000; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--text); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Film grain */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Custom cursor (fine pointers only) */
.cursor, .cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  body.has-cursor .cursor, body.has-cursor .cursor-ring { display: block; }
}
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 200; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor { width: 6px; height: 6px; background: var(--text); }
.cursor-ring { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.35); transition: width .25s, height .25s, background .25s, border-color .25s; }
.cursor-ring.hover { width: 64px; height: 64px; background: rgba(127,178,255,.14); border-color: var(--blue); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(27, 34, 70, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav img { height: 26px; width: auto; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
@media (max-width: 720px) { .nav ul li:not(:last-child) { display: none; } }

.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; will-change: transform; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(ellipse at 85% 10%, rgba(140, 120, 255, .22), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(80, 160, 255, .14), transparent 50%); position: relative; height: 100vh; min-height: 640px; overflow: hidden; display: flex; align-items: flex-end; padding: 0 var(--pad) 12vh; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.gear-bg { position: absolute; right: -18vw; top: 50%; width: 78vw; max-width: 1100px; aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.hero-glow { position: absolute; right: 5vw; top: 30%; width: 50vw; height: 50vw; border-radius: 50%; background: radial-gradient(circle, rgba(127,150,255,.28), transparent 65%); filter: blur(10px); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: .95; font-size: clamp(48px, 9.5vw, 156px); margin: 18px 0 0; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.hero-bottom p { max-width: 440px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.meta { display: flex; gap: 24px; flex-wrap: wrap; }
.meta span b { display: block; color: var(--text); font-weight: 500; margin-top: 4px; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; z-index: 2; width: 1px; height: 54px; background: var(--line); overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--text); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 15px; font-weight: 500;
  transition: background .25s, border-color .25s;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.btn.primary { background: var(--text); color: #000; border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Sections ---------- */
section { position: relative; }
.section { background: var(--bg-alt); padding: clamp(100px, 16vh, 180px) var(--pad); border-top: 1px solid var(--line); }
.label { display: flex; gap: 14px; align-items: center; margin-bottom: 40px; }
.label::before { content: ""; width: 28px; height: 1px; background: var(--muted); }
.statement { font-family: var(--display); font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; font-size: clamp(32px, 5vw, 76px); margin: 0; max-width: 1200px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 90px; border-top: 1px solid var(--line); }
.fact { padding: 28px 24px 0 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact .num { font-family: var(--display); font-size: clamp(44px, 6vw, 88px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.fact .mono { display: block; margin-top: 12px; }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact { padding-bottom: 28px; }
}

.principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 70px; }
.principle { padding: 34px 32px 34px 0; border-top: 1px solid var(--line); }
.principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
.principle h3 { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -0.02em; margin: 18px 0 12px; }
.principle p { color: var(--muted); line-height: 1.65; margin: 0; }
@media (max-width: 860px) {
  .principles { grid-template-columns: 1fr; }
  .principle + .principle { padding-left: 0; border-left: 0; }
}

/* ---------- Games ---------- */
.games { border-top: 1px solid var(--line); transition: background-color .8s ease; }
.games.tinted { background-color: color-mix(in srgb, var(--glow) 6%, var(--bg)); }
.games-grid { display: grid; grid-template-columns: minmax(220px, .7fr) 2fr; gap: 0 6vw; padding: 0 var(--pad); }
.index { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.index ol { list-style: none; margin: 28px 0 0; padding: 0; }
.index li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--dim); font-family: var(--display); font-size: 20px; transition: color .4s; }
.index li .mono { color: inherit; font-size: 11px; }
.index li.active { color: var(--text); }
.index li.active::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 14px var(--glow); align-self: center; flex: none; }

.panels { min-width: 0; }
.panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(80px, 13vh, 140px) 0; min-width: 0; border-bottom: 1px solid var(--line); }
.panel:last-child { border-bottom: 0; }
.panel-head { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); margin-bottom: 26px; }
.panel-icon { position: relative; width: clamp(88px, 11vw, 150px); flex: none; }
.panel-icon .halo { position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(circle, var(--c) 0%, transparent 62%); opacity: .35; filter: blur(16px); }
.panel-icon img { position: relative; width: 100%; border-radius: 22%; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.panel h2, .panel h3 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.4vw, 84px); letter-spacing: -0.04em; line-height: .95; margin: 10px 0 0; }
.panel > p { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 560px; margin: 0 0 36px; }

.shots { overflow: hidden; margin: 0 calc(var(--pad) * -1) 36px -24px; padding-left: 24px; -webkit-mask: linear-gradient(90deg, transparent 0, #000 24px, #000 85%, transparent); mask: linear-gradient(90deg, transparent 0, #000 24px, #000 85%, transparent); }
.shots-track { display: flex; gap: 16px; width: max-content; will-change: transform; }
.shots img {
  background: rgba(255,255,255,.05);
  height: clamp(260px, 46vh, 480px); width: auto; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.5);
  background: #0d0f1a;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .games-grid { grid-template-columns: 1fr; }
  .index { display: none; }
  .panel { min-height: auto; padding: 72px 0; }
  .shots { overflow-x: auto; -webkit-mask: none; mask: none; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
}

/* ---------- Contact + footer ---------- */
.contact { padding: clamp(120px, 20vh, 220px) var(--pad) 60px; border-top: 1px solid var(--line); }
.contact .statement { font-size: clamp(44px, 8.5vw, 140px); line-height: .95; letter-spacing: -0.045em; font-weight: 600; }
.mail { display: inline-flex; align-items: center; gap: 18px; margin-top: 48px; font-family: var(--display); font-size: clamp(20px, 2.6vw, 36px); border-bottom: 1px solid var(--line); padding-bottom: 10px; transition: border-color .3s; word-break: break-all; }
.mail:hover { border-color: var(--text); }
.site-foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-top: 140px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.8; }
.site-foot a:hover { color: var(--text); }
@media (max-width: 760px) { .site-foot { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  body::after, .scroll-cue::after { animation: none; }
}

/* Accent: the active portfolio item and labels pick up the warm logo yellow */
.label { color: var(--gold); }
.label::before { background: var(--gold); }

/* ---------- Polish ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1, h2, h3, .statement { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.btn:focus-visible { border-radius: 999px; }

.shot { display: block; flex: none; border-radius: 18px; }
.shot img { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.shot:hover img { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.2); }

/* Screenshot lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: rgba(12, 15, 36, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; width: auto; border-radius: 22px; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.lightbox button { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--text); font-size: 22px; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.16); }
.lightbox .prev { left: 3vw; } .lightbox .next { right: 3vw; }
.lightbox .close { top: 28px; right: 3vw; transform: none; }
.lightbox .count { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; }

/* ---------- Design pass ---------- */

/* Wordmark (clean, works next to minimal typography; full colour logo stays for games) */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.wordmark img { width: 28px; height: 28px; }
.wordmark b { font-weight: 600; color: var(--gold); }
.nav .nav-cta { color: var(--bg); background: var(--text); padding: 8px 16px; border-radius: 999px; font-weight: 500; transition: background .2s; }
.nav .nav-cta:hover { color: var(--bg); background: #fff; }

/* Cursor waits for the first pointer move instead of sitting in the corner */
.cursor, .cursor-ring { opacity: 0; transition: opacity .3s, width .25s, height .25s, background .25s, border-color .25s; }
body.cursor-ready .cursor, body.cursor-ready .cursor-ring { opacity: 1; }

/* Hero: copy on the left, real games on the right */
.hero { align-items: center; padding-top: 130px; padding-bottom: 100px; }
.hero-inner { max-width: min(860px, 56vw); }
.hero h1 { font-size: clamp(48px, 6.6vw, 124px); }
@media (max-width: 1000px) { .hero-inner { max-width: none; } .hero h1 { font-size: clamp(44px, 11vw, 96px); } }
.kicker { color: var(--gold); }
.hero-lead { max-width: 480px; margin: 34px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.gear-bg { right: -26vw; opacity: .8; }
.showcase { position: absolute; right: clamp(20px, 6vw, 110px); top: 50%; width: clamp(300px, 34vw, 520px); height: clamp(380px, 62vh, 620px); translate: 0 -50%; z-index: 1; transform-style: preserve-3d; }
.hero { perspective: 1600px; }
.phone {
  position: absolute; top: 50%; left: 50%; margin: 0; width: 46%; aspect-ratio: 293 / 520;
  border-radius: 30px; padding: 7px; background: #0e1230;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 40px 80px rgba(5, 8, 30, .55);
  will-change: transform;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.phone figcaption { display: none; }
.phone-1 { transform: translate(-50%, -50%) translateZ(60px); z-index: 3; }
.phone-2 { transform: translate(-112%, -44%) rotate(-8deg); z-index: 2; opacity: .92; }
.phone-3 { transform: translate(12%, -44%) rotate(8deg); z-index: 2; opacity: .92; }
@media (max-width: 1000px) {
  .hero { flex-direction: column; justify-content: center; padding-top: 110px; }
  .showcase { position: relative; right: auto; top: auto; translate: none; width: min(420px, 90vw); height: 360px; margin: 56px auto 0; }
  .gear-bg { right: -40vw; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) { .showcase { width: 300px; height: 250px; margin-top: 44px; } .phone { width: 40%; } .hero-actions .btn { padding: 14px 22px; } .phone { border-radius: 22px; padding: 5px; } .phone img { border-radius: 18px; } .phone figcaption { display: none; } }

/* Facts: three real facts, no filler */
.facts { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { border-left: 0; padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 18px; }
  .fact .mono { margin-top: 0; }
}

/* Contact: statement + clear routes */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 6vw; align-items: end; }
.topics { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.topics a { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px; padding: 22px 40px 22px 0; border-bottom: 1px solid var(--line); transition: background .25s, padding .25s; }
.topics a:hover { background: rgba(255,255,255,.04); padding-left: 12px; }
.topics .mono { color: var(--gold); padding-top: 4px; }
.topics b { font-family: var(--display); font-weight: 500; font-size: 20px; }
.topics span:not(.mono) { grid-column: 2; color: var(--muted); font-size: 15px; line-height: 1.5; }
.topics i { position: absolute; right: 8px; top: 24px; font-style: normal; color: var(--muted); transition: transform .25s, color .25s; }
.topics a:hover i { transform: translate(3px, -3px); color: var(--gold); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 56px; } }

/* Footer */
.site-foot { grid-template-columns: 1.6fr 1fr 1fr; margin-top: 120px; padding-top: 40px; font-size: 15px; }
.site-foot h3 { margin: 0 0 14px; color: var(--muted); font-weight: 500; }
.site-foot a { display: block; color: var(--text); opacity: .82; padding: 3px 0; }
.site-foot a:hover { opacity: 1; color: var(--gold); }
.foot-brand p { margin: 16px 0 10px; color: var(--muted); line-height: 1.7; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }
.foot-bottom a:hover { color: var(--gold); }
@media (max-width: 760px) { .site-foot { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .mail { font-size: 5vw; word-break: normal; gap: 10px; } }

/* Trailer modal */
.video-modal { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(12, 15, 36, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.video-modal.open { display: flex; }
.video-frame { width: min(1100px, 92vw); aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.video-frame.vertical { width: auto; height: min(86vh, 900px); aspect-ratio: 9 / 16; max-width: 92vw; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal .close { position: absolute; top: 24px; right: 3vw; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--text); font-size: 20px; cursor: pointer; }
.video-modal .close:hover { background: rgba(255,255,255,.16); }
.btn svg { flex: none; }
.foot-bottom .quiet { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
