/* Spiel — spiel.so
   Ink, volt, Bricolage. Dark only. */

:root {
  --ink: #121212;
  --surface: #1f1f1f;
  --raised: #313131;
  --text: #faf3e0;
  --muted: #a3a199;
  --volt: #efff2e;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4.5rem, 11vw, 8.5rem);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
}

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

html {
  color-scheme: dark;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--volt); }

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

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  padding: .6rem 1rem;
  background: var(--volt);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* Type -------------------------------------------------------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 6.5vw + 0.5rem, 5.5rem); }
h2 { font-size: clamp(2rem, 3.6vw + 0.6rem, 3.4rem); letter-spacing: -0.025em; }
h3 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }

p { margin: 0; }

.lede {
  font-size: clamp(1.125rem, 1.1vw + 0.9rem, 1.35rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}

.volt { color: var(--volt); font-style: normal; }

/* Buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--raised);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }

.btn-volt {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--ink);
}
.btn-volt:hover { border-color: var(--volt); background: #f6ff6a; }

/* App Store badge (inline SVG) */
.badge {
  display: inline-block;
  width: 168px;
  height: 56px;
  border-radius: 9px;
  outline-offset: 4px;
}
.badge svg { width: 100%; height: 100%; }
.badge-sm { width: 120px; height: 40px; border-radius: 6px; }

/* Store CTA: volt "Get Spiel" pill first, the official badge beside it */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
}
.btn-store {
  min-height: 3.6rem;
  padding: .75rem 1.9rem .75rem 1.4rem;
  gap: .9rem;
  text-align: left;
  line-height: 1.1;
}
.btn-store .apple {
  flex: none;
  width: 2rem;
  height: 2rem;
  fill: currentColor;
}
.btn-store-text { display: grid; gap: .2rem; }
.btn-store strong { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.015em; }
@media (max-width: 519px) {
  .cta-row { flex-direction: column; }
}

/* Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.logo {
  display: block;
  height: 40px;
  width: 62px;
  overflow: hidden;
  border-radius: 6px;
}
.logo img {
  /* The icon is a 1024px square wordmark with deep padding (letters sit at
     roughly x 12–90%, y 34–70%). Scale and offset so only the word shows. */
  height: 76px;
  width: 76px;
  max-width: none;
  margin: -21px 0 0 -8px;
}

/* Sections — everything centred in one column ---------------- */

main > section { padding-block: var(--section); }
main > section + section { border-top: 1px solid var(--surface); }

main .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(2rem, 5vw, 3.5rem);
}

main h2 { max-width: 20ch; }

/* Hero */

.hero { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { gap: 2.25rem; }
.hero h1 { max-width: 12ch; }

/* The wheel: a phone-framed loop of the real app */
.phone {
  width: min(300px, 78vw);
  aspect-ratio: 720 / 1566;
  padding: 10px;
  border-radius: 46px;
  background: #000;
  border: 1px solid var(--raised);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  background: #000;
}

/* Steps — the only sequence on the page, so it gets numbers */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  width: 100%;
  counter-reset: step;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--raised);
  border-radius: var(--r-md);
  padding: 2rem 1.5rem;
  display: grid;
  justify-items: center;
  gap: 1rem;
  align-content: start;
}
.steps li::before {
  content: counter(step);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--volt);
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 96;
}

/* Screenshots — a row on desktop, a snap-scrolling strip on phones */
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: .5rem;
}
.shots::-webkit-scrollbar { display: none; }
.shots li {
  flex: 0 0 min(72vw, 260px);
  scroll-snap-align: center;
}
.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: var(--r-lg);
  border: 1px solid var(--raised);
  background: var(--surface);
}
@media (min-width: 900px) {
  .shots { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; padding-bottom: 0; }
  .shots li { flex: none; }
}

/* One screen on its own — the transcript, the stats — sized like the hero phone */
.screen {
  width: min(300px, 78vw);
  height: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: var(--r-lg);
  border: 1px solid var(--raised);
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
main .wrap > .lede { max-width: 36ch; margin-top: -0.75rem; text-wrap: balance; }

/* Why it works */
.claims {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(100%, 44ch);
  border-top: 1px solid var(--raised);
}
.claims li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--raised);
  font-size: clamp(1.2rem, 1.2vw + 0.9rem, 1.55rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.research {
  max-width: 40ch;
  font-size: clamp(1.2rem, 1.2vw + 0.9rem, 1.55rem);
  line-height: 1.35;
  font-weight: 500;
  color: var(--muted);
  text-wrap: balance;
}
.research strong { color: var(--text); font-weight: 800; }

/* This week */
.week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
  /* One block, sized to its longest row and centred; every row then
     left-aligns inside it so the checks and the text share an x. */
  width: fit-content;
  max-width: min(100%, 34rem);
  margin-inline: auto;
}
.week li {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--raised);
  border-radius: var(--r-sm);
  font-size: 1.2rem;
  font-weight: 600;
}
.week li::before {
  content: "";
  flex: 0 0 auto;
  width: 1.5rem; height: 1.5rem;
  margin-top: .18rem; /* centres the check on the first line of text */
  border-radius: 6px;
  background: var(--volt);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 100% no-repeat, linear-gradient(#000 0 0);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 100% no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Testimonials */
.quotes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  width: 100%;
}
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quotes li {
  background: var(--surface);
  border: 1px solid var(--raised);
  border-radius: var(--r-md);
  padding: 2rem 1.5rem;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  align-content: start;
}
.quotes figure { margin: 0; display: contents; }
.quotes blockquote { margin: 0; font-size: 1.1rem; line-height: 1.5; text-wrap: pretty; }
.quotes figcaption {
  display: grid;
  justify-items: center;
  gap: .6rem;
  font-weight: 700;
}
.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--raised);
}

/* Footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--surface);
  padding-block: 2.5rem 3.5rem;
  font-size: .95rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}
.site-footer nav a { text-decoration: none; color: var(--text); font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; }
.site-footer address p + p { margin-top: 1em; }
.site-footer address a { color: var(--text); text-decoration: none; }
.site-footer address a:hover { text-decoration: underline; }

/* Inner pages (legal, support) -------------------------------- */

.page { padding-block: clamp(3rem, 7vw, 5.5rem) var(--section); }
.page .wrap { display: block; text-align: left; max-width: 46rem; }
.page h1 { font-size: clamp(2.25rem, 4vw + 0.5rem, 3.6rem); margin-bottom: 1.5rem; }
.page h2 { font-size: 1.5rem; letter-spacing: -0.015em; line-height: 1.2; margin: 2.75rem 0 .75rem; max-width: none; }
.page h3 { font-size: 1.15rem; margin: 1.75rem 0 .35rem; }
.page p { margin: .8rem 0; text-wrap: pretty; }
.page ul { padding-left: 1.25rem; margin: .8rem 0; }
.page li { margin: .4rem 0; }
.page li::marker { color: var(--volt); }
.page a { color: var(--text); overflow-wrap: anywhere; }
.page strong { font-weight: 700; color: var(--text); }
.page footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--raised);
  color: var(--muted);
  font-size: .95rem;
}
.page footer a { color: var(--muted); }

/* Support: one line and an email, centred like the landing page */
.support .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.5rem;
}
.support h1 { margin: 0; }
.support .btn { margin-top: .5rem; }

/* Motion ------------------------------------------------------ */

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