/* sortalot.app: one stylesheet, mobile first. Palette from the game's privacy page and logo. */

:root {
  color-scheme: light dark;
  --bg: #f6f3ea;
  --card: #fffdf7;
  --ink: #2b2a26;
  --muted: #6b675c;
  --line: #e4ddca;
  --accent: #3f7d3a;
  --accent-soft: #e8f1e3;

  --cream: #f3e9c6;
  --lime: #9bd34a;
  --forest: #1f3d1f;
  --forest-deep: #122612;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(43, 42, 38, 0.06), 0 8px 24px rgba(43, 42, 38, 0.08);
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1d1a;
    --card: #232621;
    --ink: #ecebe4;
    --muted: #a9a79d;
    --line: #3a3e36;
    --accent: #8fc685;
    --accent-soft: #29331f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font-body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(28px, 6vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0 0 14px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 20px; padding-top: 8px; padding-bottom: 8px;
}
.brand img { width: auto; height: 48px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-block; padding: 6px 10px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: var(--ink); text-decoration: none;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 820px);
  display: flex; align-items: center;
  color: var(--cream);
  background: var(--forest) url("/media/hero.webp") 70% center / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; max-width: none; object-fit: cover;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(31, 61, 31, 0.25) 0%, rgba(31, 61, 31, 0.6) 75%),
    linear-gradient(180deg, rgba(18, 38, 18, 0.35) 0%, rgba(31, 61, 31, 0.55) 55%, rgba(18, 38, 18, 0.9) 100%);
}
.hero .wrap {
  width: 100%; padding-top: 40px; padding-bottom: 48px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-logo { width: min(560px, 100%); margin: 0 auto 8px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35)); }
.hero h1 {
  font-size: clamp(26px, 6vw, 40px); font-weight: 700; color: var(--cream);
  margin: 0 0 8px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero .lede {
  max-width: 640px; margin: 0 auto 24px; font-size: 18px;
  color: #fbf6e4; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.platforms { margin: 16px 0 0; font-size: 15px; color: rgba(243, 233, 198, 0.9); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.1;
  text-decoration: none; text-align: center;
  transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--forest); color: var(--cream);
  border: 2px solid var(--lime);
  box-shadow: 0 5px 0 var(--forest-deep), 0 10px 24px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--lime); color: var(--forest); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--forest-deep), 0 6px 16px rgba(0, 0, 0, 0.3); }
.pill-soon {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 2px solid rgba(243, 233, 198, 0.55);
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: rgba(243, 233, 198, 0.9); background: rgba(18, 38, 18, 0.35);
  cursor: default;
}
.on-page .pill-soon { border-color: var(--line); color: var(--muted); background: transparent; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* quick facts */
.facts { padding: 40px 0 8px; }
.facts ul {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  margin: 0; padding: 0; list-style: none;
}
.facts li {
  padding: 22px 22px; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.3;
  border-top: 6px solid var(--lime);
}
@media (min-width: 760px) { .facts ul { grid-template-columns: repeat(3, 1fr); } }

/* features */
.features { display: grid; gap: 40px; }
.feature { display: grid; gap: 20px; align-items: center; }
.feature-media img, .feature-media .logo-tile {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 16 / 9; object-fit: cover;
}
.feature-media .logo-tile {
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 50% 40%, #2f5a2c 0%, var(--forest) 70%);
}
.feature-media .logo-tile img { width: min(78%, 420px); aspect-ratio: auto; box-shadow: none; border-radius: 0; }
.feature-text p { color: var(--ink); }
.feature-text p:last-child { margin-bottom: 0; }
@media (min-width: 820px) {
  .features { gap: 64px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 48px; }
  .feature:nth-child(even) .feature-media { order: 2; }
}

/* trailer */
.trailer-band { background: var(--forest); color: var(--cream); }
.trailer-band h2 { color: var(--cream); }
.trailer video {
  width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.trailer figcaption { margin-top: 12px; font-size: 14px; color: rgba(243, 233, 198, 0.8); }
.trailer figure { margin: 0; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.shots a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.25s; }
.shots a:hover img { transform: scale(1.04); }
@media (min-width: 820px) { .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (prefers-reduced-motion: reduce) { .shots img { transition: none; } .shots a:hover img { transform: none; } }

/* mobile */
.mobile-card { padding: 28px 22px; display: grid; gap: 28px; }
.mobile-card .eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--accent); margin: 0 0 4px; letter-spacing: 0.02em;
}
.mobile-card ul.checks { margin: 0 0 20px; padding: 0; list-style: none; }
.mobile-card ul.checks li { position: relative; padding-left: 30px; margin: 0 0 10px; }
.mobile-card ul.checks li::before {
  content: ""; position: absolute; left: 4px; top: 0.5em;
  width: 12px; height: 7px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}
.mobile-card .actions { justify-content: flex-start; }
.languages { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 20px; }
.languages h3 { font-size: 20px; margin-bottom: 8px; }
.languages p { margin: 0; color: var(--ink); }
.app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
@media (min-width: 820px) {
  .mobile-card { grid-template-columns: 3fr 2fr; padding: 40px; gap: 40px; align-items: start; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-footer .by { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 18px; margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy { flex-basis: 100%; margin: 0; font-size: 14px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.notfound .wrap { width: 100%; }
.notfound img { width: min(320px, 80%); margin: 0 auto 20px; }
.notfound .actions { margin-top: 24px; }
