/* ==========================================================================
   Holidays 2026 — Paleozoic
   One page, no build step. Tuning knobs are the custom properties in :root.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette, straight from the Illustrator file */
  --night: #2f343c;
  --red: #c56556;
  --cream: #e0d9ba;
  --blue: #465971;
  --pink: #dca4c1;
  --taupe: #776964;
  --plum: #774851;

  /* ---- knobs ---------------------------------------------------------- */
  /* How many screens of dark the visitor scrolls through between the top
     and the bottom of the cave. Try anything from 1 to 6.
     (You can also preview a value without editing: add ?depth=4 to the URL.) */
  --cave-depth: 3;
  /* How far the ladder keeps going below the artwork, in screens. 0 = as drawn. */
  --ladder-extra: 0.9;

  /* One design pixel of the 1366-wide comp. Artwork that has to stay in
     register with other artwork is sized in these, so it scales as one. */
  --u: clamp(0.5px, calc(100vw / 1366), 1px);
  --gutter: clamp(20px, 5vw, 48px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--night);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
p {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.18em;
}
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Stars (filled in by site.js so they cover a field of any size)
   -------------------------------------------------------------------------- */
.stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.star {
  position: absolute;
  width: 6.4px;
  height: 6.4px;
  margin: -3.2px 0 0 -3.2px;
  border-radius: 50%;
  background: var(--cream);
  animation: twinkle var(--t, 5s) ease-in-out var(--d, 0s) infinite;
}
.star--big {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
}
.sparkle {
  position: absolute;
  width: calc(50px * var(--k, 1));
  margin: calc(-36px * var(--k, 1)) 0 0 calc(-25px * var(--k, 1));
  animation: glint var(--t, 6s) ease-in-out var(--d, 0s) infinite;
}
.sparkle path {
  fill: none;
  stroke: var(--cream);
  stroke-width: 3.5;
}
@media (max-width: 599px) {
  .sparkle {
    width: calc(34px * var(--k, 1));
    margin: calc(-24px * var(--k, 1)) 0 0 calc(-17px * var(--k, 1));
  }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.7); }
}
@keyframes glint {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.72) rotate(22deg); opacity: 0.6; }
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(480px, min(88vh, 120vw + 200px), 920px);
  min-height: clamp(480px, min(88svh, 120vw + 200px), 920px);
  background: var(--night);
  color: var(--cream);
  overflow: hidden;
}
.masthead__content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.6vw, 30px);
  padding: clamp(40px, 7vw, 80px) var(--gutter) clamp(24px, 4vw, 48px);
  text-align: center;
}
.masthead__logo {
  width: auto;
  height: clamp(100px, 13vw, 160px);
  max-width: min(80vw, 520px);
  object-fit: contain;
}
.masthead__headline {
  max-width: 16em;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.masthead__village {
  position: relative;
  width: min(1084px, 100% - 2 * var(--gutter));
  margin: 0 auto calc(23 * var(--u));
}
.village {
  width: 100%;
  height: auto;
}
.masthead__ground {
  position: relative;
  height: calc(96 * var(--u));
  background: var(--red);
}

/* each building pops up out of the ground, one after another */
.village .bld {
  animation: pop 0.9s cubic-bezier(0.2, 1.35, 0.4, 1) both;
}
.village .t1 { animation-delay: 0.15s; }
.village .h1 { animation-delay: 0.3s; }
.village .h2 { animation-delay: 0.45s; }
.village .t2 { animation-delay: 0.6s; }
.village .h3 { animation-delay: 0.75s; }
.village .h4 { animation-delay: 0.9s; }
.village .t3 { animation-delay: 1.05s; }
.village .spin {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: spin 9s linear infinite;
}
@keyframes pop {
  from { transform: translateY(250px); }
  to { transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.masthead__logo,
.masthead__headline {
  animation: drop-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.masthead__headline {
  animation-delay: 0.15s;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Content panels (image one side, headline + body the other, alternating)
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.panel__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  column-gap: clamp(24px, 4vw, 56px);
  width: min(1000px, 100% - 2 * var(--gutter));
  min-height: calc(377 * var(--u));
  margin-inline: auto;
  padding-block: clamp(36px, 4.4vw, 56px);
}
.panel__art {
  display: flex;
  justify-content: center;
}
.panel__art img {
  width: auto;
  height: auto;
  max-width: min(100%, 400px);
  max-height: 320px;
}
.panel--flip .panel__art {
  order: 2;
}
.panel__headline {
  display: flex;
  gap: 0.45em;
  font-size: clamp(1.9rem, 4.1vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--title);
  text-wrap: balance;
}
.panel__headline .num {
  color: var(--num);
}
.panel__headline .num:empty {
  display: none;
}
.body {
  margin-top: 0.9em;
  max-width: 34em;
}
.body > * + * {
  margin-top: 0.8em;
}
.btn {
  display: inline-block;
  margin-top: 0.3em;
  padding: 0.65em 1.3em;
  border-radius: 999px;
  background: var(--btn-bg, var(--night));
  color: var(--btn-text, var(--cream));
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.btn:hover {
  transform: translateY(-2px) rotate(-1.5deg);
}

.panel--cream { --bg: var(--cream); --num: var(--night); --title: var(--red); --text: var(--night); }
.panel--red { --bg: var(--red); --num: var(--cream); --title: var(--night); --text: var(--night); }
.panel--blue { --bg: var(--blue); --num: var(--cream); --title: var(--pink); --text: var(--cream); --btn-bg: var(--cream); --btn-text: var(--night); }
.panel--pink { --bg: var(--pink); --num: var(--night); --title: var(--blue); --text: var(--night); }
.panel--taupe { --bg: var(--taupe); --num: var(--cream); --title: var(--pink); --text: var(--cream); --btn-bg: var(--cream); --btn-text: var(--night); }
.panel--outro { --bg: var(--blue); --num: var(--cream); --title: var(--cream); --text: var(--cream); --btn-bg: var(--cream); --btn-text: var(--night); }
.panel--outro .panel__inner {
  min-height: calc(490 * var(--u));
}

/* Outro: the two big store buttons and the company logo under the copy */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 1.6em;
}
.store {
  display: inline-block;
  padding: 0.85em 1.5em;
  border: 2px solid var(--cream);
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.store--outline {
  background: transparent;
  color: var(--cream);
}
.store:hover {
  transform: translateY(-2px) rotate(-1.5deg);
}
.outro__logo {
  width: auto;
  height: auto;
  max-width: min(220px, 60%);
  max-height: 90px;
  margin-top: 2em;
}

/* A section whose "Turns on" date hasn't come yet: the art and "Coming soon" */
.panel.is-soon .panel__headline {
  opacity: 0.85;
}

@media (max-width: 719px) {
  .panel__inner {
    grid-template-columns: 1fr;
    row-gap: 28px;
    justify-items: center;
    text-align: center;
    padding-block: 48px;
  }
  .panel--flip .panel__art {
    order: 0;
  }
  .panel__art img {
    max-width: min(78%, 320px);
    max-height: 260px;
  }
  .panel__headline {
    justify-content: center;
  }
  .body {
    margin-inline: auto;
  }
  .stores {
    justify-content: center;
  }
  .store {
    font-size: 1rem;
    padding: 0.8em 1.25em;
  }
  .outro__logo {
    margin-inline: auto;
  }
}

/* --------------------------------------------------------------------------
   Stripes
   -------------------------------------------------------------------------- */
.stripe {
  position: relative;
  z-index: 1;
}
.stripe--red {
  height: calc(58 * var(--u));
  background: var(--red);
}
.stripe--cream {
  height: max(14px, calc(28 * var(--u)));
  background: var(--cream);
}

/* --------------------------------------------------------------------------
   The cave: top glued to the top, bottom glued to the bottom, and a long
   dark stretch in between (--cave-depth screens of it).
   -------------------------------------------------------------------------- */
.cave {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--cream);
  overflow: hidden;
}
.cave .stars {
  will-change: transform;
}
.cave__stage {
  position: relative;
  width: min(100%, 1366px);
  margin-inline: auto;
}
.cave__top {
  min-height: calc(330 * var(--u));
}
.cave__mid {
  position: relative;
  height: calc(var(--cave-depth) * 100vh);
}

.cave__bottom {
  height: calc(330 * var(--u));
}
.cave__piece {
  position: absolute;
  max-width: none;
  height: auto;
}
/* top pieces: x as a share of the stage, y and size in design pixels */
.cave__stal-l { left: 4%; top: calc(-2 * var(--u)); width: calc(72 * var(--u)); }
.cave__turtle { left: 22.55%; top: calc(53 * var(--u)); width: calc(157 * var(--u)); animation: paddle 16s ease-in-out infinite; }
.cave__clover { left: 39.88%; top: calc(-32 * var(--u)); width: calc(190 * var(--u)); }
.cave__stal-r { right: 16.8%; top: calc(-8 * var(--u)); width: calc(137 * var(--u)); }
.cave__ladder { right: 7.57%; top: calc(-5 * var(--u)); width: calc(61.3 * var(--u)); }
.cave__ladder-more {
  position: absolute;
  right: 7.57%;
  top: calc(299.5 * var(--u));
  width: calc(61.3 * var(--u));
  height: min(calc(var(--ladder-extra) * 100vh), calc(var(--cave-depth) * 60vh));
  background: url("../img/cave-ladder-tile.svg") top center / 100% calc(32.17 * var(--u)) repeat-y;
}
@keyframes paddle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(calc(46 * var(--u)), calc(10 * var(--u))) rotate(-4deg); }
}

.cave__copy {
  position: relative;
  width: min(31%, 420px);
  margin-left: 56.5%;
  padding-top: calc(112 * var(--u));
  padding-bottom: 40px;
}
.cave__headline {
  font-size: clamp(2rem, 4.5vw, 3.85rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.cave__copy .body {
  font-size: 1rem;
}

/* bottom pieces */
.cave__temple { left: 3.1%; bottom: calc(51 * var(--u)); width: calc(342 * var(--u)); }
.cave__wisp { left: 29.93%; bottom: calc(79 * var(--u)); width: calc(74 * var(--u)); animation: drift 7s ease-in-out infinite; }
.cave__stalag { left: 34.77%; bottom: 0; width: calc(132 * var(--u)); }
.cave__eye { left: 60.82%; bottom: calc(63 * var(--u)); width: calc(86.5 * var(--u)); }
.cave__tentacle { right: 16.33%; bottom: calc(-30 * var(--u)); width: calc(220.6 * var(--u)); }
.cave__crystal { right: 2.2%; bottom: calc(-23 * var(--u)); width: calc(90.5 * var(--u)); }
@keyframes drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 calc(-14 * var(--u)); }
}

@media (max-width: 899px) {
  .cave__copy {
    width: min(100% - 2 * var(--gutter), 30em);
    margin-inline: auto;
    padding-top: calc(250 * var(--u));
    text-align: center;
  }
  .cave__copy .body {
    margin-inline: auto;
  }
}
@media (max-width: 599px) {
  /* keep the copy clear of the ladder down the right-hand side */
  .cave__copy {
    width: auto;
    margin-left: var(--gutter);
    margin-right: calc(7.57% + 61.3 * var(--u) + 14px);
  }
  .cave__wisp,
  .cave__crystal {
    display: none;
  }
  .cave__stalag { left: 52%; }
  .cave__eye { left: 55%; bottom: calc(160 * var(--u)); }
  .cave__tentacle { right: 0; }
}

/* --------------------------------------------------------------------------
   Finale: the machine on the left, the robot arm holding the code on the
   right, and the pipe that runs off the bottom through the last stripe.
   -------------------------------------------------------------------------- */
.finale {
  position: relative;
  background: var(--night);
}
.finale__grid {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
}
.finale__machine {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: calc(57 * var(--u)) var(--gutter) calc(40 * var(--u));
  background: var(--blue);
}
.finale__machine img {
  position: relative;
  z-index: 2;
  width: min(463px, 78%);
  height: auto;
}
.finale__code {
  position: relative;
  padding: calc(57 * var(--u)) var(--gutter) calc(36 * var(--u));
  border-left: calc(33 * var(--u)) solid var(--cream);
  background: var(--red);
  color: var(--night);
  overflow: hidden;
}
.finale__code-inner {
  width: min(493px, 100%);
  margin-inline: auto;
}
.finale__headline {
  --num: var(--cream);
  --title: var(--pink);
  margin: 0 0 clamp(24px, 3.6vw, 50px) -0.25em;
}

.rig {
  --a: clamp(0.72px, calc(100vw / 1366), 1px); /* arm scale */
  position: relative;
}
.rig__rail {
  position: absolute;
  right: calc(50% + 52 * var(--a));
  bottom: calc(20 * var(--a));
  left: -100vw; /* runs off the left edge at any width; .finale__code clips it */
  height: calc(39 * var(--a));
  background: var(--night);
}
.rig__carriage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sign {
  width: 100%;
  min-height: calc(270 * var(--a));
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 36px) calc(51 * var(--a) + 22px);
  background: var(--cream);
  text-align: center;
}
.sign .body {
  margin-top: 0;
  font-size: 1rem;
}
.sign__soon {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
}
.code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 1em;
}
.code__value {
  padding: 0.3em 0.6em;
  border: 3px dashed var(--red);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  user-select: all;
}
.code__copy {
  appearance: none;
  min-height: 44px;
  padding: 0.5em 1.1em;
  border: 0;
  border-radius: 999px;
  background: var(--night);
  color: var(--cream);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.code__copy[hidden] {
  display: none;
}
.rig__arm {
  position: relative;
  width: calc(127 * var(--a));
  height: auto;
  margin-top: calc(-51 * var(--a));
}

.finale__base {
  position: relative;
  height: max(96px, calc(163 * var(--u)));
  background: var(--night);
}
.finale__emblem {
  position: absolute;
  right: max(20px, calc(53 * var(--u)));
  top: 50%;
  width: max(60px, calc(100 * var(--u)));
  height: auto;
  transform: translateY(-50%);
}
.finale__pipe {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: calc(236 * var(--u));
  height: auto;
  pointer-events: none;
}

@media (max-width: 759px) {
  .finale__grid {
    grid-template-columns: 1fr;
  }
  .finale__code {
    order: -1;
    padding-top: 44px;
    padding-bottom: 28px;
    border-left: 0;
    border-bottom: max(14px, calc(33 * var(--u))) solid var(--cream);
  }
  .finale__machine {
    padding-top: 44px;
    padding-bottom: 36px;
  }
  .finale__machine img {
    width: min(340px, 74%);
    margin-left: 12%;
  }
}

/* --------------------------------------------------------------------------
   Scroll reveals. Only armed when JS is running (html.js), so the page is
   complete without it.
   -------------------------------------------------------------------------- */
.js [data-reveal] .panel__art,
.js [data-reveal] .panel__copy {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.2, 1.2, 0.35, 1);
}
.js [data-reveal] .panel__art { transform: translateX(-48px) rotate(-4deg); }
.js [data-reveal] .panel__copy { transform: translateX(36px); transition-delay: 0.12s; }
.js [data-reveal].panel--flip .panel__art { transform: translateX(48px) rotate(4deg); }
.js [data-reveal].panel--flip .panel__copy { transform: translateX(-36px); }
.js [data-reveal].is-in .panel__art,
.js [data-reveal].is-in .panel__copy {
  opacity: 1;
  transform: none;
}

/* the things at the bottom of the cave rise up to meet you */
.js .cave__bottom[data-reveal] .cave__piece {
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(0.2, 1.15, 0.35, 1);
}
.js .cave__bottom[data-reveal] .cave__temple { transition-delay: 0s; }
.js .cave__bottom[data-reveal] .cave__stalag { transition-delay: 0.12s; }
.js .cave__bottom[data-reveal] .cave__wisp { transition-delay: 0.3s; }
.js .cave__bottom[data-reveal] .cave__tentacle { transition-delay: 0.42s; }
.js .cave__bottom[data-reveal] .cave__crystal { transition-delay: 0.2s; }
.js .cave__bottom[data-reveal] .cave__eye {
  transform: scaleY(0);
  transition: transform 0.35s ease-out 1.1s;
}
.js .cave__bottom[data-reveal].is-in .cave__piece {
  transform: none;
}

/* the arm rolls the sign in along its rail */
.js .rig[data-reveal] .rig__carriage {
  transform: translateX(calc(50vw + 60%));
  transition: transform 1.5s cubic-bezier(0.25, 1.08, 0.4, 1);
}
.js .rig[data-reveal].is-in .rig__carriage {
  transform: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px var(--gutter) 26px;
  background: var(--night);
  border-top: 1px solid rgb(224 217 186 / 0.18);
  color: var(--cream);
  font-size: 0.95rem;
}
.site-footer a {
  color: var(--cream);
  font-weight: 700;
}

/* Only signed-in admins see this (index.php?as_of=…) */
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px var(--gutter);
  background: var(--pink);
  color: var(--night);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] .panel__art,
  .js [data-reveal] .panel__copy,
  .js .cave__bottom[data-reveal] .cave__piece,
  .js .rig[data-reveal] .rig__carriage {
    opacity: 1;
    transform: none;
  }
}
