/* Wonderyear — plain HTML/CSS/JS */
:root {
  --ink: #2B2B45;
  --sun: #FFB427;
  --cream: #FFF8EF;
  --accent: #38B6E8;           /* driven by JS per active season */
  --header-h: clamp(62px, 7vh, 82px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

.page {
  position: relative;
  min-height: 100vh;
  background: var(--cream);
  font-family: Nunito, sans-serif;
  color: var(--ink);
  overflow-x: clip;
}

a { color: var(--ink); }
mark {
  background: var(--sun);
  color: var(--ink);
  padding: 1px 8px;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.wrap { max-width: 1180px; margin: 0 auto; padding-left: clamp(20px, 6vw, 96px); padding-right: clamp(20px, 6vw, 96px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.section-head { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.section-head h2, .map__head h2, .visit__content h2 {
  margin: 0; font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: clamp(34px, 3.8vw, 58px); line-height: 1.08; text-wrap: balance;
}
.section-head p, .map__head p {
  margin: 0; font-weight: 700; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5;
}

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding: clamp(14px, 2.4vh, 24px) clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(43, 43, 69, 0.06);
}
.brand { display: flex; align-items: baseline; gap: 7px; }
.brand__name {
  font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: clamp(22px, 2.2vw, 30px); letter-spacing: 0.01em;
}
.brand__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: conic-gradient(#38B6E8 0 25%, #E8722C 0 50%, #7BC4E0 0 75%, #F27EB2 0);
  box-shadow: 0 0 0 2px rgba(255, 248, 239, 0.5);
}
.seasons { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 38px); }
.seasons__item {
  font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: clamp(12px, 1.1vw, 15px); letter-spacing: 0.14em;
  color: var(--ink); background: none; border: none;
  border-bottom: 3px solid transparent;
  padding: 6px 2px 8px; cursor: pointer;
  transition: border-color 0.35s ease, opacity 0.2s ease;
}
.seasons__item:hover { opacity: 0.65; }
.seasons__item[aria-current="true"] { border-bottom-color: var(--accent); }
.seasons__item:disabled { cursor: default; }
.seasons:not(.is-ready) { opacity: 0.5; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center;
  background: var(--sun); color: var(--ink);
  font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: clamp(16px, 1.3vw, 19px); letter-spacing: 0.02em;
  padding: 16px 36px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(43, 43, 69, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(43, 43, 69, 0.24); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 560px;
}
.hero__stage { position: absolute; inset: 0; overflow: hidden; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  opacity: 0; z-index: 1; transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.hero__img.is-active { opacity: 1; z-index: 2; }
.hero__wash {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,248,239,0.30) 0%, rgba(255,248,239,0.12) 38%, rgba(255,248,239,0) 62%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.hero__divider { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 7; pointer-events: none; }
.hero__divider svg { display: block; width: 100%; height: clamp(60px, 9vw, 130px); }
.hero__divider-dot { fill: var(--accent); transition: fill 0.6s ease; }
.hero__content {
  position: absolute; z-index: 6;
  left: clamp(20px, 6vw, 96px); right: clamp(20px, 6vw, 96px); top: 52%;
  max-width: 680px; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(18px, 2.6vh, 30px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}
.hero__content.is-hidden { opacity: 0; transform: translateY(-50%) translateY(14px); }
.hero__headline {
  margin: 0; font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: clamp(42px, 5.4vw, 84px); line-height: 1.06;
  text-shadow: 0 2px 28px rgba(255, 248, 239, 0.65); text-wrap: balance;
}
.hero__mission {
  margin: 0; font-weight: 700; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6;
  text-shadow: 0 1px 18px rgba(255, 248, 239, 0.6); max-width: 560px;
}

/* ---------- Adventures ---------- */
.adventures { padding: clamp(72px, 10vh, 120px) 0 clamp(60px, 8vh, 100px); }
.adventures .wrap { display: flex; flex-direction: column; gap: clamp(30px, 4.5vh, 48px); }
.adv-intro { margin: 0; font-weight: 700; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5; transition: opacity 0.3s ease; }
.adv-list { display: flex; flex-direction: column; gap: clamp(90px, 14vh, 200px); margin-top: clamp(40px, 6vh, 80px); }
.adv-row {
  display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.5fr;
  gap: clamp(20px, 3vw, 48px); align-items: center;
  opacity: 0; transform: translateY(44px);
}
.adv-row.is-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.adv-row.is-flip { opacity: 0; transform: translateY(14px); transition: opacity 0.32s ease, transform 0.32s ease; }
.adv-row--right { grid-template-columns: 1.5fr minmax(280px, 0.8fr); }
.adv-row--right .adv-row__text { order: 1; }
.adv-row--right .adv-row__img { order: 0; }
.adv-row__text { display: flex; flex-direction: column; gap: 16px; }
.adv-row__text h3 { margin: 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.2; }
.adv-row__text h3 mark { padding: 2px 12px; border-radius: 12px; background: var(--accent); transition: background 0.4s ease; }
.adv-row__text p { margin: 0; font-weight: 600; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; max-width: 46ch; }
.adv-row__img {
  aspect-ratio: 4 / 3; background-size: cover; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, black 52%, rgba(0,0,0,0) 80%);
  mask-image: radial-gradient(ellipse at center, black 52%, rgba(0,0,0,0) 80%);
}
.adv-row__img { margin: clamp(-60px,-4vw,-20px) -12% clamp(-60px,-4vw,-20px) 0; width: 112%; }
.adv-row--right .adv-row__img { margin: clamp(-60px,-4vw,-20px) 0 clamp(-60px,-4vw,-20px) -12%; }

/* ---------- Map ---------- */
.map { padding: clamp(90px, 14vh, 200px) 0 clamp(90px, 12vh, 200px); }
.map__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(10px, 2vh, 24px); }
.map__frame {
  position: relative;
  opacity: 0; transform: translateY(34px);
}
.map__frame.is-in { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22,1,0.36,1); }
.map__images {
  position: relative; aspect-ratio: 16/9;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.35) 16%, black 34%, black 66%, rgba(0,0,0,0.35) 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.35) 16%, black 34%, black 66%, rgba(0,0,0,0.35) 84%, transparent 100%);
}
.map__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; }
.map__img.is-active { opacity: 1; }
.map__spot {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 4px solid var(--cream);
  box-shadow: 0 3px 10px rgba(43,43,69,0.3); cursor: pointer; padding: 0;
  animation: wy-pulse 2.4s ease-in-out infinite; transition: background 0.4s ease;
}
.map__spot:hover { box-shadow: 0 3px 10px rgba(43,43,69,0.3), 0 0 0 6px rgba(43,43,69,0.08); }
.map__tip {
  position: absolute; transform: translate(-50%, -100%) translateY(-22px);
  width: max-content; max-width: 250px; background: #fff; border-radius: 16px;
  padding: 14px 18px; box-shadow: 0 12px 30px rgba(43,43,69,0.18);
  pointer-events: none; z-index: 5;
}
.map__tip-title { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.map__tip-desc { font-weight: 600; font-size: 14.5px; line-height: 1.45; }
.map__tip-arrow { position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }

/* ---------- Day ---------- */
.day { padding: clamp(90px, 12vh, 170px) 0; }
.day .wrap { display: flex; flex-direction: column; gap: clamp(34px, 6vh, 64px); }
.day__scroll { overflow-x: auto; padding-bottom: 8px; }
.day__inner { min-width: 880px; display: flex; flex-direction: column; }
.day__track { position: relative; height: clamp(140px, 15vw, 200px); }
.day__ghost, .day__draw { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.day__draw { clip-path: inset(-90% 100% -30% -5%); }
.day__dots { position: absolute; inset: 0; }
.day__dot { position: absolute; transform: translate(-50%, -50%); width: 15px; height: 15px; border-radius: 50%; background: var(--cream); border: 3px solid var(--ink); transition: background 0.35s ease; }
.day__sun { position: absolute; left: 0; top: 92%; transform: translate(-50%, -50%); width: clamp(38px, 4.5vw, 54px); pointer-events: none; filter: drop-shadow(0 3px 10px rgba(255,180,39,0.55)); }
.day__sun svg { display: block; width: 100%; animation: wy-spin 26s linear infinite; }
.day__stops { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 1.5vw, 20px); margin-top: 20px; }
.day__stop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; }
.day__time { font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(17px, 1.5vw, 21px); font-variant-numeric: tabular-nums; background: rgba(43,43,69,0.06); padding: 2px 12px; border-radius: 999px; }
.day__stop h3 { margin: 6px 0 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.25; }
.day__stop p { margin: 0; font-weight: 600; font-size: clamp(13.5px, 1.05vw, 15.5px); line-height: 1.5; }

/* ---------- Parents ---------- */
.parents { padding: clamp(90px, 12vh, 170px) 0; }
.parents .wrap { display: flex; flex-direction: column; gap: clamp(40px, 7vh, 72px); }
.parents__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: clamp(26px, 3.5vw, 54px); align-items: start; }
.pa-card { margin: 0; opacity: 0; transform: translateY(40px); }
.pa-card.is-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.pa-card.is-flip { opacity: 0; transform: translateY(12px); transition: opacity 0.32s ease, transform 0.32s ease; }
.pa-card__float { animation: wy-drift 5s ease-in-out infinite; }
.pa-card__img { width: 78%; aspect-ratio: 1/1; margin: 0 auto 6px; background-size: cover; background-position: center; -webkit-mask-image: radial-gradient(ellipse at center, black 55%, rgba(0,0,0,0) 78%); mask-image: radial-gradient(ellipse at center, black 55%, rgba(0,0,0,0) 78%); }
.pa-card blockquote { margin: 0; position: relative; background: #fff; border-radius: 26px; padding: clamp(24px, 2.4vw, 34px); box-shadow: 0 12px 34px rgba(43,43,69,0.10); }
.pa-card__quote { display: block; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 44px; line-height: 0.6; color: var(--accent); margin-bottom: 10px; transition: color 0.4s ease; }
.pa-card blockquote p { margin: 0; font-weight: 700; font-size: clamp(16px, 1.35vw, 19.5px); line-height: 1.55; }
.pa-card__tail { position: absolute; bottom: -9px; width: 20px; height: 20px; background: #fff; transform: rotate(45deg); border-radius: 4px; }
.pa-card figcaption { margin: 22px 0 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(14.5px, 1.15vw, 17px); }

/* ---------- Pick ---------- */
.pick { padding: clamp(90px, 12vh, 170px) 0; }
.pick .wrap { display: flex; flex-direction: column; gap: clamp(40px, 7vh, 72px); }
.pick__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: clamp(22px, 3vw, 44px); align-items: stretch; }
.pk-card { position: relative; background: #fff; border-radius: 28px; border: 3px solid transparent; padding: clamp(28px, 2.8vw, 40px); box-shadow: 0 12px 34px rgba(43,43,69,0.10); display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateY(40px); }
.pk-card.is-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.pk-card--featured { border-color: var(--sun); box-shadow: 0 16px 44px rgba(255,180,39,0.35); }
.pk-card__eyebrow { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.55; }
.pk-card h3 { margin: 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(26px, 2.3vw, 36px); line-height: 1.15; transition: opacity 0.3s ease; }
.pk-card > p { margin: 0; font-weight: 700; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; }
.pk-card__line { margin: auto 0 0 !important; font-weight: 700; font-size: clamp(15px, 1.2vw, 17.5px); line-height: 1.65; }
.pk-card__line mark { padding: 1px 8px; }
.pk-card__line--plain mark { background: transparent; padding: 0; }

/* ---------- Visit ---------- */
.visit { position: relative; overflow: hidden; }
.visit__sky { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.visit__sky.is-active { opacity: 1; }
.visit__sky[data-season="summer"] { background: linear-gradient(180deg, #AEE3F7 0%, #FFF3D6 100%); }
.visit__sky[data-season="autumn"] { background: linear-gradient(180deg, #F5CF9B 0%, #FBEEDB 100%); }
.visit__sky[data-season="winter"] { background: linear-gradient(180deg, #CFE6F5 0%, #F2F9FE 100%); }
.visit__sky[data-season="spring"] { background: linear-gradient(180deg, #FADCEC 0%, #EAF6E8 100%); }
.visit__wave { position: relative; display: block; width: 100%; height: clamp(44px, 6vw, 90px); }
.visit__content {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(20px, 3.5vh, 32px);
  padding: clamp(80px, 11vh, 150px) clamp(20px, 6vw, 96px) clamp(24px, 4vh, 48px);
  opacity: 0; transform: translateY(30px);
}
.visit__content.is-in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22,1,0.36,1); }
.visit__content h2 { max-width: 900px; font-size: clamp(38px, 4.6vw, 72px); line-height: 1.06; }
.visit__content p { margin: 0; font-weight: 700; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.6; max-width: 640px; }
.visit__ground { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.visit__ground-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 0.9s ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 11%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 11%);
}
.visit__ground-img.is-active { opacity: 1; }
.visit__footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 clamp(20px, 6vw, 96px) clamp(28px, 4vh, 44px); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.visit__footer p { margin: 0; font-family: Fredoka, sans-serif; font-weight: 500; color: var(--cream); text-shadow: 0 1px 12px rgba(0,0,0,0.55); }
.visit__footer-address { font-size: clamp(13.5px, 1.1vw, 16px); opacity: 0.9; }
.visit__footer-legal { font-size: clamp(11.5px, 0.95vw, 13.5px); opacity: 0.72; letter-spacing: 0.01em; }
.visit__footer-legal a { color: var(--sun); text-decoration: none; font-weight: 600; letter-spacing: 0.04em; transition: opacity 0.2s ease; }
.visit__footer-legal a:hover { opacity: 0.8; text-decoration: underline; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: clamp(14px, 3vw, 36px); bottom: clamp(14px, 3vh, 36px); z-index: 50;
  width: clamp(58px, 6vw, 84px); background: none; border: none; padding: 0; cursor: pointer;
  opacity: 0; transform: translateY(24px); pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(43,43,69,0.28));
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }
.to-top.is-show:hover { transform: translateY(-8px) scale(1.06); }
.to-top svg { display: block; width: 100%; animation: wy-float 3.6s ease-in-out infinite; }
.to-top__body { fill: var(--accent); transition: fill 0.5s ease; }

/* ---------- Keyframes ---------- */
@keyframes wy-spin { to { transform: rotate(360deg); } }
@keyframes wy-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes wy-pulse { 0%, 100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.1); } }
@keyframes wy-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes wy-drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Responsive ---------- */
/* Tablet band: keep the storybook image bleed inside the viewport gutter */
@media (min-width: 761px) and (max-width: 1100px) {
  .adv-row__img { width: 104%; margin-right: -4%; margin-left: 0; }
  .adv-row--right .adv-row__img { margin-left: -4%; margin-right: 0; }
}

@media (max-width: 760px) {
  .site-header { justify-content: center; }
  .seasons { margin: 0 auto; }
  .hero__content { top: 50%; }
  .adv-row, .adv-row--right { grid-template-columns: 1fr; }
  .adv-row--right .adv-row__text, .adv-row__text { order: 0; }
  .adv-row--right .adv-row__img, .adv-row__img { order: 1; width: 112%; margin: -10px -6% -24px -6%; }
  .visit__ground { aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map__spot, .day__sun svg, .to-top svg, .pa-card__float { animation: none; }
  .hero__img, .map__img, .visit__ground-img, .visit__sky { transition: opacity 0.4s ease; }
}
