/* =========================================================
   Arrow Maze Escape — Claymorphic “Escape Path” landing
   Soft 3D pastels, level-rail nav, floating device frame
   ========================================================= */

:root {
  --cream: #F6F0E4;
  --cream-deep: #EDE4D4;
  --mint: #8FE0B8;
  --mint-deep: #4ECF8A;
  --peach: #FFB88A;
  --peach-deep: #FF8F55;
  --sky: #7EC8F0;
  --sky-deep: #3AA8E0;
  --lilac: #C9B4F0;
  --lilac-deep: #9B7AD9;
  --navy: #163A5C;
  --navy-soft: #2A5578;
  --coral: #FF6B6B;
  --lime: #5FD068;
  --lime-deep: #3AAF48;
  --yellow: #FFE566;
  --white: #FFFEFB;
  --shadow: rgba(22, 58, 92, 0.14);
  --shadow-deep: rgba(22, 58, 92, 0.22);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --header-h: 76px;
  --clay-outer: 0 10px 0 rgba(22, 58, 92, 0.08), 0 18px 40px var(--shadow);
  --clay-btn: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 5px 0 rgba(0, 0, 0, 0.12), 0 10px 20px var(--shadow);
  --transition: 200ms ease;
  color-scheme: light;
}

[data-theme="dark"] {
  --cream: #1A2A3A;
  --cream-deep: #122030;
  --navy: #E8F2FF;
  --navy-soft: #B8D0E8;
  --white: #243848;
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-deep: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--navy);
  background: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.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: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.t-navy { color: var(--navy); }
.t-sky { color: var(--sky-deep); }
.t-coral { color: var(--coral); }

[data-theme="dark"] .t-sky { color: var(--sky); }

/* ---------- Playground background ---------- */
.play-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}

.blob--mint {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  background: radial-gradient(circle at 35% 35%, #B8F5D8, var(--mint) 60%, transparent 70%);
  top: -8%;
  left: -10%;
  animation: drift 18s ease-in-out infinite;
}

.blob--peach {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  background: radial-gradient(circle at 40% 30%, #FFD4B8, var(--peach) 55%, transparent 70%);
  bottom: 8%;
  right: -8%;
  animation: drift 22s ease-in-out infinite reverse;
}

.blob--sky {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  background: radial-gradient(circle at 50% 40%, #C8EAF8, var(--sky) 55%, transparent 70%);
  top: 38%;
  left: -6%;
  animation: drift 20s ease-in-out infinite;
}

.blob--lilac {
  width: min(30vw, 260px);
  height: min(30vw, 260px);
  background: radial-gradient(circle at 45% 35%, #E4D8FA, var(--lilac) 55%, transparent 70%);
  top: 12%;
  right: 4%;
  animation: drift 16s ease-in-out infinite reverse;
}

.float-shape {
  position: absolute;
  width: clamp(56px, 8vw, 88px);
  height: clamp(56px, 8vw, 88px);
  filter: drop-shadow(0 8px 12px var(--shadow));
  animation: bob 6s ease-in-out infinite;
}

.float-shape--a { top: 22%; left: 6%; }
.float-shape--b { bottom: 18%; right: 8%; animation-delay: -2s; }

.pellet {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.12), inset 2px 2px 4px rgba(255, 255, 255, 0.5), 0 4px 8px var(--shadow);
  animation: bob 5s ease-in-out infinite;
}

.pellet--1 { background: var(--yellow); top: 30%; right: 18%; }
.pellet--2 { background: var(--coral); bottom: 28%; left: 14%; animation-delay: -1s; width: 14px; height: 14px; }
.pellet--3 { background: var(--sky); top: 58%; right: 28%; animation-delay: -2.5s; width: 12px; height: 12px; }
.pellet--4 { background: var(--mint-deep); top: 16%; left: 28%; animation-delay: -0.8s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.05); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Header / clay nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  transition: padding var(--transition), background var(--transition);
}

.site-header.is-scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header.is-scrolled .clay-nav {
  box-shadow: var(--clay-outer);
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(10px);
}

.clay-nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem 0.55rem 0.85rem;
  background: var(--white);
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 0 rgba(22, 58, 92, 0.06), 0 12px 28px var(--shadow);
  border: 3px solid color-mix(in srgb, var(--sky) 35%, var(--white));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.brand__arrow { color: #F5C542; text-shadow: 0 1px 0 #1A4A7A; }
.brand__maze { color: var(--sky-deep); }

[data-theme="dark"] .brand__arrow { color: var(--yellow); }

.level-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}

.level-rail::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  height: 8px;
  background: var(--cream-deep);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
  z-index: 0;
}

.level-rail__item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 56px;
}

.level-node {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #E8F0F8 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 rgba(0, 0, 0, 0.1), 0 6px 12px var(--shadow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.level-node:hover {
  transform: translateY(-2px);
}

.level-node:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 2px;
}

.level-rail__item.is-active .level-node,
.level-rail__item.is-done .level-node {
  background: linear-gradient(180deg, #7AE88A 0%, var(--lime-deep) 100%);
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 4px rgba(95, 208, 104, 0.25), 0 4px 0 rgba(0, 0, 0, 0.12);
}

.level-rail__item.is-active .level-node {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 5px rgba(255, 90, 90, 0.35), 0 4px 0 rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, #FF8A8A 0%, var(--coral) 100%);
}

.level-rail__label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy-soft);
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 3px 0 rgba(0, 0, 0, 0.08);
  color: var(--navy);
  transition: transform var(--transition);
}

.theme-toggle:hover { transform: translateY(-1px); }

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--cream);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: var(--clay-btn);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn svg { width: 18px; height: 18px; }

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.18), 0 1px 0 rgba(0, 0, 0, 0.08);
}

.btn:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 3px;
}

.btn--lime {
  background: linear-gradient(180deg, #7AE88A 0%, var(--lime) 45%, var(--lime-deep) 100%);
  border: 2px solid #2F9A45;
}

.btn--clay {
  background: linear-gradient(180deg, #FFF8E8 0%, #F0E6D2 100%);
  color: var(--navy);
  border: 2px solid #D4C8B0;
}

.btn--lg {
  padding: 0.9rem 1.6rem;
  font-size: 1.05rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 1.5rem 1.25rem 3.5rem;
}

.hero__orbit {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.device-frame {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
}

.device-frame__glow {
  position: absolute;
  inset: -18px;
  border-radius: 48px;
  background: radial-gradient(circle at 50% 40%, rgba(126, 200, 240, 0.55), transparent 70%);
  filter: blur(8px);
  z-index: 0;
}

.device-frame__bezel {
  position: relative;
  z-index: 1;
  padding: 14px;
  border-radius: 40px;
  background: linear-gradient(180deg, #F4FBFF 0%, #D8EEF8 100%);
  border: 5px solid #B8DFF0;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -4px 12px rgba(58, 168, 224, 0.15),
    0 16px 0 rgba(22, 58, 92, 0.06),
    0 28px 48px var(--shadow-deep);
}

.device-frame__screen {
  width: 100%;
  aspect-ratio: 576 / 1024;
  object-fit: cover;
  object-position: top center;
  border-radius: 28px;
  background: var(--cream-deep);
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--lilac) 55%, white);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 6px 16px var(--shadow);
}

.hint-chip svg { width: 16px; height: 16px; }

.hint-chip--float {
  position: absolute;
  z-index: 2;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  animation: bob 4.5s ease-in-out infinite;
}

.hero__copy {
  text-align: left;
}

.hero__brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  background: var(--white);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 0 rgba(22, 58, 92, 0.06), 0 10px 24px var(--shadow);
}

.hero__brand-row img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero__title span {
  display: block;
}

.hero__lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  font-size: 1.08rem;
  color: var(--navy-soft);
  font-weight: 600;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero__pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy-soft);
  box-shadow: 0 3px 0 rgba(22, 58, 92, 0.05);
}

.hero__pills svg { width: 14px; height: 14px; color: var(--lime-deep); }

/* ---------- Section heads ---------- */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
}

.section-kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--yellow) 70%, white);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.06);
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
}

.section-title span { display: inline; }
.section-title .t-sky,
.section-title .t-coral { margin-left: 0.25em; }

.section-lead {
  margin: 0;
  color: var(--navy-soft);
  font-size: 1.05rem;
}

/* ---------- Features: maze path ---------- */
.features {
  padding: 2rem 1.25rem 4rem;
}

.path-trail {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.path-trail__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 48px;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.path-trail__line path {
  fill: none;
  stroke: color-mix(in srgb, var(--sky) 55%, var(--cream-deep));
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 18 14;
}

.path-stop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  width: min(100%, 420px);
}

.path-stop--left { align-self: start; }
.path-stop--right {
  align-self: end;
  grid-template-columns: 1fr auto;
}

.path-stop--right .path-stop__node { order: 2; }
.path-stop--right .path-stop__clay { order: 1; text-align: right; }
.path-stop--right .path-stop__icon { margin-left: auto; }

.path-stop__node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(180deg, #7AE88A 0%, var(--lime-deep) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 6px rgba(95, 208, 104, 0.2), 0 6px 0 rgba(0, 0, 0, 0.1);
}

.path-stop:nth-child(3) .path-stop__node {
  background: linear-gradient(180deg, #FFB088 0%, var(--peach-deep) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 6px rgba(255, 143, 85, 0.22), 0 6px 0 rgba(0, 0, 0, 0.1);
}

.path-stop:nth-child(4) .path-stop__node {
  background: linear-gradient(180deg, #8ED4F5 0%, var(--sky-deep) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 6px rgba(58, 168, 224, 0.22), 0 6px 0 rgba(0, 0, 0, 0.1);
}

.path-stop:nth-child(5) .path-stop__node {
  background: linear-gradient(180deg, #D4B8F8 0%, var(--lilac-deep) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 0 6px rgba(155, 122, 217, 0.22), 0 6px 0 rgba(0, 0, 0, 0.1);
}

.path-stop__clay {
  padding: 1.15rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 3px solid color-mix(in srgb, var(--cream-deep) 80%, white);
  box-shadow: var(--clay-outer);
}

.path-stop__clay h3 {
  margin: 0.55rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.path-stop__clay p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--navy-soft);
  font-weight: 600;
}

.path-stop__icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--navy);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 rgba(0, 0, 0, 0.08);
}

.path-stop__icon svg { width: 22px; height: 22px; }
.path-stop__icon--mint { background: linear-gradient(180deg, #C8F5DE, var(--mint)); }
.path-stop__icon--peach { background: linear-gradient(180deg, #FFD8C0, var(--peach)); }
.path-stop__icon--sky { background: linear-gradient(180deg, #C8EAF8, var(--sky)); }
.path-stop__icon--lilac { background: linear-gradient(180deg, #E4D8FA, var(--lilac)); }

/* ---------- Boards rail ---------- */
.boards {
  padding: 1rem 0 4rem;
}

.board-rail {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3.25rem;
}

.board-rail__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 1.25rem 0.5rem 1.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.board-rail__track:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.board-rail__track::-webkit-scrollbar { display: none; }

.board-card {
  flex: 0 0 min(72vw, 240px);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.board-card__frame {
  padding: 10px;
  border-radius: 32px;
  background: linear-gradient(180deg, #F8FCFF, #DCEEF8);
  border: 4px solid #B5DCEF;
  box-shadow: 0 12px 0 rgba(22, 58, 92, 0.05), 0 20px 36px var(--shadow);
  transition: transform var(--transition);
}

.board-card:hover .board-card__frame {
  transform: translateY(-6px);
}

.board-card img {
  width: 100%;
  aspect-ratio: 576 / 1024;
  object-fit: cover;
  object-position: top center;
  border-radius: 22px;
}

.board-card figcaption {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
}

.board-rail__btn {
  position: absolute;
  top: 42%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff, #E8F0F8);
  color: var(--navy);
  box-shadow: var(--clay-btn);
  border: 2px solid #D0DEEA;
  z-index: 2;
  transition: transform var(--transition);
}

.board-rail__btn:hover { transform: scale(1.06); }
.board-rail__btn svg { width: 22px; height: 22px; }
.board-rail__btn--prev { left: 0.5rem; }
.board-rail__btn--next { right: 0.5rem; }

/* ---------- Download ---------- */
.download {
  padding: 1rem 1.25rem 4rem;
}

.download__panel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 4px solid color-mix(in srgb, var(--sky) 40%, white);
  box-shadow: var(--clay-outer);
  overflow: hidden;
}

.download__star {
  position: absolute;
  top: -8px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--yellow), #F5C542);
  color: #8A5A00;
  box-shadow: 0 0 0 6px rgba(255, 229, 102, 0.35), 0 8px 16px var(--shadow);
}

.download__star svg { width: 28px; height: 28px; fill: currentColor; }

.download__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow);
  border: 3px solid var(--cream-deep);
}

.download__visual img {
  width: 100%;
  aspect-ratio: 1024 / 500;
  object-fit: cover;
}

.download__copy h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.download__copy p {
  margin: 0 0 1.25rem;
  color: var(--navy-soft);
}

.download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 0 1.25rem 2rem;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 3px solid color-mix(in srgb, var(--mint) 35%, white);
  box-shadow: 0 8px 0 rgba(22, 58, 92, 0.05);
  display: grid;
  gap: 1rem;
  text-align: center;
  justify-items: center;
}

.brand--footer {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand--footer img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--sky-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--navy); }

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--navy-soft);
}

/* ---------- Modal ---------- */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 58, 92, 0.45);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 4px solid color-mix(in srgb, var(--lilac) 50%, white);
  box-shadow: var(--clay-outer);
  animation: modalIn 220ms ease-out;
}

@keyframes modalIn {
  from { transform: translateY(12px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--navy);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.modal__close svg { width: 18px; height: 18px; }

.modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #C8F5DE, var(--mint));
  color: var(--navy);
  box-shadow: var(--clay-btn);
}

.modal__icon svg { width: 30px; height: 30px; }

.modal__panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.modal__panel p {
  margin: 0 0 1.25rem;
  color: var(--navy-soft);
}

body.modal-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__orbit {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__copy { order: -1; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__ctas,
  .hero__pills { justify-content: center; }

  .device-frame { width: min(100%, 280px); }

  .download__panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download__actions { justify-content: center; }
  .download__star { right: 16px; }
}

@media (max-width: 768px) {
  .level-rail {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--clay-outer);
    border: 3px solid color-mix(in srgb, var(--sky) 30%, white);
  }

  .level-rail.is-open { display: flex; }

  .level-rail::before { display: none; }

  .level-rail__item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-md);
  }

  .level-rail__item.is-active {
    background: color-mix(in srgb, var(--coral) 12%, white);
  }

  .level-rail__label {
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
  }

  .clay-nav { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn--lime { display: none; }

  .path-trail__line { display: none; }

  .path-stop,
  .path-stop--right {
    width: 100%;
    align-self: stretch;
    grid-template-columns: auto 1fr;
  }

  .path-stop--right .path-stop__node { order: 0; }
  .path-stop--right .path-stop__clay { order: 0; text-align: left; }
  .path-stop--right .path-stop__icon { margin-left: 0; }

  .board-rail { padding: 0 2.75rem; }
  .board-card { flex-basis: min(78vw, 220px); }
}

@media (max-width: 480px) {
  .hero { padding-top: 0.75rem; }
  .hero__title { font-size: 1.85rem; }
  .btn--lg { width: 100%; }
  .hero__ctas { flex-direction: column; }
  .board-rail { padding: 0 0.5rem; }
  .board-rail__btn { display: none; }
}
