/* =========================================================
   SCORPION LABS — main stylesheet
   ========================================================= */

/* Self-hosted display font (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0c10;
  --bg-alt: #0f1116;
  --surface: #14161d;
  --surface-2: #1a1d26;
  --border: #252937;
  --border-strong: #343949;

  --text: #e9eaee;
  --text-muted: #9a9fae;
  --text-dim: #7d8293;

  --accent: #f0a63a;
  --accent-hover: #f6b551;
  --accent-soft: rgba(240, 166, 58, 0.12);

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1160px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: #111; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.accent { color: var(--accent); }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn-primary {
  background: var(--accent);
  color: #15100a;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-play {
  width: 100%;
  margin-top: auto;
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-play svg { width: 16px; height: 16px; fill: var(--accent); }
.btn-play:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-play.is-disabled {
  color: var(--text-dim);
  cursor: default;
  pointer-events: none;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
/* The blurred bar lives on a pseudo-element: backdrop-filter on the header itself
   would trap the fixed-position mobile menu inside the 68px header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 12, 16, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header.is-scrolled::before { opacity: 1; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}
.brand b { color: var(--accent); font-weight: 700; }
.brand-logo {
  filter: drop-shadow(0 0 6px rgba(240, 166, 58, 0.35));
}

.nav-menu {
  display: flex;
  gap: 6px;
}
.nav-menu a {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-menu a:hover,
.nav-menu a.is-active { color: var(--text); }
.nav-menu a.is-active::after,
.nav-menu a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 110;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 75% 40%, rgba(240, 166, 58, 0.09), transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(90, 110, 180, 0.07), transparent 70%);
}
.hero-bg::before {
  /* subtle blueprint grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
}

/* Studio emblem: the tail mark over a soft amber glow */
.hero-art {
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: min(100%, 480px);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 16%;
  z-index: -1;
  background: radial-gradient(circle, rgba(240, 166, 58, 0.2), transparent 70%);
  filter: blur(36px);
}
.hero-art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(240, 166, 58, 0.35));
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 20px;
}
.hero h1 .accent { display: block; }

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-copy {
  max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  max-width: 560px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}
.hero-stats span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 700; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Game cards ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease);
}

/* Square game icon shown on a "stage"; script.js adds a blurred copy of the icon as backdrop */
.game-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(240, 166, 58, 0.10), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.game-media::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  background: var(--art, none) center / cover no-repeat;
  filter: blur(32px) saturate(1.3);
  opacity: 0.5;
}
.game-media img {
  width: 44%;
  max-width: 172px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22%;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.6s var(--ease);
}

.game-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}
.game-body h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.game-body p { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 24px; }

.game-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}
.tag-platform {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.games-more {
  margin: 40px 0 0;
  text-align: center;
}
.games-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s, border-color 0.2s;
}
.games-more a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-text p:not(.eyebrow) { color: var(--text-muted); font-size: 1.05rem; }

.pillars { display: grid; gap: 16px; }
.pillar {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.pillar:hover { border-color: var(--border-strong); }
.pillar-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.pillar-icon svg { width: 22px; height: 22px; fill: var(--accent); }
.pillar h3 { font-size: 1.08rem; font-weight: 600; margin: 2px 0 4px; }
.pillar p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 40px;
  align-items: end;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(240, 166, 58, 0.08), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin: 28px 0 0;
}
.contact-details dt {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-details dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.contact-details dd a:hover { color: var(--accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-brand p { margin: 10px 0 0; color: var(--text-dim); font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--accent); }
.copyright {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ---------- Legal pages ---------- */
.legal {
  padding: calc(var(--header-h) + 64px) 0 96px;
}
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.legal .updated { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 40px; }
.legal h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 44px 0 14px;
  padding-top: 8px;
}
.legal p,
.legal li { color: var(--text-muted); }
.legal ul { list-style: disc; padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal a:not(.btn):not(.back-link) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); }
.legal .note {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.back-link:hover { color: var(--accent); }

/* ---------- Hover lift (only on devices with a real pointer, avoids sticky hover on touch) ---------- */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .game-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
  }
  .game-card:hover .game-media img { transform: translateY(-4px) scale(1.04); }
}

/* ---------- Reveal on scroll ----------
   Only hides content when JS is running (html.js) and the user allows motion.
   Uses an animation (not a transition) so it never overrides the cards' hover transitions. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.is-visible) { opacity: 0; }
  .js .reveal.is-visible {
    animation: reveal-in 0.7s var(--ease) var(--reveal-delay, 0ms) backwards;
  }
}
@keyframes reveal-in {
  from { opacity: 0; translate: 0 18px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .contact-card { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .brand { position: relative; z-index: 110; }

  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 105;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .nav-open .nav-menu { opacity: 1; visibility: visible; }
  .nav-menu a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    padding: 12px 24px;
  }
  .nav-menu a::after { left: 24px; right: 24px; }

  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .games-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-art {
    order: -1;
    justify-self: start;
    width: 190px;
    margin: -28px 0 0 -30px;   /* the mask leaves a soft transparent rim; pull it back into line */
  }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero-actions .btn,
  .contact-actions .btn { flex: 1 1 100%; }
  .hero-stats { gap: 16px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
