:root {
  color-scheme: dark;
  --background: #171719;
  --surface: #222225;
  --text: #f4f1ed;
  --muted: #b7b2c4;
  --accent: #c7bbff;
  --line: #3d3a44;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--background); color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .24em; text-decoration-thickness: .07em; }
a:hover { text-decoration-thickness: .13em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 3px; }
p { margin: 0 0 1.2rem; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; font-weight: 620; }
h1 { font-size: clamp(3.6rem, 7.1vw, 6.3rem); letter-spacing: -.065em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.35rem); letter-spacing: -.045em; }
h3 { font-size: 1.4rem; letter-spacing: -.025em; }
section { scroll-margin-top: 2rem; }
.wrap { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 10; background: var(--accent); color: var(--background); padding: .8rem 1.2rem; border-radius: .6rem; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.22rem; font-weight: 650; color: var(--text); text-decoration: none; letter-spacing: -.03em; }
.brand img { border-radius: 11px; }
.site-header nav { display: flex; gap: 2rem; }
.site-header nav a { padding-block: .6rem; color: var(--muted); font-size: .86rem; text-decoration: none; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4.5rem; align-items: center; padding-block: 30px 112px; }
.hero-copy { padding-bottom: 1rem; }
.intro { font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: -.025em; line-height: 1.4; margin-top: 1.5rem; margin-bottom: 1.4rem; }
.hero-description { max-width: 38ch; color: var(--muted); font-size: 1.02rem; margin-bottom: 1.8rem; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: .8rem 1.4rem; border-radius: 15px; background: var(--accent); color: #201c2d; font-weight: 650; font-size: .94rem; text-decoration: none; }
.button:hover { background: #d5ccff; text-decoration: none; }
.availability { margin-top: 2.25rem; }
.availability p { font-size: .87rem; font-weight: 600; margin-bottom: .1rem; }
.availability span { font-size: .77rem; color: var(--muted); }
.hero-art { margin: 0; position: relative; }
.hero-art img { width: 100%; height: 580px; object-fit: cover; border-radius: 140px 140px 24px 24px; }
.hero-art figcaption { position: absolute; inset: auto 0 0; padding: 5rem 1.5rem 1.4rem; background: linear-gradient(transparent, rgba(9, 10, 13, .93)); border-radius: 0 0 24px 24px; font-size: 1rem; font-weight: 580; line-height: 1.35; }
.hero-art figcaption span { display: block; font-size: .75rem; color: #d2cfd8; font-weight: 400; margin-top: .35rem; }

.story-section { border-top: 1px solid var(--line); padding-block: 100px 120px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .75fr); align-items: center; gap: 6rem; }
.story-copy h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); }
.section-intro { color: var(--muted); max-width: 47ch; margin-top: 1.4rem; }
.example { margin-block: 2rem 1.5rem; border-left: 2px solid var(--accent); padding-left: 1.4rem; }
.example-label { font-size: .77rem; color: var(--muted); margin-bottom: 1.2rem; }
.example h3 { font-size: .78rem; font-weight: 600; color: var(--accent); letter-spacing: 0; margin-bottom: .55rem; }
.example .player-move p { font-size: 1.05rem; line-height: 1.5; margin-bottom: 1.4rem; }
.story-response p { font-family: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.33rem; line-height: 1.6; letter-spacing: -.015em; }
.example .example-note { font-size: .72rem; color: var(--muted); margin-top: 1rem; margin-bottom: 0; }
.story-explanation { color: var(--muted); font-size: .9rem; max-width: 49ch; }
.app-preview { margin: 0; width: min(100%, 306px); justify-self: center; }
.app-preview > a { display: block; border-radius: 29px; }
.app-preview img { width: 100%; border: 1px solid #4c4754; border-radius: 29px; }
.app-preview figcaption { color: var(--muted); font-size: .7rem; text-align: center; line-height: 1.7; margin-top: 1rem; }

.worlds-section { padding-block: 0 110px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 3rem; margin-bottom: 2.6rem; }
.section-heading > p { max-width: 36ch; color: var(--muted); margin-bottom: .15rem; font-size: .94rem; }
.worlds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.world img { width: 100%; aspect-ratio: 4 / 4.9; object-fit: cover; border-radius: 18px; margin-bottom: 1.25rem; }
.world .genre { font-size: .75rem; color: var(--accent); margin-bottom: .6rem; }
.world h3 { font-size: 1.35rem; line-height: 1.25; max-width: 21ch; margin-bottom: .8rem; }
.world > p:last-child { color: var(--muted); font-size: .86rem; line-height: 1.65; margin: 0; }

.your-world-section { background: var(--surface); }
.your-world { padding-block: 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6rem; align-items: center; }
.your-world-intro > p { color: var(--muted); max-width: 39ch; margin-top: 1.5rem; }
.your-world-intro > p:last-child { font-size: .86rem; margin-bottom: 0; margin-top: 0; }
.world-notebook { padding: 2rem 0 2rem 2rem; border-left: 1px solid #676072; }
.world-notebook h3 { font-size: 1.8rem; font-family: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-weight: 500; margin-bottom: 1rem; }
.world-notebook > p:not(.example-label) { color: var(--muted); font-size: .95rem; }
.world-notebook dl { margin: 1.5rem 0 0; }
.world-notebook dl > div + div { margin-top: 1rem; }
.world-notebook dt { font-size: .72rem; color: var(--accent); margin-bottom: .25rem; }
.world-notebook dd { margin: 0; font-size: .9rem; line-height: 1.5; }

.reading-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6rem; padding-block: 110px; }
.reading-copy p { color: var(--muted); max-width: 42ch; margin-top: 1.5rem; }
.language-copy { padding-top: .45rem; }
.language-copy h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.language-copy p { color: var(--muted); font-size: .9rem; }
.languages { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; list-style: none; margin: 1.5rem 0 0; padding: 0; font-size: .82rem; }
.languages li { padding-bottom: .15rem; }

.questions-section { border-top: 1px solid var(--line); padding-block: 90px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5rem; align-items: start; }
.questions-section h2 { font-size: clamp(2rem, 3.3vw, 2.9rem); max-width: 11ch; }
.questions details { border-bottom: 1px solid var(--line); }
.questions details:first-child { border-top: 1px solid var(--line); }
.questions summary { cursor: pointer; padding: 1.15rem 0; font-size: .97rem; font-weight: 550; }
.questions summary::marker { color: var(--accent); font-size: .7em; }
.questions details > p { color: var(--muted); font-size: .87rem; padding-right: 1.25rem; }
.questions details > p:last-child { margin-bottom: 1.5rem; }

.closing { display: flex; align-items: center; gap: 1.1rem; padding-block: 35px 55px; }
.closing img { border-radius: 18px; }
.closing p { font-size: 1.55rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.3; margin-bottom: .1rem; }
.closing span { color: var(--muted); font-size: .86rem; }
.closing > a { margin-left: auto; font-size: .85rem; }
.site-footer { padding-block: 1.8rem 2.8rem; border-top: 1px solid var(--line); display: flex; gap: 1.5rem; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 1.5rem; row-gap: .7rem; }
.site-footer a { color: var(--muted); }

@media (min-width: 1450px) {
  .hero { gap: 6rem; }
}

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .hero { gap: 2.5rem; }
  .hero-art img { height: 540px; border-top-left-radius: 105px; border-top-right-radius: 105px; }
  .story-section { gap: 3rem; }
  .your-world, .reading-section { gap: 3rem; }
  .questions-section { gap: 3rem; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 90px; }
  .site-header nav { gap: 1.1rem; }
  .site-header nav a { font-size: .73rem; }
  .site-header nav a:last-child { display: none; }
  .brand { font-size: 1.1rem; gap: .55rem; }
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding-block: 32px 65px; }
  h1 { font-size: clamp(3.35rem, 12.5vw, 5.4rem); }
  .hero-copy { padding: 0; }
  .intro { margin-top: 1.2rem; }
  .hero-description { max-width: 46ch; font-size: .97rem; }
  .availability { margin-top: 1.6rem; }
  .hero-art img { height: auto; aspect-ratio: 1 / 1.05; object-position: center 38%; border-radius: 110px 110px 20px 20px; }
  .hero-art figcaption { font-size: .94rem; }
  .story-section { padding-block: 65px; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .story-copy h2 { font-size: clamp(2rem, 6.8vw, 3rem); }
  .app-preview { width: min(76%, 290px); }
  .section-intro, .story-explanation { max-width: none; }
  .worlds-section { padding-bottom: 70px; }
  .section-heading { display: block; margin-bottom: 2rem; }
  .section-heading > p { max-width: 46ch; margin-top: 1.3rem; }
  .worlds-grid { gap: 1.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.2rem; align-content: start; }
  .world:last-child img { grid-row: 1 / 4; margin-bottom: 0; }
  .world h3 { font-size: 1.08rem; }
  .world > p:last-child { font-size: .8rem; }
  .world .genre { font-size: .7rem; margin-bottom: .4rem; }
  .your-world { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 60px; }
  .your-world-intro > p { max-width: 48ch; }
  .world-notebook { padding: .3rem 0 .3rem 1.35rem; }
  .reading-section { grid-template-columns: minmax(0, 1fr); gap: 2.1rem; padding-block: 65px; }
  .reading-copy p { max-width: 48ch; }
  .language-copy { padding-top: 0; }
  .questions-section { display: block; padding-block: 65px 35px; }
  .questions-section h2 { max-width: none; margin-bottom: 2rem; }
  .closing { flex-wrap: wrap; padding-block: 25px 40px; }
  .closing > a { margin-left: 0; flex-basis: 100%; }
  .closing img { width: 60px; height: 60px; border-radius: 15px; }
  .site-footer { flex-direction: column; gap: 1rem; }
}

@media (max-width: 390px) {
  .site-header nav { gap: .8rem; }
  .site-header nav a { font-size: .7rem; }
  .worlds-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .world img { aspect-ratio: 1 / 1; }
  .world:last-child { display: block; }
  .world:last-child img { margin-bottom: 1.25rem; }
  .world h3 { font-size: 1.35rem; max-width: none; }
  .world > p:last-child { font-size: .86rem; }
}

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

@media (forced-colors: active) {
  .button, .example, .world-notebook, .app-preview img { border: 1px solid CanvasText; }
}
