@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #fffaf3;
  --bg-soft: #fff1e0;
  --ink: #2f2420;
  --muted: #7a6358;
  --line: #efdcc6;
  --card: #ffffff;
  --teal: #189a8e;
  --teal-deep: #0f7168;
  --coral: #ef6a4f;
  --gold: #f3b23c;
  /* Icon wells stay light in both themes (like the cards in Tide Idle), so the
     game-style icons keep their contrast. */
  --icon-well: #fff1e0;
  --shadow: 0 1px 0 var(--line), 0 12px 32px -18px rgb(67 48 42 / 0.35);
  --radius: 18px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1512;
    --bg-soft: #251b16;
    --ink: #f5ead6;
    --muted: #b8a38a;
    --line: #3a2c24;
    --card: #261d18;
    --teal: #2bb8aa;
    --teal-deep: #7fd8cf;
    --coral: #ff8a70;
    --gold: #e8b95a;
    --icon-well: #f3e4cc;
    --shadow: 0 1px 0 var(--line), 0 16px 40px -20px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-deep);
}

h1,
h2,
h3 {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
  .logo-mark {
    background: linear-gradient(135deg, #2bb8aa, #0d6d64);
  }
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-soft);
}

/* Sections */
section {
  padding: 72px 0;
}

.hero {
  padding: 88px 0 64px;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 40em;
}

.soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Feature icons: the same flat, outlined style as Tide Idle's own icons, in a soft well. */
.card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--icon-well);
  box-shadow: inset 0 0 0 1px var(--line);
}

.card .icon svg {
  width: 32px;
  height: 32px;
}

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

/* App feature card */
.app-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .app-card {
    grid-template-columns: 1.1fr 1fr;
    padding: 36px;
  }
}

.app-card .feature {
  border-radius: 14px;
  width: 100%;
  aspect-ratio: 1024 / 500;
  object-fit: cover;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 4px 14px -6px rgb(0 0 0 / 0.4);
}

.app-head h3 {
  margin: 0;
  font-size: 1.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-deep);
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  border-radius: 999px;
  padding: 2px 10px;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* Official store badges: unmodified artwork, which already includes the
   required clear space (1/4 of the badge height) as transparent padding.
   At 60px the badge itself is ~40px tall (Google's minimum is 28px). */
.store-badge {
  display: inline-block;
  line-height: 0;
}

.store-badge img {
  height: 60px;
  width: auto;
}

.actions .store-badge:first-child {
  /* Line the visible badge up with the text above; the padding is only clear space. */
  margin-left: -10px;
}

/* A button next to a store badge matches the badge's visible size (~40px tall at
   60px incl. clear space), so the pair reads as one row of equals. */
.actions .store-badge ~ .btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.actions .store-badge + .btn {
  /* The badge's own clear space (10px) already separates them; keep ~16px visible. */
  margin-left: -6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 3px 0 var(--teal-deep);
}

.btn-primary:hover {
  color: #fff;
  background: var(--teal-deep);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #10201e;
    box-shadow: 0 3px 0 #0d6d64;
  }
  .btn-primary:hover {
    color: #10201e;
    background: #7fd8cf;
  }
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--muted);
}

/* Company details */
.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}

.details dt {
  color: var(--muted);
  font-weight: 600;
}

.details dd {
  margin: 0;
}

@media (max-width: 520px) {
  .details {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .details dd {
    margin-bottom: 10px;
  }
}

/* Game page */
.game-hero {
  background:
    radial-gradient(1200px 400px at 50% -10%, rgb(243 178 60 / 0.35), transparent 60%),
    linear-gradient(180deg, #ffd9a8 0%, #ffe9cc 45%, var(--bg) 100%);
}

@media (prefers-color-scheme: dark) {
  .game-hero {
    background:
      radial-gradient(900px 360px at 70% -10%, rgb(232 185 90 / 0.18), transparent 60%),
      linear-gradient(180deg, #0f1b2e 0%, #1a1a24 55%, var(--bg) 100%);
  }
}

.game-hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 860px) {
  .game-hero .wrap {
    grid-template-columns: 1.2fr 1fr;
  }
}

.game-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.game-title img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / 0.5);
}

.game-title h1 {
  margin: 0;
}

.hero-phone {
  justify-self: center;
  width: min(300px, 80%);
  border-radius: 28px;
  border: 6px solid #2f2420;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
}

.bullets {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bullets li {
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 20px 20px;
  margin: 0 -20px;
  scrollbar-width: thin;
}

.shots img {
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* Prose (policy pages) */
.prose {
  max-width: 720px;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}

.prose .updated {
  color: var(--muted);
}

/* In-page links (hero buttons) glide to their section and stop below the sticky header. */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 72px;
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer .legal {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8rem;
}

.wordmark {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prose a {
  overflow-wrap: anywhere;
}
