/*
 * Squatty — web
 *
 * Colours, type and radii are lifted from src/theme/tokens.ts so the site and the app are the
 * same object. The one thing the site adds is the game-scene palette (sky/floor/wall) used as a
 * *surface*: in the app it is only ever the in-run background, and here it is the single bright
 * panel on an otherwise dark page.
 *
 * Fonts are self-hosted from the exact TTFs the app bundles. No CDN, no third-party request, no
 * cookie banner to write.
 */

@font-face {
  font-family: 'Anton';
  src: url('fonts/Anton-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/SpaceGrotesk-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/SpaceGrotesk-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* tokens.ts */
  --bg: #0c0907;
  --surface: #16110c;
  --surface-border: #2a211a;
  --surface-warm: #251507;
  --surface-warm-border: #5a3214;
  --text: #f5efe6;
  --muted: #8b7f76;
  --orange: #ee8238;
  --orange-deep: #d9621e;
  --gold: #f6c74d;
  --gold-text: #4a2e05;
  --divider: #241c16;
  --pill-border: #3a2c21;

  /* the in-run scene, used here as a surface */
  --sky: #c9b496;
  --floor: #4d3e30;
  --wall: #f6c74d;
  --wall-outline: #6b3a14;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  --gutter: 20px;
  --measure: 34rem; /* ~68 characters at the body size */
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

a {
  color: var(--orange);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--gold);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── masthead ─────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 22px 0 18px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover {
  color: var(--text);
}
.wordmark img {
  width: 30px;
  height: 30px;
  display: block;
}

.masthead nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.masthead nav a {
  color: var(--muted);
  text-decoration: none;
}
.masthead nav a:hover {
  color: var(--text);
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--r-lg);
  border: none;
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: #2a1403;
  box-shadow: 0 6px 0 var(--orange-deep);
}
.btn-primary:hover {
  background: #f4924d;
  color: #2a1403;
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 var(--orange-deep);
}

/* Pre-launch: the App Store link is not live yet, so the CTA states that plainly instead of
   pretending to be a store badge that goes nowhere. */
.btn-waiting {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--pill-border);
  box-shadow: none;
  cursor: default;
}

.cta-note {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 56px;
  align-items: center;
  padding: 40px 0 72px;
}

.hero h1 {
  font-size: clamp(3rem, 8.5vw, 5.75rem);
  line-height: 0.93;
  margin: 0 0 24px;
  max-width: 11ch;
}

.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: #cfc4b7;
  max-width: 32rem;
  margin: 0 0 32px;
}

/* ── the phone shot ──────────────────────────────────────────────────── */

/* A raw device screenshot has no bezel of its own, so `.framed` draws one. Keep the radius
   generous: a square-cornered screenshot on a dark page reads as a cropped image, not a phone. */
.shot.framed {
  border: 9px solid #17120e;
  border-radius: 46px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  background: #000;
}

.shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 620px;
  margin: 0 auto;
}

.stage-caption {
  margin: 18px auto 0;
  max-width: 26rem;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* ── sections ─────────────────────────────────────────────────────────── */

section {
  padding: 72px 0;
  border-top: 1px solid var(--divider);
}

.section-head {
  max-width: 30rem;
  margin: 0 0 44px;
}
.section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin: 0 0 16px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* Steps. A real sequence, so it is numbered — and staggered rather than set in three equal
   cards, because the three moments are not equal in weight. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.step {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--divider);
}
.step-num {
  font-family: 'Anton', sans-serif;
  font-size: 54px;
  line-height: 0.9;
  color: var(--surface-border);
}
.step:nth-child(2) .step-num {
  color: #3c2f24;
}
.step:nth-child(3) .step-num {
  color: var(--orange);
}

.step h3 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  color: var(--muted);
  max-width: var(--measure);
}

/* Clips + privacy: one warm panel, deliberately not a card grid. Capped to the page's left
   spine rather than stretched to the full wrap, so the paragraph inside keeps its measure and the
   panel does not become a wide box with text in one corner of it. */
.panel {
  max-width: 54rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 48px);
}

.panel h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.02;
  margin: 0 0 20px;
  max-width: 18ch;
}

.panel p {
  margin: 0 0 18px;
  max-width: var(--measure);
  color: #cfc4b7;
}
.panel p:last-child {
  margin-bottom: 0;
}

.panel-quiet {
  color: var(--muted);
  font-size: 15px;
}

/* Plans. Two cards here because the content genuinely is a comparison. */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.plan {
  border-radius: var(--r-md);
  padding: 24px;
  background: #150f0b;
  border: 1px solid var(--surface-border);
}
.plan-featured {
  background: #1e1208;
  border-color: var(--surface-warm-border);
}

.plan-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 6px;
}
.plan-price {
  font-family: 'Anton', sans-serif;
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 14px;
}
.plan-featured .plan-price {
  color: var(--gold);
}
.plan ul {
  margin: 0;
  padding: 0 0 0 18px;
  color: #cfc4b7;
  font-size: 15px;
  line-height: 1.7;
}

.terms-line {
  margin: 22px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44rem;
}

/* ── footer ───────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--divider);
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 15px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ── legal pages ──────────────────────────────────────────────────────── */

/* These pages are one column of prose. Narrowing the container keeps the rules and the masthead
   in step with the measure instead of stretching to the landing page's width. */
body.legal-page .wrap {
  max-width: 800px;
}

.legal {
  padding: 8px 0 88px;
}

.legal-head {
  padding: 40px 0 34px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 40px;
}
.legal-head h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 0.95;
  margin: 0 0 14px;
}
.legal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.legal-body {
  max-width: var(--measure);
}
.legal-body h2 {
  font-size: 24px;
  line-height: 1.15;
  margin: 44px 0 12px;
}
.legal-body h2:first-child {
  margin-top: 0;
}
.legal-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: none;
  font-weight: 700;
  font-size: 17px;
  margin: 26px 0 8px;
}
.legal-body p,
.legal-body li {
  color: #cfc4b7;
}
.legal-body ul {
  padding-left: 20px;
}
.legal-body li {
  margin-bottom: 8px;
}
.legal-body strong {
  color: var(--text);
}

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 0 56px;
  }
  .hero h1 {
    max-width: 14ch;
  }
  .shot {
    max-height: 62vh;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  :root {
    --gutter: 16px;
  }
  section {
    padding: 52px 0;
  }
  /* The three links are wider than a phone at the desktop size, and a masthead that overflows
     scrolls the whole page sideways. They take their own line instead. */
  .masthead nav {
    width: 100%;
    gap: 18px;
    font-size: 14px;
  }
  .step {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
  }
  .step-num {
    font-size: 38px;
  }
  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
