/* ============================================================
   Wealthy Mahjong Match — Atlas Scroll Journey Theme
   Parchment · Teal · Gold · Cinnabar
   ============================================================ */

:root {
  --parchment: #F5E6C4;
  --parchment-dark: #EDE0C8;
  --parchment-deep: #E2D4B0;
  --teal: #1A4D3E;
  --teal-light: #2D6A4F;
  --teal-deep: #004D40;
  --gold: #C9A227;
  --gold-light: #E8C547;
  --gold-dark: #9A7B1A;
  --cinnabar: #A93226;
  --cinnabar-light: #C0392B;
  --brown: #3D2914;
  --brown-muted: #5C4033;
  --cream: #FFF8E7;
  --white: #FFFFFF;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 4px 20px rgba(61, 41, 20, 0.12);
  --shadow-frame: 0 8px 32px rgba(26, 77, 62, 0.18);
  --radius-pill: 999px;
  --radius-card: 16px;
  --radius-frame: 24px;

  --header-h: 64px;
  --dock-h: 72px;
  --transition: 200ms ease;
}

/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brown);
  background: var(--parchment);
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-h) + 24px);
}

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

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

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

.cursor-pointer {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--teal);
  color: var(--cream);
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* --- Parchment backdrop --- */
.parchment-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255, 248, 231, 0.6) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(61, 41, 20, 0.02) 3px,
      rgba(61, 41, 20, 0.02) 4px
    ),
    linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 50%, var(--parchment-deep) 100%);
}

.parchment-bg__cloud {
  position: absolute;
  width: 300px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.5;
}

.parchment-bg__cloud--1 {
  top: 15%;
  left: -5%;
  transform: rotate(-5deg);
}

.parchment-bg__cloud--2 {
  top: 40%;
  right: -8%;
  width: 400px;
  transform: rotate(3deg);
}

.parchment-bg__mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    linear-gradient(135deg, transparent 40%, rgba(201, 162, 39, 0.08) 40%, rgba(201, 162, 39, 0.08) 42%, transparent 42%),
    linear-gradient(225deg, transparent 35%, rgba(45, 106, 79, 0.06) 35%, rgba(45, 106, 79, 0.06) 37%, transparent 37%);
  opacity: 0.6;
}

/* --- Status bar (sticky header) --- */
.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.status-bar--scrolled {
  background: rgba(245, 230, 196, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.status-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}

.status-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.status-bar__brand:hover {
  opacity: 0.85;
}

.status-bar__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.status-bar__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
}

.status-bar__stats {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--cream);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--teal);
}

.stat-pill svg {
  width: 14px;
  height: 14px;
  color: var(--teal-light);
}

.stat-pill__value {
  font-weight: 700;
}

.stat-pill__label {
  color: var(--brown-muted);
}

.status-bar__nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.status-bar__link {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brown-muted);
  border-radius: var(--radius-pill);
  transition: color var(--transition), background var(--transition);
}

.status-bar__link:hover {
  color: var(--teal);
  background: rgba(26, 77, 62, 0.08);
}

.status-bar__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.status-bar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  color: var(--teal);
  border-radius: 10px;
  transition: background var(--transition);
}

.status-bar__toggle:hover {
  background: rgba(26, 77, 62, 0.1);
}

/* --- Buttons --- */
.btn-jade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--teal);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-jade:hover {
  background: var(--teal-light);
  box-shadow: var(--shadow-frame);
}

.btn-jade:active {
  transform: translateY(1px);
}

.btn-jade:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

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

.btn-jade--sm {
  display: none;
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn-jade--sm svg {
  width: 16px;
  height: 16px;
}

.btn-cream {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--cream);
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--parchment-deep);
  transition: background var(--transition), border-color var(--transition);
}

.btn-cream:hover {
  background: var(--white);
  border-color: var(--gold);
}

.btn-cream svg {
  width: 18px;
  height: 18px;
  color: var(--cinnabar);
}

/* --- Mobile drawer --- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.mobile-drawer--open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 41, 20, 0.4);
  opacity: 0;
  transition: opacity 300ms ease;
}

.mobile-drawer--open .mobile-drawer__backdrop {
  opacity: 1;
}

.mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100%;
  padding: 24px;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  transform: translateX(100%);
  transition: transform 300ms ease;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-drawer--open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  border-radius: 10px;
  transition: background var(--transition);
}

.mobile-drawer__close:hover {
  background: rgba(26, 77, 62, 0.1);
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer__link {
  padding: 12px 16px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--brown);
  border-radius: 12px;
  transition: background var(--transition), color var(--transition);
}

.mobile-drawer__link:hover {
  background: rgba(26, 77, 62, 0.08);
  color: var(--teal);
}

/* --- Hero: Scroll frame layout --- */
.hero {
  padding: calc(var(--header-h) + 32px) 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero__scroll-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 24px;
  background: linear-gradient(180deg, var(--cream) 0%, rgba(255, 248, 231, 0.7) 100%);
  border: 3px solid var(--gold-dark);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame), inset 0 0 60px rgba(201, 162, 39, 0.06);
}

/* Ornate corner flourishes */
.scroll-frame__corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--gold);
  border-style: solid;
}

.scroll-frame__corner--tl {
  top: 8px;
  left: 8px;
  border-width: 3px 0 0 3px;
  border-radius: 8px 0 0 0;
}

.scroll-frame__corner--tr {
  top: 8px;
  right: 8px;
  border-width: 3px 3px 0 0;
  border-radius: 0 8px 0 0;
}

.scroll-frame__corner--bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 8px;
}

.scroll-frame__corner--br {
  bottom: 8px;
  right: 8px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 8px 0;
}

.hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 12px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--teal);
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.0625rem;
  color: var(--brown-muted);
  max-width: 480px;
  margin-bottom: 28px;
}

.hero__subtitle strong {
  color: var(--teal);
  font-weight: 600;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brown-muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--parchment-deep);
  border-radius: var(--radius-pill);
}

.hero__badge svg {
  width: 14px;
  height: 14px;
  color: var(--teal-light);
}

/* Device mockup */
.hero__device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.device-frame {
  position: relative;
  width: min(260px, 70vw);
  padding: 10px;
  background: linear-gradient(145deg, var(--gold-dark), var(--gold));
  border-radius: 32px;
  box-shadow: var(--shadow-frame);
}

.device-frame__notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: var(--brown);
  border-radius: 3px;
  z-index: 2;
  opacity: 0.3;
}

.device-frame__screen {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 9 / 19;
  object-fit: cover;
  background: var(--parchment-dark);
}

.hero__stage-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(26, 77, 62, 0.85);
  color: var(--cream);
  font-size: 0.8125rem;
  border-radius: var(--radius-pill);
}

.hero__stage-label em {
  font-style: normal;
  opacity: 0.75;
}

.hero__stage-label em::before {
  content: "·";
  margin-right: 8px;
}

/* --- Journey path section --- */
.journey {
  padding: 48px 20px 64px;
  max-width: 900px;
  margin: 0 auto;
}

.journey__header {
  text-align: center;
  margin-bottom: 48px;
}

.journey__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}

.journey__desc {
  font-size: 1.0625rem;
  color: var(--brown-muted);
  max-width: 520px;
  margin: 0 auto;
}

.journey__path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 0 8px;
}

.journey__svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
}

.journey-stop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
}

.journey-stop--right {
  grid-template-columns: 1fr 40px;
}

.journey-stop--right .journey-stop__marker {
  order: 2;
}

.journey-stop--right .journey-stop__card {
  order: 1;
  text-align: right;
}

.journey-stop--right .journey-stop__icon {
  margin-left: auto;
}

.journey-stop__marker {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.journey-stop__pin {
  width: 16px;
  height: 16px;
  background: var(--gold);
  border: 3px solid var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}

.journey-stop__pin--active {
  background: var(--cinnabar);
  border-color: var(--cinnabar-light);
  box-shadow: 0 0 0 4px rgba(169, 50, 38, 0.2);
  animation: pulse-pin 2s ease-in-out infinite;
}

@keyframes pulse-pin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.journey-stop__card {
  padding: 20px 24px;
  background: var(--cream);
  border: 1px solid var(--parchment-deep);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition), transform var(--transition);
}

.journey-stop__card:hover {
  box-shadow: var(--shadow-frame);
  transform: translateY(-2px);
}

.journey-stop__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  background: rgba(26, 77, 62, 0.1);
  border-radius: 12px;
  color: var(--teal);
}

.journey-stop__icon svg {
  width: 22px;
  height: 22px;
}

.journey-stop__card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}

.journey-stop__card p {
  font-size: 0.9375rem;
  color: var(--brown-muted);
  line-height: 1.55;
}

/* Summit pagoda */
.journey__summit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}

.journey__pagoda {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pagoda__tier {
  width: 60px;
  height: 12px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(61, 41, 20, 0.2);
}

.pagoda__tier:nth-child(2) {
  width: 48px;
}

.pagoda__tier--top {
  width: 36px;
  height: 16px;
  border-radius: 2px 2px 0 0;
  position: relative;
}

.pagoda__tier--top::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--gold);
}

.journey__summit-label {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Features bronze frame --- */
.features {
  padding: 48px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.features__frame {
  position: relative;
  padding: 40px 24px;
  background: linear-gradient(180deg, rgba(255, 248, 231, 0.9) 0%, var(--cream) 100%);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame);
}

.bronze-frame__border {
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  border-radius: var(--radius-frame);
  background:
    linear-gradient(var(--cream), var(--cream)) padding-box,
    linear-gradient(135deg, var(--gold-dark), var(--gold-light), var(--gold-dark)) border-box;
  pointer-events: none;
  z-index: 0;
}

.features__header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 32px;
}

.features__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}

.features__subtitle {
  font-size: 1rem;
  color: var(--brown-muted);
}

.features__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-tile {
  position: relative;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-frame);
}

.feature-tile__border {
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

.feature-tile__border--teal { background: var(--teal-light); }
.feature-tile__border--gold { background: var(--gold); }
.feature-tile__border--red { background: var(--cinnabar); }
.feature-tile__border--jade { background: linear-gradient(90deg, var(--teal-light), var(--gold)); }

.feature-tile svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
  margin-bottom: 12px;
}

.feature-tile h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}

.feature-tile p {
  font-size: 0.9375rem;
  color: var(--brown-muted);
  line-height: 1.55;
}

/* --- Gallery infinite carousel --- */
.gallery {
  padding: 48px 20px 64px;
  overflow: hidden;
}

.gallery__header {
  text-align: center;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}

.gallery__desc {
  font-size: 1rem;
  color: var(--brown-muted);
}

.gallery__carousel {
  position: relative;
  overflow: hidden;
  padding: 16px 0 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.gallery__carousel--static {
  overflow-x: auto;
  -webkit-mask-image: none;
  mask-image: none;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--parchment-dark);
}

.gallery__carousel--static::-webkit-scrollbar {
  height: 6px;
}

.gallery__carousel--static::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

.gallery__track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  will-change: transform;
}

.gallery__track--animate {
  animation: gallery-marquee var(--gallery-duration, 42s) linear infinite;
}

.gallery__track--animate:hover {
  animation-play-state: paused;
}

.gallery__group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0 8px;
}

.gallery__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  width: min(220px, 55vw);
  text-align: center;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--gold-dark);
  box-shadow: var(--shadow-frame);
  background: var(--parchment-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gallery__item:hover img {
  border-color: var(--gold);
  box-shadow: 0 12px 36px rgba(26, 77, 62, 0.22);
}

.gallery__item figcaption {
  margin-top: 10px;
  min-height: 1.4em;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

@keyframes gallery-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- Download torii section --- */
.download {
  position: relative;
  padding: 64px 20px 80px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.download__torii {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-bottom: -8px;
  position: relative;
  z-index: 1;
}

.torii__pillar {
  width: 12px;
  height: 48px;
  background: linear-gradient(180deg, var(--cinnabar), var(--cinnabar-light));
  border-radius: 2px 2px 0 0;
}

.torii__lintel {
  width: 200px;
  height: 14px;
  background: linear-gradient(180deg, var(--cinnabar-light), var(--cinnabar));
  border-radius: 4px 4px 0 0;
  margin-bottom: 34px;
  position: relative;
}

.torii__lintel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 10px;
  background: var(--cinnabar);
  border-radius: 3px;
}

.download__card {
  padding: 40px 28px;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame);
}

.download__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}

.download__text {
  font-size: 1rem;
  color: var(--brown-muted);
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.download__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--teal);
  color: var(--cream);
  border-radius: 12px;
  border: 2px solid var(--gold-dark);
  transition: background var(--transition), transform var(--transition);
  text-align: left;
}

.store-btn:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}

.store-btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.store-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn span {
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
}

.store-btn small {
  font-size: 0.6875rem;
  font-weight: 400;
  opacity: 0.8;
}

/* --- Footer --- */
.site-footer {
  padding: 24px 20px 16px;
  border-top: 1px solid var(--parchment-deep);
}

.site-footer__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--brown-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8125rem;
}

.site-footer__link {
  color: var(--teal);
  font-weight: 500;
  transition: color var(--transition);
}

.site-footer__link:hover {
  color: var(--teal-light);
  text-decoration: underline;
}

.site-footer__sep {
  color: var(--parchment-deep);
}

/* --- Bottom dock navigation --- */
.dock-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255, 248, 231, 0.95);
  backdrop-filter: blur(12px);
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-frame);
}

.dock-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  min-width: 56px;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--brown-muted);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
}

.dock-nav__item svg {
  width: 20px;
  height: 20px;
}

.dock-nav__item:hover {
  color: var(--teal);
  background: rgba(26, 77, 62, 0.08);
}

.dock-nav__item--active {
  color: var(--teal);
  background: rgba(201, 162, 39, 0.15);
}

.dock-nav__item--cta {
  background: var(--teal);
  color: var(--cream);
  margin-left: 4px;
}

.dock-nav__item--cta:hover {
  background: var(--teal-light);
  color: var(--cream);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  visibility: hidden;
}

.modal--open {
  pointer-events: auto;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 41, 20, 0.5);
  opacity: 0;
  transition: opacity 300ms ease;
}

.modal--open .modal__backdrop {
  opacity: 1;
}

.modal__panel {
  position: relative;
  width: min(400px, 100%);
  padding: 40px 32px;
  background: var(--cream);
  border: 3px solid var(--gold);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-frame);
  text-align: center;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: transform 300ms ease, opacity 300ms ease;
}

.modal--open .modal__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-muted);
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}

.modal__close:hover {
  background: rgba(26, 77, 62, 0.1);
  color: var(--teal);
}

.modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(201, 162, 39, 0.15);
  border-radius: 50%;
  color: var(--gold-dark);
}

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

.modal__title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}

.modal__text {
  font-size: 0.9375rem;
  color: var(--brown-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* --- Responsive breakpoints --- */
@media (min-width: 640px) {
  .status-bar__toggle {
    margin-left: 0;
  }

  .btn-jade--sm {
    display: inline-flex;
    margin-left: auto;
  }

  .hero__scroll-frame {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 48px 40px;
    gap: 40px;
  }

  .hero__device {
    order: 2;
  }

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

  .journey-stop,
  .journey-stop--right {
    grid-template-columns: 1fr 40px 1fr;
    gap: 20px;
  }

  .journey-stop .journey-stop__card {
    grid-column: 1;
  }

  .journey-stop .journey-stop__marker {
    grid-column: 2;
  }

  .journey-stop--right .journey-stop__card {
    grid-column: 3;
    text-align: left;
  }

  .journey-stop--right .journey-stop__marker {
    grid-column: 2;
    order: unset;
  }

  .journey-stop--right .journey-stop__icon {
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  .status-bar__stats {
    display: flex;
  }

  .status-bar__nav {
    display: flex;
    margin-left: 0;
  }

  .btn-jade--sm {
    margin-left: 0;
  }

  .stat-pill--hide-sm {
    display: flex;
  }

  .gallery__item {
    width: 240px;
  }
}

@media (min-width: 1024px) {
  .status-bar__name {
    font-size: 1.2rem;
  }

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

  .dock-nav__item {
    min-width: 64px;
    padding: 8px 14px;
    font-size: 0.6875rem;
  }
}

/* --- Reduced motion --- */
@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;
  }

  .journey-stop__pin--active {
    animation: none;
  }

  .gallery__track--animate {
    animation: none;
  }
}
