/* Gyre: Spin Ring Maze — promo site
   Palette mirrors the game's two themes: cream daylight and night watch. */
:root {
  color-scheme: light dark;

  --bg: #fdf2e1;
  --bg-tint: #f7e6cd;
  --surface: #fffaf1;
  --surface-2: #f8edda;
  --text: #2c2419;
  --text-muted: #7b6b54;
  --border: rgba(60, 48, 32, 0.14);
  --border-strong: rgba(60, 48, 32, 0.26);
  --accent: #e2551d;
  --accent-soft: rgba(226, 85, 29, 0.12);
  --shadow: 0 1px 2px rgba(60, 48, 32, 0.06), 0 12px 32px rgba(60, 48, 32, 0.08);
  --focus: #e2551d;
  --device-frame: #2c2419;

  /* the six rotating layers, in picker order */
  --ring-1: #2b62e0;
  --ring-2: #d18f14;
  --ring-3: #0f96a8;
  --ring-4: #8f4fd1;
  --ring-5: #2b8f47;
  --ring-6: #d1497c;

  --max: 64rem;
  --pad: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --bg-tint: #100e0a;
    --surface: #221d16;
    --surface-2: #2b241b;
    --text: #f3e7d2;
    --text-muted: #a8977e;
    --border: rgba(243, 231, 210, 0.13);
    --border-strong: rgba(243, 231, 210, 0.26);
    --accent: #ff7a45;
    --accent-soft: rgba(255, 122, 69, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    --focus: #ff7a45;
    --device-frame: #40372b;

    --ring-1: #6a93ff;
    --ring-2: #f3be4e;
    --ring-3: #3fd0e2;
    --ring-4: #c08bff;
    --ring-5: #52c77a;
    --ring-6: #ff87b4;
  }
}

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

html {
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* Concentric rings behind the page — the board, abstracted. */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-layers__rings {
  position: absolute;
  top: -18vmax;
  left: 50%;
  width: 130vmax;
  height: 130vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0.5;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    transparent 0 3.4%,
    var(--border) 3.4% 3.55%
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 62%);
}

.bg-layers__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 12% 70%, color-mix(in srgb, var(--ring-3) 10%, transparent), transparent 40%),
    radial-gradient(circle at 88% 40%, color-mix(in srgb, var(--ring-4) 10%, transparent), transparent 40%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  left: var(--pad);
  top: var(--pad);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}

.site-logo img {
  height: 2.5rem;
  width: 2.5rem;
  display: block;
  border-radius: 22.5%;
  border: 1px solid var(--border);
}

.site-logo__name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-logo__name span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.btn-download:hover {
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .btn-download {
    transition: none;
  }
}

/* ---------- layout ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3.5rem, 9vw, 6rem);
  padding-bottom: 4rem;
}

.section {
  width: 100%;
  max-width: var(--max);
  padding-inline: var(--pad);
}

.section__head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section__lead {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--max);
  padding-top: 1.5rem;
  text-align: center;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.9375rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.hero__pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ring-5);
}

.hero h1 {
  margin: 0;
  padding-inline: var(--pad);
  font-size: clamp(2.25rem, 7.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 52rem;
}

.hero__lead {
  margin: 0;
  font-size: clamp(1.0625rem, 2.4vw, 1.375rem);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 40rem;
  padding-inline: var(--pad);
}

.hero__mockup-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: min(50rem, 94vw);
  margin-inline: auto;
}

.hero__mockup {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(56vh, 34rem);
  object-fit: contain;
}

.store-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding-inline: var(--pad);
}

.store-badge-link {
  display: inline-block;
  min-height: 2.75rem;
  border-radius: 8px;
}

.store-badge-link img {
  display: block;
  height: 3rem;
  width: auto;
}

.store-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--border);
  box-shadow: var(--shadow);
}

@media (min-width: 40rem) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stats div {
  padding: 1.25rem 0.75rem;
  background: var(--surface);
  text-align: center;
}

.stats dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stats dd {
  margin: 0.125rem 0 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- feature rows ---------- */

.feature {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: var(--max);
  padding-inline: var(--pad);
}

@media (min-width: 48rem) {
  .feature {
    flex-direction: row;
    gap: 3.5rem;
  }

  .feature--right {
    flex-direction: row-reverse;
  }
}

.phone {
  flex-shrink: 0;
  width: min(230px, 58vw);
  margin: 0;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 42px;
  background: var(--device-frame);
  box-shadow: var(--shadow);
}

@media (min-width: 48rem) {
  .phone {
    width: 272px;
    border-radius: 48px;
  }
}

.phone video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 886 / 1920;
  object-fit: cover;
  border-radius: 36px;
  background: var(--bg-tint);
}

@media (min-width: 48rem) {
  .phone video {
    border-radius: 42px;
  }
}

.feature__copy {
  flex: 1;
  max-width: 34rem;
}

.feature__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature__copy h2 {
  margin: 0 0 0.75rem;
}

.feature__copy > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 2.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.0625rem;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 0.8125rem;
  font-weight: 800;
}

.steps li:nth-child(1)::before {
  color: var(--ring-1);
}
.steps li:nth-child(2)::before {
  color: var(--ring-3);
}
.steps li:nth-child(3)::before {
  color: var(--ring-5);
}

/* ---------- card grids ---------- */

.cards {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card__dot {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.875rem;
  border-radius: 50%;
  border: 4px solid var(--ring-1);
}

.cards li:nth-child(2) .card__dot {
  border-color: var(--ring-2);
}
.cards li:nth-child(3) .card__dot {
  border-color: var(--ring-3);
}
.cards li:nth-child(4) .card__dot {
  border-color: var(--ring-4);
}
.cards li:nth-child(5) .card__dot {
  border-color: var(--ring-5);
}
.cards li:nth-child(6) .card__dot {
  border-color: var(--ring-6);
}

/* ---------- screenshot gallery ---------- */

.shots {
  display: grid;
  gap: 1.5rem 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
  .shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
}

.shots li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 620 / 1347;
  border-radius: 1.25rem;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shots p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- quiet-moments list ---------- */

.quiet {
  display: grid;
  gap: 0.75rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.quiet li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.quiet li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6875rem;
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  background: var(--ring-5);
}

/* ---------- price panel ---------- */

.price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface-2);
  text-align: center;
}

.price__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price__tags li {
  padding: 0.4375rem 0.9375rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* ---------- download + other apps ---------- */

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: calc(100% - 2 * var(--pad));
  max-width: var(--max);
  margin-inline: var(--pad);
  padding: clamp(1.75rem, 5vw, 3rem);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

@media (min-width: 64rem) {
  .download-card {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.download-card__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.download-card__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.download-card__icon {
  height: 5rem;
  width: 5rem;
  border-radius: 22.5%;
  border: 1px solid var(--border);
}

.download-card__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.download-card__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.other-apps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.other-apps__link {
  display: inline-block;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.other-apps__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.other-apps__row img {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 22.5%;
  border: 1px solid var(--border);
}

/* ---------- footer ---------- */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (forced-colors: active) {
  .card,
  .stats div,
  .phone,
  .price {
    border: 1px solid CanvasText;
  }
}
