/* ============================================================
   THE WHIRLIGIG — motion museum design system
   cobalt / sunshine / tomato / mint on off-white paper
   Baloo 2 (chunky rounded display) + Atkinson Hyperlegible (parents)
   ============================================================ */

:root {
  --paper:   #FAF5EA;
  --ink:     #1B2050;
  --cobalt:  #2443CE;
  --cobalt-deep: #1A2F9C;
  --sunshine:#FFC526;
  --tomato:  #F1502F;
  --mint:    #5BC79B;
  --mint-deep:#2E9A70;
  --shadow:  #1B2050;

  --disp: "Baloo 2", "Comic Sans MS", cursive;
  --body: "Atkinson Hyperlegible", "Trebuchet MS", sans-serif;

  --bounce: cubic-bezier(.34, 1.8, .44, 1);
  --radius: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

::selection { background: var(--sunshine); color: var(--ink); }

h1, h2, h3 { font-family: var(--disp); line-height: 1.05; letter-spacing: -0.01em; }

a { color: var(--cobalt); }

:focus-visible {
  outline: 4px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 99;
  background: var(--ink); color: var(--paper);
  font-family: var(--disp); font-weight: 700;
  padding: .6rem 1.2rem; border-radius: 999px;
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
}

.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-spin { transform-origin: 50% 50%; transition: transform .9s var(--bounce); }
.logo:hover .logo-spin { transform: rotate(240deg); }
.logo-word { font-family: var(--disp); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); }
.site-nav a {
  font-family: var(--disp); font-weight: 700; font-size: 1.02rem;
  color: var(--ink); text-decoration: none;
  padding: .25rem .3rem; border-radius: 8px;
  transition: transform .3s var(--bounce), color .2s;
}
.site-nav a:hover { color: var(--tomato); transform: translateY(-3px) rotate(-2deg); }
.site-nav .nav-cta {
  background: var(--tomato); color: var(--paper);
  padding: .35rem 1.1rem; border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.site-nav .nav-cta:hover { color: var(--paper); transform: translate(-2px, -4px) rotate(-2deg); box-shadow: 5px 6px 0 var(--ink); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  height: min(88vh, 820px);
  min-height: 560px;
  border-bottom: 4px solid var(--ink);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--sunshine) 22%, transparent) 0 8rem, transparent 8rem),
    var(--paper);
  overflow: hidden;
}

#playground {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  touch-action: none;
  cursor: grab;
}
#playground.grabbing { cursor: grabbing; }

.hero-copy {
  position: absolute;
  left: clamp(1rem, 5vw, 4rem);
  bottom: clamp(5.5rem, 11vh, 8rem);
  max-width: 44rem;
  pointer-events: none;
}
.hero-kicker {
  display: inline-block;
  font-family: var(--disp); font-weight: 700; font-size: .95rem;
  background: var(--ink); color: var(--paper);
  padding: .25rem 1rem; border-radius: 999px;
  transform: rotate(-1.5deg);
  margin-bottom: .9rem;
}
.hero-line {
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(1.9rem, 4.3vw, 3.3rem);
  line-height: 1.08;
  text-shadow: 0 2px 0 var(--paper), 0 -2px 0 var(--paper), 2px 0 0 var(--paper), -2px 0 0 var(--paper);
}
.hero-line em { font-style: normal; color: var(--tomato); }
.hero-actions { display: flex; gap: .8rem; margin-top: 1.2rem; flex-wrap: wrap; pointer-events: auto; }

.hero-hint {
  position: absolute; top: 1.4rem; right: clamp(1rem, 4vw, 3rem);
  transform: rotate(2deg);
  font-family: var(--disp); font-weight: 700; font-size: 1rem;
  color: var(--ink); opacity: .7; white-space: nowrap;
  border: 2px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  border-radius: 999px; padding: .2rem .95rem;
}

.hero-arc {
  position: absolute;
  top: 6%; left: 50%;
  width: min(46vw, 620px);
  pointer-events: none;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block;
  font-family: var(--disp); font-weight: 800; font-size: 1.1rem;
  padding: .6rem 1.6rem;
  border-radius: 999px;
  border: 3px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .35s var(--bounce), box-shadow .35s var(--bounce), background .2s;
}
.btn:hover { transform: translate(-2px, -4px) rotate(-1.5deg); box-shadow: 7px 8px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-sun { background: var(--sunshine); }
.btn-ghost { background: var(--paper); }
.btn-big { font-size: 1.35rem; padding: .8rem 2.2rem; }

/* ---------------- marquee ---------------- */

.marquee {
  background: var(--cobalt);
  border-bottom: 4px solid var(--ink);
  overflow: hidden;
  padding: .55rem 0;
}
.marquee-track {
  display: flex; gap: 1.6rem; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--disp); font-weight: 800; font-size: 1.25rem;
  color: var(--paper); text-transform: uppercase; letter-spacing: .06em;
}
.marquee-track i { color: var(--sunshine); font-style: normal; font-size: 1.1rem; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- intro ---------------- */

.intro {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 6vw, 4rem);
}
.intro-big {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 1.4rem;
}
.u-tomato { color: var(--tomato); }
.intro-small { max-width: 44rem; font-size: 1.15rem; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); }

/* ---------------- exhibits / tickets ---------------- */

.exhibits { padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); max-width: 82rem; margin: 0 auto; }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: .6rem;
}
.section-head p { font-size: 1.15rem; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); }

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.ticket {
  --tk: var(--cobalt);
  position: relative;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .4s var(--bounce), box-shadow .4s var(--bounce);
}
.ticket:hover { transform: translate(-3px, -6px) rotate(-.6deg); box-shadow: 10px 12px 0 var(--ink); }
.ticket:nth-child(even):hover { transform: translate(-3px, -6px) rotate(.6deg); }

.t-cobalt { --tk: var(--cobalt); }
.t-tomato { --tk: var(--tomato); }
.t-mint   { --tk: var(--mint-deep); }
.t-sun    { --tk: #C98F00; }

.ticket-top {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--tk); color: var(--paper);
  padding: .5rem 1.2rem;
  border-bottom: 3px solid var(--ink);
  font-family: var(--disp); font-weight: 700;
}
.ticket-zone { font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.ticket-force {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .12em;
  background: var(--paper); color: var(--tk);
  padding: .1rem .7rem; border-radius: 999px; border: 2px solid var(--ink);
}

.ticket-body { display: flex; gap: 1.1rem; padding: 1.2rem; align-items: flex-start; flex: 1; }
.demo {
  width: 92px; height: 92px; flex: none;
  border: 3px solid var(--ink); border-radius: 16px;
  background: var(--paper);
}
.ticket-text h3 { font-size: 1.45rem; font-weight: 800; margin-bottom: .35rem; color: var(--ink); }
.ticket-text p { font-size: .98rem; line-height: 1.5; color: color-mix(in srgb, var(--ink) 85%, #fff); }

.ticket-foot {
  display: flex; gap: .55rem; align-items: center; flex-wrap: wrap;
  padding: .6rem 1.2rem .7rem;
  border-top: 3px dashed color-mix(in srgb, var(--ink) 35%, #fff);
  font-family: var(--disp); font-weight: 600; font-size: .92rem;
  color: var(--tk);
}
.dotsep { font-size: .55rem; color: var(--ink); opacity: .4; }

/* ticket perforation notches */
.ticket::before, .ticket::after {
  content: ""; position: absolute; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink);
  top: calc(100% - 3.05rem);
}
.ticket::before { left: -16px; }
.ticket::after  { right: -16px; }

/* ---------------- visit poster ---------------- */

.visit { padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem); }

.poster {
  max-width: 78rem; margin: 0 auto;
  background: var(--cobalt);
  border: 4px solid var(--ink);
  border-radius: 34px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(1.6rem, 4vw, 3.2rem);
  color: var(--paper);
  position: relative;
}
.poster-head h2 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 800;
  color: var(--sunshine);
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1;
}
.poster-head p { font-family: var(--disp); font-weight: 600; font-size: 1.2rem; margin: .5rem 0 1.8rem; opacity: .92; }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.1rem;
}
.p-cell {
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 20px;
  padding: 1.2rem 1.3rem 1.1rem;
}
.p-cell h3 {
  font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: .7rem; padding-bottom: .45rem;
  border-bottom: 3px solid var(--sunshine);
}
.p-hours h3 { border-color: var(--sunshine); }
.p-price h3 { border-color: var(--tomato); }
.p-where h3 { border-color: var(--mint); }
.p-tips  h3 { border-color: var(--cobalt); }

.p-cell ul { list-style: none; }
.p-cell li { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; font-size: 1rem; }
.p-cell li strong { font-family: var(--disp); font-weight: 700; white-space: nowrap; }
.p-note { margin-top: .8rem; font-size: .88rem; font-style: italic; color: color-mix(in srgb, var(--ink) 75%, #fff); }
.p-addr { font-family: var(--disp); font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.p-list li { display: list-item; list-style: none; position: relative; padding-left: 1.2rem; }
.p-list li::before { content: "●"; position: absolute; left: 0; top: .35rem; font-size: .6rem; color: var(--tomato); }

.poster-cta { display: flex; align-items: center; gap: 1.6rem; margin-top: 1.8rem; flex-wrap: wrap; }
.poster-stamp {
  font-family: var(--disp); font-weight: 800; font-size: 1rem; line-height: 1.05;
  text-transform: uppercase; text-align: center; letter-spacing: .05em;
  color: var(--sunshine);
  border: 3px dashed var(--sunshine); border-radius: 50%;
  width: 92px; height: 92px;
  display: grid; place-content: center;
  transform: rotate(-12deg);
}

/* ---------------- parties ---------------- */

.parties {
  background: var(--sunshine);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem);
}
.parties-inner { max-width: 52rem; margin: 0 auto; }
.parties h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; margin-bottom: .8rem; }
.parties p { font-size: 1.15rem; max-width: 46rem; }
.parties a { color: var(--ink); font-weight: 700; }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--ink); color: var(--paper);
  padding: 2.2rem clamp(1.25rem, 5vw, 3rem) 2.6rem;
}
.foot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; max-width: 78rem; margin: 0 auto 1rem; }
.foot-brand { font-family: var(--disp); font-weight: 800; font-size: 1.5rem; }
.foot-brand span { color: var(--sunshine); }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--paper); font-family: var(--disp); font-weight: 600; text-decoration: none; }
.site-footer nav a:hover { color: var(--sunshine); text-decoration: underline; }
.foot-small { max-width: 78rem; margin: 0 auto; font-size: .9rem; opacity: .65; }

/* ============================================================
   GUIDE PAGE
   ============================================================ */

.guide-main { max-width: 52rem; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2rem) 4rem; }
.guide-back {
  display: inline-block; font-family: var(--disp); font-weight: 700;
  text-decoration: none; margin-bottom: 2rem;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px;
  padding: .35rem 1.1rem; color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .35s var(--bounce), box-shadow .35s var(--bounce);
}
.guide-back:hover { transform: translate(-2px,-3px); box-shadow: 5px 6px 0 var(--ink); }

.guide-main h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; margin-bottom: .6rem; }
.guide-lede { font-size: 1.2rem; margin-bottom: 2.5rem; color: color-mix(in srgb, var(--ink) 85%, var(--paper)); }

.guide-sec { margin-bottom: 2.8rem; }
.guide-sec h2 {
  font-size: 1.7rem; font-weight: 800; margin-bottom: .9rem;
  display: inline-block;
  border-bottom: 5px solid var(--sunshine);
  padding-bottom: .1rem;
}
.guide-sec p { margin-bottom: .8rem; }
.guide-sec ul, .guide-sec ol { margin: 0 0 .8rem 1.3rem; }
.guide-sec li { margin-bottom: .45rem; }

.swatches { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1rem 0; }
.swatch {
  width: 108px;
  border: 3px solid var(--ink); border-radius: 14px; overflow: hidden;
  font-family: var(--disp); font-weight: 700; font-size: .82rem; text-align: center;
  background: #fff;
}
.swatch i { display: block; height: 64px; font-style: normal; }
.swatch b { display: block; padding: .3rem 0 .1rem; }
.swatch small { display: block; padding-bottom: .35rem; font-family: var(--body); font-weight: 400; }

.type-pair { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem,100%), 1fr)); margin: 1rem 0; }
.type-card { border: 3px solid var(--ink); border-radius: 16px; padding: 1rem 1.2rem; background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.type-card .big { font-size: 2rem; line-height: 1.1; margin-bottom: .3rem; }
.type-card.disp .big { font-family: var(--disp); font-weight: 800; }
.type-card small { color: color-mix(in srgb, var(--ink) 70%, #fff); }

pre {
  background: var(--ink); color: #EDEBFF;
  border-radius: 14px; border: 3px solid var(--ink);
  padding: 1rem 1.2rem; overflow-x: auto;
  font-size: .82rem; line-height: 1.55;
  margin: .8rem 0 1.2rem;
}
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
p code, li code {
  background: color-mix(in srgb, var(--sunshine) 35%, var(--paper));
  padding: .08em .35em; border-radius: 6px; font-size: .88em;
}

.pass-list { list-style: none; margin-left: 0 !important; counter-reset: pass; }
.pass-list li {
  counter-increment: pass;
  border: 3px solid var(--ink); border-radius: 16px;
  background: #fff; padding: .9rem 1.1rem .9rem 3.6rem;
  position: relative; margin-bottom: .8rem;
  box-shadow: 4px 4px 0 var(--ink);
}
.pass-list li::before {
  content: counter(pass);
  position: absolute; left: .9rem; top: .85rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--tomato); color: var(--paper);
  border: 3px solid var(--ink);
  font-family: var(--disp); font-weight: 800;
  display: grid; place-content: center;
}

/* ---------------- responsive ---------------- */

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero { min-height: 540px; height: 80vh; }
  .hero-copy { bottom: auto; top: 3.6rem; right: 1rem; }
  .hero-hint { font-size: .85rem; top: auto; bottom: 46%; right: 1rem; }
  .hero-arc { top: auto; bottom: 34%; left: 42%; width: 58vw; }
  .ticket-body { flex-direction: row; }
  .foot-row { flex-direction: column; gap: .8rem; }
}

@media (max-width: 420px) {
  .ticket-body { flex-direction: column; }
  .demo { width: 84px; height: 84px; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .marquee-track { animation: none; }
  .hero-hint { display: none; }
}
