/* Oddmotive Games: studio site. Self-hosted fonts (SIL OFL 1.1, licences next to the font files). */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('../fonts/baloo2-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
}

:root {
  /* studio */
  --bg: #070708;
  --panel: #121009;
  --line: #211c14;
  --line-strong: #292217;
  --button-line: #2e2720;
  --cream: #fcf5e7;
  --text: #f2e9da;
  --muted: #bcb1a2;
  --dim: #8a7f70;
  --accent: #fa9f11;
  --accent-hover: #ffc45e;
  --accent-2: #f75f28;
  --on-accent: #141210;
  /* Tactical Sorcery X (the game's own palette) */
  --night: #12142a;
  --night-2: #232741;
  --night-line: #363c60;
  --gold: #ffc94a;
  --violet: #8c7ae6;
  --cyan: #9cf2ff;
  --night-text: #c9c3e6;

  --gutter: 5.5%;
  --radius: 18px;
  --display: 'Baloo 2', 'Nunito', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); color: var(--cream); margin: 0; line-height: 1.1; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-2); color: var(--cream); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1180px; margin: 0 auto; }
.section { padding: 88px var(--gutter); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.section-head h2 { font-size: clamp(30px, 4vw, 38px); font-weight: 800; }
.section-head p { font-size: 17px; color: var(--muted); }

/* buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 15px 30px; border-radius: 999px; border: 2px solid transparent; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { color: var(--text); border-color: var(--button-line); }
.btn-ghost:hover { color: var(--cream); border-color: var(--dim); }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #ffdb85; color: var(--night); }
.btn-night { color: var(--cream); border-color: var(--night-line); }
.btn-night:hover { color: var(--cream); border-color: var(--violet); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 18px var(--gutter); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--cream); }
.brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 0.03em; }
.brand b { font-weight: 600; color: var(--accent); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px; padding: 12px 14px; }
.site-nav a:hover { color: var(--accent-hover); }
.site-nav .nav-cta { background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 12px 20px; border-radius: 999px; margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--accent-hover); color: var(--on-accent); }

/* hero */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 56px 96px; padding: 96px var(--gutter) 104px;
}
.hero > img {
  width: 360px; flex-shrink: 0;
  /* the JPG has a near-black square background: fade its edge into the page */
  -webkit-mask-image: radial-gradient(closest-side, #000 84%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 84%, transparent 100%);
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; max-width: 620px; flex: 1 1 300px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 58px); line-height: 1.06; font-weight: 800; }
.hero-copy p { font-size: 19px; color: var(--muted); }
.hero .btn-row { margin-top: 8px; }

/* games */
.games-inner { display: flex; flex-direction: column; gap: 40px; }
.games-inner > *, .game > *, .game-top > * { min-width: 0; }
.game {
  position: relative; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--night-line);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(140, 122, 230, 0.22), transparent 60%),
    radial-gradient(ellipse at 85% 90%, rgba(255, 201, 74, 0.10), transparent 55%),
    linear-gradient(160deg, var(--night-2), var(--night) 70%);
  color: var(--night-text);
  padding: clamp(28px, 5vw, 56px);
  display: flex; flex-direction: column; gap: 56px;
}
.game-top { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; }
.game-intro { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.game-intro h3 { margin: 0; }
.game-intro h3 img { width: min(520px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(156, 242, 255, 0.35); border-radius: 999px; padding: 6px 12px;
}
.chips li.gold { color: var(--gold); border-color: rgba(255, 201, 74, 0.45); }
.game-lead { font-size: 19px; line-height: 1.6; color: #e6e1f7; }
.game-hero-shot { flex: 0 1 300px; margin: 0 auto; }
.game-hero-shot figure { margin: 0; }
.game-hero-shot figcaption { text-align: center; }

.phone {
  border-radius: 26px; padding: 8px; background: #05060d;
  border: 1px solid var(--night-line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.phone img { border-radius: 19px; aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }

.game h4 {
  font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--cream); margin: 0 0 20px;
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.feature {
  background: rgba(18, 20, 42, 0.7); border: 1px solid var(--night-line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.feature svg { width: 40px; height: 40px; flex-shrink: 0; }
.feature h5 { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--cream); margin: 4px 0 0; line-height: 1.2; }
.feature p { font-size: 15px; line-height: 1.6; }

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 260px); gap: 18px;
  width: max-content; max-width: 100%; margin-inline: auto; /* centred when it fits, scrolls from the start when not */
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-block: 0; list-style: none; padding-left: 0;
}
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery .phone { border-radius: 20px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.gallery .phone img { border-radius: 15px; }
.gallery figcaption { font-size: 14px; color: var(--night-text); text-align: center; }
.note { font-size: 13px; color: #8f89b3; margin-top: 12px; }
.gallery + .note { text-align: center; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1px;
  background: var(--night-line); border: 1px solid var(--night-line); border-radius: var(--radius); overflow: hidden; margin: 0;
}
.facts div { background: rgba(18, 20, 42, 0.92); padding: 16px 20px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8f89b3; }
.facts dd { margin: 4px 0 0; color: var(--cream); font-weight: 600; }

/* studio */
.cards { display: flex; flex-wrap: wrap; gap: 28px; }
.card {
  flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-strong);
}
.card .bar { width: 38px; height: 6px; border-radius: 3px; background: var(--cream); }
.card h3 { font-size: 21px; font-weight: 700; }
.card p { font-size: 15px; color: var(--muted); }

/* press */
.press-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.press-grid .card { gap: 14px; }
.downloads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.downloads li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line-strong); }
.downloads li:first-child { border-top: 0; }
.downloads span { color: var(--text); }
.downloads a { font-weight: 700; text-decoration: none; }
.downloads a + a { margin-left: 14px; }

/* contact */
.contact-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 80px; }
.contact-inner .section-head { flex: 1 1 420px; min-width: 0; }
.contact-inner .btn { font-size: 17px; padding: 17px 32px; overflow-wrap: anywhere; }

/* footer */
.site-footer {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 24px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--dim);
}
.site-footer img { width: 26px; height: 26px; border-radius: 6px; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--accent-hover); }
.site-footer .tagline { margin-left: auto; }

/* privacy and other text pages */
.prose { max-width: 760px; margin: 0 auto; padding: 72px var(--gutter) 96px; display: flex; flex-direction: column; gap: 18px; }
.prose h1 { font-size: clamp(34px, 5vw, 46px); font-weight: 800; }
.prose h2 { font-size: 24px; font-weight: 800; margin-top: 18px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose .updated { color: var(--dim); font-size: 14px; }

@media (max-width: 640px) {
  .site-header { justify-content: center; }
  .site-nav { margin-left: 0; justify-content: center; }
  .site-nav a { padding: 10px 10px; }
  .hero { padding-top: 56px; padding-bottom: 72px; gap: 40px; }
  .hero > img { width: 240px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .site-footer .tagline { margin-left: 0; }
  .btn-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
