:root {
  color-scheme: light;
  --ink: #17120d;
  --muted: #5f5045;
  --paper: #f5ebd8;
  --panel: #fff8e8;
  --vermilion: #be2f28;
  --matcha: #487550;
  --indigo: #173553;
  --night: #10263a;
  --wood: #5b321f;
  --gold: #d49a24;
  --teal: #237f74;
  --plum: #5c4b6d;
  --sky: #74b8c7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    repeating-linear-gradient(172deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, #f7eddb 0%, #efe0c4 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px 28px;
  background: rgba(245, 235, 216, 0.92);
  border-bottom: 1px solid rgba(91, 50, 31, 0.16);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(16, 38, 58, 0.18);
}

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.site-header nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--ink);
  background: rgba(72, 117, 80, 0.14);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 48px;
  min-height: calc(100svh - 128px);
  overflow: hidden;
  padding: 48px 7vw 36px;
  color: #fff8e8;
  background:
    linear-gradient(0deg, rgba(16, 38, 58, 0.9), rgba(16, 38, 58, 0.82)),
    url("assets/app-icon.png") center right 10% / min(58vw, 760px) no-repeat,
    var(--night);
}

.hero::after {
  position: absolute;
  right: -12%;
  bottom: -9%;
  width: 58%;
  height: 42%;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 212, 93, 0.92) 12% 16%, transparent 16% 31%, rgba(255, 255, 255, 0.55) 31% 34%, transparent 34% 100%),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(255, 255, 255, 0.2) 38px 48px);
  transform: skewX(-18deg) rotate(-2deg);
  opacity: 0.8;
}

.rail-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.rail {
  position: absolute;
  bottom: 8%;
  width: 44%;
  height: 10px;
  background: rgba(255, 248, 232, 0.52);
}

.rail-a {
  left: 7%;
  transform: rotate(-18deg);
  transform-origin: left center;
}

.rail-b {
  left: 28%;
  transform: rotate(16deg);
  transform-origin: left center;
}

.platform-line {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 10%;
  height: 10px;
  background: #ffd45d;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: #a74438;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd45d;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 74px;
  line-height: 0.98;
  font-weight: 900;
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 248, 232, 0.9);
  font-size: 19px;
  line-height: 1.8;
  font-weight: 650;
}

.hero-tagline {
  max-width: 640px;
  margin-bottom: 12px;
  color: #ffd45d;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 900;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action {
  background: #ffd45d;
  color: #1b160c;
}

.ghost-action {
  border: 1px solid rgba(255, 248, 232, 0.42);
  color: #fff8e8;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  max-width: 540px;
  margin: 0;
}

.quick-stats div {
  padding: 12px;
  border: 1px solid rgba(255, 248, 232, 0.24);
  border-radius: 8px;
  background: #10263a;
}

.quick-stats dt {
  color: rgba(255, 248, 232, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.quick-stats dd {
  margin: 4px 0 0;
  color: #fff8e8;
  font-size: 20px;
  font-weight: 950;
}

.hero-visual {
  min-height: 510px;
}

.app-icon {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 172px;
  height: 172px;
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.phone {
  position: absolute;
  right: 76px;
  bottom: 0;
  width: 286px;
  min-height: 508px;
  padding: 14px 14px 16px;
  border: 8px solid #102032;
  border-radius: 38px;
  background:
    repeating-linear-gradient(172deg, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px 28px),
    #f7eddb;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.36);
}

.phone::before {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 88px;
  height: 20px;
  content: "";
  background: #102032;
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(91, 50, 31, 0.12);
}

.phone-top span {
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 19px;
  font-weight: 900;
}

.phone-top strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 50px;
  border-radius: 8px;
  background: var(--indigo);
  color: #fff8e8;
  font-size: 17px;
}

.mini-objectives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.mini-objectives span,
.booster-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--wood);
  font-size: 13px;
  font-weight: 900;
}

.board-preview {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 9px;
  border: 5px solid var(--wood);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 212, 93, 0.42) 18% 21%, transparent 21% 100%),
    #c1ad78;
}

.tile {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  min-width: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32), 0 3px 0 rgba(0, 0, 0, 0.12);
}

.tile.red {
  background: var(--vermilion);
}

.tile.blue {
  background: #265b8a;
}

.tile.amber {
  background: #d77826;
}

.tile.green {
  background: var(--matcha);
}

.tile.plum {
  background: var(--plum);
}

.tile.teal {
  background: var(--teal);
}

.tile.gold {
  background: var(--gold);
  color: #25190d;
}

.tile.special {
  outline: 3px solid #ffd45d;
  outline-offset: -5px;
}

.booster-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.station-band,
.play-section,
.xcode-section,
.rules-section,
.permissions-section,
.faq-section,
.support-section {
  padding: 86px 7vw;
}

.station-band {
  background: linear-gradient(180deg, #fff8e8, #f3e2c1);
}

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

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.72;
  font-weight: 650;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 42px;
  line-height: 1.16;
}

.world-grid,
.xcode-grid,
.feature-board,
.weather-grid,
.faq-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.world-grid article,
.project-card,
.feature-board article,
.weather-grid article,
.faq-grid article,
.support-grid article,
.table-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(91, 50, 31, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.84);
  box-shadow: 0 12px 26px rgba(91, 50, 31, 0.08);
}

.world-grid h3,
.project-card h3,
.feature-board h3,
.weather-grid b,
.faq-grid h3,
.support-grid h3,
.table-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.world-grid p,
.project-card p,
.feature-board p,
.weather-grid p,
.faq-grid p,
.support-grid p,
.table-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.72;
  font-weight: 650;
}

.intro-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1080px;
}

.intro-layout p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.82;
  font-weight: 650;
}

.stamp {
  display: grid;
  width: 56px;
  height: 64px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 8px;
  background: var(--vermilion);
  color: #fff8e8;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 28px;
  font-weight: 900;
}

.stamp.green {
  background: var(--matcha);
}

.stamp.indigo {
  background: var(--indigo);
}

.play-section {
  background: #f7eddb;
}

.rules-section,
.faq-section {
  background: #fff8e8;
}

.support-section {
  background: #f3e2c1;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(280px, 410px) 1fr;
  gap: 28px;
  align-items: start;
}

.route-list {
  display: grid;
  gap: 12px;
}

.route-list div {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border-radius: 8px;
  background: var(--night);
  color: #fff8e8;
}

.route-list b {
  color: #ffd45d;
  font-size: 26px;
}

.route-list span {
  line-height: 1.55;
  font-weight: 800;
}

.feature-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-board-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-card {
  min-height: 0;
  background: rgba(255, 248, 232, 0.96);
  overflow: hidden;
}

.table-card table,
.pricing-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table-card th,
.table-card td,
.pricing-table th,
.pricing-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(91, 50, 31, 0.14);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.table-card th,
.pricing-table th {
  color: var(--wood);
  font-weight: 900;
}

.weather-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weather-grid article {
  min-height: 190px;
}

.weather-grid b,
.weather-grid span {
  display: block;
}

.weather-grid b {
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.weather-grid span {
  margin-bottom: 8px;
  color: var(--matcha);
  font-weight: 900;
}

.xcode-section {
  background: var(--night);
  color: #fff8e8;
}

.xcode-section .eyebrow {
  color: #ffd45d;
}

.xcode-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card {
  background: rgba(255, 248, 232, 0.08);
  border-color: rgba(255, 248, 232, 0.16);
  box-shadow: none;
}

.project-card p {
  color: rgba(255, 248, 232, 0.78);
}

.iap-section .section-heading > p:not(.eyebrow),
.iap-section .fine-print {
  color: rgba(255, 248, 232, 0.76);
}

.pricing-table {
  overflow: hidden;
  border: 1px solid rgba(255, 248, 232, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.08);
}

.pricing-table th,
.pricing-table td {
  border-bottom-color: rgba(255, 248, 232, 0.14);
}

.pricing-table th {
  color: #ffd45d;
}

.fine-print {
  margin: 18px 0 0;
  line-height: 1.72;
  font-weight: 650;
}

.permissions-section {
  background: #f3e2c1;
}

.privacy-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.privacy-layout .feature-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-grid {
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
}

.support-card {
  min-height: 230px;
}

.support-primary {
  background: rgba(255, 248, 232, 0.94);
  color: var(--ink);
}

.support-primary p {
  color: var(--muted);
}

.support-email {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 14px;
  border-radius: 8px;
  background: #ffd45d;
  color: #17120d;
  font-weight: 950;
}

.download-section {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 58px 7vw;
  background: var(--matcha);
  color: #fff8e8;
}

.download-section img {
  width: 90px;
  height: 90px;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(16, 38, 58, 0.26);
}

.download-section h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 32px;
}

.download-section p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 248, 232, 0.78);
  font-weight: 650;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 30px 7vw;
  background: #0d1c2b;
  color: #fff8e8;
}

.site-footer img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  margin-top: 4px;
  color: rgba(255, 248, 232, 0.68);
  font-size: 14px;
}

@media (max-width: 1120px) {
  h1 {
    font-size: 58px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .app-icon {
    right: 8%;
  }

  .phone {
    right: 28%;
  }

  .xcode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-header nav a {
    padding: 9px 10px;
  }

  .hero,
  .station-band,
  .play-section,
  .xcode-section,
  .rules-section,
  .permissions-section,
  .faq-section,
  .support-section,
  .download-section {
    padding-inline: 22px;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  h1 {
    font-size: 44px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .quick-stats,
  .world-grid,
  .play-layout,
  .feature-board,
  .feature-board-wide,
  .xcode-grid,
  .weather-grid,
  .faq-grid,
  .support-grid,
  .intro-layout,
  .privacy-layout,
  .download-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 490px;
  }

  .app-icon {
    width: 136px;
    height: 136px;
    border-radius: 24px;
  }

  .phone {
    right: 50%;
    width: 290px;
    min-height: 548px;
    transform: translateX(50%);
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .hero-tagline {
    font-size: 23px;
  }

  .download-section {
    align-items: start;
  }

  .world-grid article,
  .project-card,
  .feature-board article,
  .weather-grid article,
  .faq-grid article,
  .support-grid article,
  .table-card {
    min-height: 0;
  }
}

@media (max-width: 440px) {
  .hero-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
  }

  .primary-action,
  .ghost-action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-stats div {
    padding: 9px;
  }

  .quick-stats dt {
    font-size: 10px;
  }

  .quick-stats dd {
    font-size: 16px;
  }

  .hero {
    padding-top: 32px;
    padding-bottom: 28px;
    background:
      linear-gradient(0deg, rgba(16, 38, 58, 0.92), rgba(16, 38, 58, 0.84)),
      url("assets/app-icon.png") center right -40px / 300px no-repeat,
      var(--night);
  }

  .hero-visual {
    display: none;
  }

  .phone {
    width: 274px;
  }

  .tile {
    font-size: 11px;
  }

  .mini-objectives span,
  .booster-row span {
    font-size: 12px;
  }
}
