:root {
  --ink: #173f35;
  --pine: #244f43;
  --river: #5fc7c8;
  --paper: #f7f1df;
  --sun: #f2c64b;
  --clay: #e94f37;
  --stone: #5e6058;
  --white: #fffaf0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 63, 53, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 63, 53, .08) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 18px 12px;
  color: var(--white);
  background: var(--ink);
  border-right: 6px solid var(--sun);
  z-index: 5;
}

.mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border: 3px solid var(--white);
  background: var(--sun);
}

.mark img {
  width: 44px;
}

.rail nav {
  display: grid;
  align-content: center;
  gap: 10px;
}

.rail a {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 8px 6px;
  color: var(--white);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  border: 2px solid rgba(255, 250, 240, .22);
}

.rail a:hover,
.rail a.active {
  color: var(--ink);
  background: var(--sun);
  border-color: var(--sun);
}

.rail small {
  writing-mode: vertical-rl;
  margin: 0 auto;
  font-weight: 900;
  color: rgba(255, 250, 240, .74);
}

.content {
  min-width: 0;
  overflow: hidden;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1fr);
  align-items: stretch;
  border-bottom: 6px solid var(--ink);
}

.hero-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(28px, 6vw, 82px);
  background: var(--white);
}

.eyebrow {
  width: fit-content;
  padding: 8px 12px;
  color: var(--white);
  background: var(--clay);
  font-weight: 950;
  text-transform: uppercase;
  border: 3px solid var(--ink);
}

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

h1 {
  max-width: 720px;
  font-size: clamp(50px, 6.1vw, 88px);
  line-height: .86;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 620px;
}

.hero-copy p {
  max-width: 590px;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 750;
  color: rgba(23, 63, 53, .78);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--sun);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: var(--river);
}

.btn.ghost {
  background: var(--white);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.hero-art {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  background: var(--pine);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.route-ribbon {
  position: absolute;
  left: 32px;
  bottom: 28px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  max-width: 420px;
  padding: 16px;
  background: var(--white);
  border: 4px solid var(--ink);
}

.route-ribbon img {
  width: 78px;
  height: 78px;
}

.route-ribbon strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
}

.route-ribbon span {
  display: block;
  margin-top: 6px;
  font-weight: 800;
  color: rgba(23, 63, 53, .72);
}

.game-zone {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 340px;
  gap: 26px;
  padding: clamp(22px, 4vw, 54px);
  background: linear-gradient(135deg, #f7f1df 0%, #fffaf0 52%, #e7f5ef 100%);
}

.game-wrap {
  min-width: 0;
}

.ridge-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.ridge-title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: .96;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.score-strip div,
.panel-block,
.text-slab,
.contact-grid section {
  background: var(--white);
  border: 3px solid var(--ink);
}

.score-strip div {
  padding: 10px;
}

.score-strip span {
  display: block;
  color: rgba(23, 63, 53, .65);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.score-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 30px;
  line-height: 1;
}

.canvas-box {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--ink);
  background: #80d7d5;
  min-height: 620px;
}

canvas {
  display: block;
  width: 100%;
  height: min(72vh, 720px);
  min-height: 620px;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(247, 241, 223, .78);
}

.overlay.hidden {
  display: none;
}

.start-card {
  max-width: 460px;
  padding: 28px;
  text-align: center;
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
}

.start-card img {
  width: 110px;
}

.start-card h2 {
  margin: 8px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
}

.start-card p {
  margin-bottom: 20px;
  font-weight: 780;
  line-height: 1.45;
  color: rgba(23, 63, 53, .72);
}

.side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel-block {
  padding: 18px;
}

.panel-block h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.panel-block p,
.panel-block li,
.text-slab p,
.contact-grid p {
  font-weight: 730;
  line-height: 1.55;
  color: rgba(23, 63, 53, .75);
}

.panel-block ul {
  padding-left: 20px;
  margin: 0;
}

.current-meter {
  height: 18px;
  overflow: hidden;
  background: rgba(23, 63, 53, .14);
  border: 2px solid var(--ink);
}

.current-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--river), var(--sun), var(--clay));
}

.page-main {
  padding: clamp(24px, 6vw, 84px);
}

.page-head {
  max-width: 980px;
  margin-bottom: 28px;
}

.page-head h1 {
  font-size: clamp(48px, 7vw, 92px);
}

.page-head p {
  max-width: 760px;
  margin-top: 16px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 760;
  color: rgba(23, 63, 53, .75);
}

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

.text-slab {
  padding: 24px;
}

.text-slab.wide {
  grid-column: 1 / -1;
}

.text-slab h2,
.text-slab h3,
.contact-grid h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-grid section {
  padding: 22px;
}

.footer-band {
  padding: 24px clamp(24px, 4vw, 54px);
  color: var(--white);
  background: var(--ink);
  font-weight: 850;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    height: auto;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    border-right: 0;
    border-top: 0;
    border-bottom: 5px solid var(--sun);
    order: 1;
  }

  .rail nav {
    display: flex;
    overflow-x: auto;
    align-content: stretch;
    justify-content: flex-start;
  }

  .rail a {
    min-width: 94px;
  }

  .rail small {
    display: none;
  }

  .content {
    order: 2;
  }

  .hero,
  .game-zone {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .hero-copy,
  .page-main {
    padding: 24px 16px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 46px;
  }

  .hero-copy h1 {
    max-width: 8.2ch;
  }

  .hero-copy p {
    max-width: 28ch;
    font-size: 18px;
  }

  .hero-art {
    min-height: 400px;
  }

  .route-ribbon {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: 58px 1fr;
  }

  .route-ribbon img {
    width: 58px;
    height: 58px;
  }

  .score-strip,
  .side-panel,
  .text-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .canvas-box,
  canvas {
    min-height: 520px;
  }

  canvas {
    height: 520px;
  }

  .text-slab.wide {
    grid-column: auto;
  }
}
