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

html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: light dark;
  --bg: #f5f6fb;
  --bg-raised: #ffffff;
  --bg-soft: #e9ecf8;
  --ink: #11152a;
  --muted: #5b6278;
  --line: #d7dced;
  --indigo: #3f51b5;
  --indigo-strong: #283891;
  --indigo-soft: #dfe3f8;
  --accent-card: #243174;
  --feature-soft: #e5e8f1;
  --violet: #6675d5;
  --dark: #10142a;
  --dark-raised: #191e3b;
  --white: #f7f8ff;
  --relief-bg: #fff5f2;
  --relief-line: #f0cbc2;
  --relief-ink: #9c342c;
  --shadow: 0 28px 80px rgba(22, 28, 67, 0.14);
  --device-shadow: 0 32px 70px rgba(9, 12, 31, 0.3);
  --radius: 30px;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1021;
    --bg-raised: #151a34;
    --bg-soft: #191f3e;
    --ink: #f0f2ff;
    --muted: #aeb4cc;
    --line: #303858;
    --indigo: #97a4ff;
    --indigo-strong: #bdc5ff;
    --indigo-soft: #272f5b;
    --accent-card: #1d275c;
    --feature-soft: #1b2140;
    --violet: #abb5ff;
    --dark: #080b18;
    --dark-raised: #12172f;
    --relief-bg: #281819;
    --relief-line: #5a302e;
    --relief-ink: #ffaaa1;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
  }
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  z-index: 1100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--dark);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 40px), var(--max));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img,
.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
  font-weight: 680;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--indigo-strong);
}

.site-header .nav-cta {
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
}

.hero {
  position: relative;
  width: min(calc(100% - 40px), var(--max));
  min-height: 750px;
  margin: 0 auto;
  padding: 72px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(410px, 0.96fr);
  align-items: center;
  gap: 70px;
}

.hero::before {
  content: "";
  position: absolute;
  inset-block: 5% 7%;
  inset-inline: -28vw 52%;
  z-index: -1;
  opacity: 0.54;
  background:
    linear-gradient(90deg, transparent 97%, var(--line) 97%),
    linear-gradient(var(--indigo-soft), transparent 70%);
  background-size: 92px 100%, 100% 100%;
  mask-image: linear-gradient(to right, transparent, black 27%, black 82%, transparent);
}

html[dir="rtl"] .hero::before {
  background:
    linear-gradient(270deg, transparent 97%, var(--line) 97%),
    linear-gradient(var(--indigo-soft), transparent 70%);
  mask-image: linear-gradient(to left, transparent, black 27%, black 82%, transparent);
}

.eyebrow,
.feature-index {
  margin: 0 0 16px;
  color: var(--indigo-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3.8rem, 7.4vw, 7rem);
  font-weight: 790;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.hero-lede {
  max-width: 620px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.8vw, 1.28rem);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero .store-badges {
  margin-top: 34px;
}

.store-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border-radius: 10px;
  line-height: 0;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.store-link:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.store-link img {
  width: auto;
  height: 48px;
}

.store-link-steam {
  width: 162px;
  height: 48px;
  overflow: hidden;
  background: #201c1c;
}

.store-link-steam img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%;
}

.proof-list {
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
}

.proof-list li {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  width: 520px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 96%, rgba(255, 255, 255, 0.11) 96%),
    linear-gradient(transparent 96%, rgba(255, 255, 255, 0.11) 96%),
    radial-gradient(circle at 35% 28%, #6d79da, transparent 48%),
    var(--dark-raised);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.device {
  overflow: hidden;
  margin: 0;
  border: 7px solid #13172a;
  border-radius: 34px;
  background: #10142a;
  box-shadow: var(--device-shadow);
}

.device img,
.device video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-frame {
  overflow: hidden;
  margin: 0;
  border: 6px solid #13172a;
  border-radius: 20px;
  background: #10142a;
  box-shadow: var(--device-shadow);
}

.desktop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-hero {
  position: absolute;
  inset-block-start: 98px;
  inset-inline-start: -6px;
  z-index: 2;
  width: 510px;
  aspect-ratio: 16 / 9;
  transform: rotate(-3deg);
}

.device-hero {
  position: absolute;
  z-index: 3;
  width: 205px;
  aspect-ratio: 600 / 1299;
}

.device-mobile {
  inset-block-end: 14px;
  inset-inline-end: 18px;
  transform: rotate(5deg);
}

html[dir="rtl"] .desktop-hero {
  transform: rotate(5deg);
}

html[dir="rtl"] .device-mobile {
  transform: rotate(-5deg);
}

.board-note {
  position: absolute;
  z-index: 4;
  min-width: 124px;
  padding: 12px 15px;
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(17, 22, 50, 0.92);
  color: var(--white);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
}

.board-note span {
  color: #b9c2ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.board-note strong {
  font-size: 1.25rem;
}

.board-note-small {
  inset-block-start: 74px;
  inset-inline-end: -4px;
}

.board-note-large {
  inset-block-end: 74px;
  inset-inline-start: -12px;
}

.relief {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 0 0 88px;
}

.relief-box {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--relief-line);
  border-radius: 22px;
  background: var(--relief-bg);
}

.relief-flag {
  padding-top: 4px;
  font-size: 2rem;
  line-height: 1;
}

.relief h2 {
  margin: 0 0 5px;
  color: var(--relief-ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

.relief p {
  max-width: 760px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

.relief p + p {
  margin-top: 4px;
  color: var(--muted);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1;
}

.section-heading-compact h2 {
  max-width: 620px;
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
}

.pillars {
  padding: 88px max(20px, calc((100vw - var(--max)) / 2));
  background: var(--dark);
  color: var(--white);
}

.pillars .eyebrow {
  color: #abb5ff;
}

.pillars-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pillar {
  min-height: 250px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: var(--dark-raised);
}

.pillar-number {
  display: block;
  margin-bottom: 50px;
  color: #909bea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.pillar h3 {
  margin: 0 0 8px;
  font-size: 1.14rem;
}

.pillar p {
  margin: 0;
  color: #b9bfd6;
  font-size: 0.91rem;
}

.features {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 112px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.feature-card-wide {
  grid-column: 1 / -1;
  min-height: 540px;
  padding: 46px 54px;
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(520px, 1.24fr);
  align-items: center;
  gap: 40px;
}

.feature-card-tall {
  min-height: 760px;
  padding: 50px 46px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: end;
}

.feature-card-compact {
  min-height: 680px;
  padding: 48px 44px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: end;
}

.feature-card-accent {
  background: var(--accent-card);
  color: #fff;
}

.feature-card-soft {
  background: var(--feature-soft);
}

.feature-card-accent .feature-index {
  color: #d7dcff;
}

.feature-card .feature-copy {
  position: relative;
  z-index: 2;
}

.feature-card h3 {
  max-width: 540px;
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3.15rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.feature-card .feature-copy p {
  max-width: 570px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.feature-card-accent .feature-copy p {
  color: #d7dcff;
}

.device-feature {
  width: 270px;
  aspect-ratio: 600 / 1299;
  justify-self: center;
  align-self: end;
  margin-bottom: -72px;
}

.desktop-feature {
  width: min(100%, 680px);
  aspect-ratio: 16 / 9;
  align-self: center;
  justify-self: end;
}

.feature-card-tall .device-feature,
.feature-card-compact .device-feature {
  margin-top: 44px;
  margin-bottom: -132px;
}

.feature-card-compact .device-feature {
  width: 248px;
}

.feature-grid-sizes {
  background:
    linear-gradient(130deg, transparent 45%, var(--indigo-soft)),
    var(--bg-raised);
}

.feature-checkpoints {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  padding: 0 64px 0;
}

.feature-checkpoints .device-feature {
  margin-bottom: -70px;
}

.free-tier {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto 112px;
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 80px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.free-tier h2 {
  margin: 0;
  font-size: clamp(2.45rem, 4vw, 4.1rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.free-tier .lede {
  margin: 24px 0 0;
  color: var(--muted);
}

.free-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.free-list li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-raised);
  font-size: 0.92rem;
}

.free-list strong {
  color: var(--indigo-strong);
}

.commitment {
  width: min(calc(100% - 40px), var(--max));
  min-height: 540px;
  margin: 0 auto 112px;
  padding: 62px 70px;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 70px;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--white);
}

.commitment-mark {
  position: relative;
  display: grid;
  place-items: center;
}

.commitment-mark::before {
  content: "";
  position: absolute;
  width: 460px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 126, 223, 0.44), transparent 66%);
}

.commitment-mark img {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
}

.commitment .eyebrow {
  color: #aeb8ff;
}

.commitment h2 {
  margin: 0 0 24px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.commitment-copy p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 0 14px;
  color: #c6cbe0;
  font-size: 0.96rem;
}

.commitment-copy .commitment-last {
  color: #fff;
  font-weight: 750;
}

.download {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto 110px;
  padding: 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
}

.download h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.download .store-badges {
  flex: 0 0 auto;
  max-width: none;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 34px 0 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-meta {
  max-width: 380px;
  text-align: end;
}

.footer-meta p {
  margin: 0;
}

.steam-legal {
  margin-top: 5px !important;
  font-size: 0.67rem;
  line-height: 1.35;
}

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

  .store-link {
    transition: none;
  }

  .device-feature video {
    display: none;
  }

  .feature-grid-sizes .device-feature {
    background: url("screenshots/twenty-five-by-twenty-five.png") center top / cover no-repeat;
  }

  .feature-focus .device-feature {
    background: url("screenshots/focus-mode.png") center top / cover no-repeat;
  }

  .feature-stamp .device-feature {
    background: url("screenshots/classic-puzzle.png") center top / cover no-repeat;
  }

  .feature-checkpoints .device-feature {
    background: url("screenshots/checkpoints.png") center top / cover no-repeat;
  }

  .feature-themes .device-feature {
    background: url("screenshots/light-mode.png") center top / cover no-repeat;
  }
}

@media (max-width: 1040px) {
  .site-header nav {
    gap: 18px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 28px;
  }

  .hero-visual {
    transform: scale(0.88);
  }

  .feature-card-wide {
    padding-inline: 48px;
  }

  .free-tier {
    gap: 50px;
  }

  footer {
    grid-template-columns: auto 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
    max-width: none;
    text-align: start;
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 72px;
  }

  .site-header nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 74px 0 72px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero::before {
    inset-inline: -20vw;
    inset-block: 0 56%;
    mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
  }

  .hero-copy {
    display: grid;
    justify-items: center;
  }

  .hero h1 {
    max-width: 680px;
  }

  .hero-lede {
    max-width: 610px;
  }

  .proof-list,
  .store-badges {
    justify-content: center;
  }

  .hero-visual {
    width: min(100%, 560px);
    margin: 24px auto 0;
    transform: none;
  }

  .relief {
    padding-bottom: 72px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .pillar {
    min-height: auto;
  }

  .pillar-number {
    margin-bottom: 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-wide {
    grid-column: auto;
    min-height: 760px;
    padding: 50px 44px 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: end;
    gap: 0;
  }

  .feature-card-wide .device-feature {
    margin-top: 44px;
    margin-bottom: -132px;
  }

  .feature-card-wide .desktop-feature {
    width: 100%;
    margin-top: 44px;
    align-self: start;
  }

  .feature-checkpoints .device-feature,
  .feature-checkpoints .desktop-feature {
    grid-row: 2;
  }

  .free-tier {
    padding: 48px;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .commitment {
    padding: 56px 48px;
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .commitment-mark {
    display: none;
  }

  .download {
    align-items: start;
    flex-direction: column;
  }

  .download .store-badges {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .site-header {
    width: min(calc(100% - 28px), var(--max));
  }

  .brand span {
    display: none;
  }

  .site-header .nav-cta {
    padding: 8px 13px;
    font-size: 0.78rem;
  }

  .hero {
    width: min(calc(100% - 28px), var(--max));
    padding-top: 58px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .hero-lede {
    font-size: 1rem;
  }

  .store-badges {
    gap: 8px;
  }

  .store-link img {
    height: 42px;
  }

  .store-link-steam img {
    width: 100%;
    height: 100%;
  }

  .store-link-steam {
    width: 142px;
    min-height: 42px;
    height: 42px;
  }

  .download .store-badges {
    flex-wrap: wrap;
  }

  .proof-list {
    gap: 6px;
  }

  .proof-list li {
    font-size: 0.7rem;
  }

  .hero-visual {
    min-height: 500px;
    transform: scale(0.82);
    margin: -20px auto -54px;
  }

  .hero-grid {
    width: 470px;
  }

  .desktop-hero {
    inset-block-start: 112px;
    inset-inline-start: 4px;
    width: 500px;
  }

  .device-hero {
    width: 194px;
  }

  .board-note-small {
    inset-inline-end: 6px;
  }

  .board-note-large {
    inset-inline-start: 2px;
  }

  .relief {
    width: min(calc(100% - 28px), var(--max));
  }

  .relief-box {
    padding: 21px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .relief-flag {
    padding: 0;
  }

  .pillars {
    padding-block: 72px;
  }

  .features {
    width: min(calc(100% - 28px), var(--max));
    padding: 88px 0;
  }

  .feature-grid {
    gap: 14px;
  }

  .feature-card-wide,
  .feature-card-tall,
  .feature-card-compact {
    min-height: 680px;
    padding: 38px 26px 0;
  }

  .feature-grid-sizes,
  .feature-checkpoints {
    min-height: 570px;
  }

  .feature-card h3 {
    font-size: 2rem;
  }

  .feature-card .feature-copy p {
    font-size: 0.9rem;
  }

  .device-feature {
    width: 230px;
  }

  .feature-card-compact .device-feature {
    width: 220px;
  }

  .free-tier {
    width: min(calc(100% - 28px), var(--max));
    margin-bottom: 88px;
    padding: 38px 24px;
  }

  .free-tier h2 {
    font-size: 2.7rem;
  }

  .commitment {
    width: min(calc(100% - 28px), var(--max));
    min-height: auto;
    margin-bottom: 88px;
    padding: 44px 26px;
  }

  .commitment h2 {
    font-size: 3rem;
  }

  .download {
    width: min(calc(100% - 28px), var(--max));
    margin-bottom: 80px;
    padding: 0;
  }

  .download h2 {
    font-size: 3.1rem;
  }

  footer {
    width: min(calc(100% - 28px), var(--max));
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links {
    gap: 16px;
  }

  .footer-meta {
    grid-column: auto;
  }
}
