/* New front page ("V8"): sand passport top, soil layers underneath, the live footer at the end.
   Everything is scoped under .h8 so it cannot touch other pages. Brand colours come from app.css. */
.h8, .h8-ui {
  --sand: #f4ead5; --clay: #e8967a; --sun: #f5c26b; --moss: #1f5f4a; --plum: #3a2a5c; --soft: #d9d2e8;
  --edge: clamp(20px, 5vw, 60px); --gut: 70px;
  line-height: 1.5;
}
.h8 { position: relative; } /* like the other pages: a plain block, overflow is handled by body alone; the fixed worm, gauge, bubble and sticky bar live beside it in .h8-ui */

/* Buttons: the live .cta, with an outline so mint stays readable on sand and clay. */
.h8-sand .cta--mint, .h8-layer .cta--mint { border: 2px solid var(--ink); }
.h8-sand .cta, .h8-layer .cta { transition: transform .18s, box-shadow .18s; }
.h8-sand .cta:hover, .h8-layer .cta:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 8px 0 rgba(0, 8, 28, .18); }
/* The classic hero stays as is, but sits above the worm so the logo dot can be its hole. */
.h8 > .landing-shell { position: relative; z-index: 3; }
.h8 .h8-l3 .cta--outline, .h8 .h8-l3 .cta--dark { color: #fff; border-color: rgba(255, 255, 255, .55); }
.h8 .h8-l3 .cta--dark { background: transparent; }
.h8 .h8-l4 .cta--outline { color: var(--soft); border-color: rgba(255, 255, 255, .45); }
.h8-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Sand: intro, passport, Sunday pages ---------- */
.h8-sand { position: relative; --prev: var(--bg); padding-top: clamp(70px, 10vh, 120px); background: var(--sand); background-image: radial-gradient(rgba(0, 8, 28, .12) 1.2px, transparent 1.4px); background-size: 22px 22px; }
.h8-intro, .h8-pages { position: relative; z-index: 3; max-width: 1380px; margin: 0 auto; padding-left: calc(var(--edge) + var(--gut)); padding-right: var(--edge); }
.h8-intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 5vw, 70px); align-items: center; padding-top: clamp(10px, 3vw, 40px); padding-bottom: 50px; }
.h8-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .8rem; }
.h8-mark { font-size: 1.5rem; letter-spacing: -.04em; text-transform: none; line-height: 1; }
.h8-mark i { font-style: normal; }
.h8-intro h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: .98; letter-spacing: -.05em; margin: 0; }
.h8-intro h1 em { font-style: normal; color: var(--clay); }
.h8-explainer { margin: 1.2rem 0 0; max-width: 46ch; }
.h8-explainer strong { display: block; margin-bottom: .2rem; }
.h8-lead { margin: .9rem 0 1.8rem; max-width: 44ch; }
.h8-hint { margin: 1rem 0 0; font-size: .8rem; color: var(--moss); font-weight: 700; }

.h8-pass { background: var(--bg); border: 3px solid var(--ink); border-radius: 34px; padding: clamp(18px, 3vw, 32px); transform: rotate(2deg); box-shadow: 14px 14px 0 var(--ink); }
.h8-pass__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.h8-pass__head b { font-size: 1.15rem; letter-spacing: -.03em; display: flex; align-items: center; gap: .6rem; }
.h8-pass__head img { width: 38px; }
.h8-pass__head small { font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.h8-bar { height: 14px; border-radius: 99px; background: rgba(0, 8, 28, .15); overflow: hidden; margin-bottom: 1.4rem; border: 2px solid var(--ink); }
.h8-bar i { display: block; height: 100%; background: var(--panel); }
.h8-stamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 18px); }
.h8-stamp { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; font-size: .78rem; font-weight: 700; line-height: 1.15; }
.h8-slot { width: 100%; max-width: 124px; aspect-ratio: 1; border-radius: 50%; border: 3px dashed rgba(0, 8, 28, .45); display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; color: rgba(0, 8, 28, .35); transition: transform .2s; }
.h8-stamp:hover .h8-slot { transform: scale(1.06) rotate(-4deg); border-color: var(--ink); color: var(--ink); }
.h8-slot img { width: 52%; display: none; }
.h8-stamp.is-done .h8-slot { border: 4px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); color: transparent; box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 7px var(--c); animation: h8-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.h8-stamp.is-done .h8-slot > span { display: none; }
.h8-stamp.is-done .h8-slot img { display: block; transform: rotate(var(--r, -8deg)); }
@keyframes h8-pop { 0% { transform: scale(.6) rotate(-20deg); } 100% { transform: none; } }
.h8-stamp[data-k="account"], .h8-stamp[data-k="pin"] { --c: #1f5f4a; --r: -10deg; }
.h8-stamp[data-k="book"], .h8-stamp[data-k="badge"] { --c: #3a2a5c; --r: 6deg; }
.h8-stamp[data-k="offer"] { --c: #c4623f; --r: -4deg; }
.h8-stamp[data-k="swap"] { --c: #a87a12; --r: 9deg; }
.h8-why { font-weight: 400; font-size: .68rem; opacity: .75; }
.h8-pass__foot { margin: 1.2rem 0 0; font-size: .75rem; text-align: center; font-weight: 700; }

.h8-pages { padding-top: 20px; padding-bottom: 90px; }
.h8-pages h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.035em; line-height: 1.1; margin: 0; }
.h8-pages p { margin: .5rem 0 1.4rem; max-width: 50ch; }
.h8-dots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.h8-dot { aspect-ratio: 1; border-radius: 50%; background: #fff; border: 3px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: .4rem; transition: .2s; }
.h8-dot:hover { background: var(--panel); transform: translateY(-5px) rotate(-3deg); }
.h8-dot b { font-size: clamp(.9rem, 1.7vw, 1.3rem); letter-spacing: -.03em; line-height: 1; }
.h8-dot small { font-size: clamp(.5rem, .9vw, .68rem); font-weight: 700; line-height: 1.1; margin-top: .3rem; max-width: 12ch; }
.h8-dot.is-next { background: var(--sun); }
.h8-dot.is-full { opacity: .55; }
.h8-dot em { font-style: normal; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: .2rem; }
.h8-pages .h8-dig { margin: 2.2rem 0 0; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; animation: h8-bob 1.8s ease-in-out infinite; }
@keyframes h8-bob { 50% { transform: translateY(8px); } }

/* ---------- Soil layers ---------- */
.h8-layer { position: relative; min-height: 100vh; padding: clamp(100px, 14vh, 150px) var(--edge) clamp(60px, 10vh, 120px) calc(var(--edge) + var(--gut)); display: flex; flex-direction: column; justify-content: center; }
.h8-layer > * { position: relative; z-index: 3; max-width: 980px; }
.h8-l2 { background: var(--clay); --prev: var(--sand); }
.h8-l3 { background: var(--plum); color: #fff; --prev: var(--clay); }
.h8-l4 { background: var(--ink); color: var(--soft); --prev: var(--plum); min-height: 90vh; }
.h8-sand::before, .h8-layer::before, .h8-foot::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: -1px; height: 46px; background: var(--prev);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V16C1100 40 1000 4 900 20S700 40 600 18 400 2 300 22 100 36 0 14Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V16C1100 40 1000 4 900 20S700 40 600 18 400 2 300 22 100 36 0 14Z'/%3E%3C/svg%3E") 0 0 / 100% 100%; }
.h8-layer .h8-eyebrow { opacity: .7; }
.h8-layer h2 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.045em; max-width: 14ch; margin: 0; }
.h8-layer h2 em { font-style: normal; background: var(--panel); color: var(--ink); padding: 0 .2em; border-radius: .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.h8-layer .h8-lead { max-width: 46ch; margin: 1.2rem 0 1.8rem; }
.h8-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: .6rem; max-width: 760px; }
.h8-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 26px; border: 4px solid var(--ink); display: block; }
.h8-photos img:nth-child(2) { transform: translateY(22px) rotate(2deg); } .h8-photos img:nth-child(1) { transform: rotate(-2deg); }
.h8-examples { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin: 1.6rem 0 1.4rem; }
.h8-sticker { position: absolute !important; right: clamp(0px, 8vw, 120px); top: clamp(90px, 14vh, 140px); width: 112px; height: 112px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; text-align: center;
  font-weight: 700; font-size: .74rem; line-height: 1.15; transform: rotate(10deg); padding: .6rem; border: 3px solid var(--ink); }
.h8-kits { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.8rem; }
.h8-kit { background: rgba(255, 255, 255, .1); border: 2px solid var(--panel); border-radius: 28px; padding: 1rem 1.4rem; }
.h8-kit b { display: block; color: var(--panel); font-size: 1.5rem; letter-spacing: -.03em; }
.h8-big { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.04em; line-height: 1.05; color: #fff; margin: 0; }
.h8-big em { font-style: normal; color: var(--panel); }
.h8-render { position: relative; max-width: 460px; margin-top: 2rem; border-radius: 40% 60% 55% 45% / 45% 50% 50% 55%; overflow: hidden; border: 4px solid var(--bg); }
.h8-render img { display: block; width: 100%; }
.h8-render span { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--panel); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: .3em .9em; border-radius: 99px; }

/* ---------- Footer: the live .site-footer on lavender, with the crust above it ---------- */
.h8-foot { position: relative; background: var(--bg); --prev: var(--ink); padding-top: 46px; }
.h8-foot::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V20C1050 4 900 36 750 16S450 2 300 24 100 8 0 22Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V20C1050 4 900 36 750 16S450 2 300 24 100 8 0 22Z'/%3E%3C/svg%3E") 0 0 / 100% 100%; }
.h8-foot .site-footer { margin-top: 0; padding-bottom: 80px; }

/* ---------- Worm, tunnel, gauge, bubble, sticky bar ---------- */
#h8-worm { position: fixed; top: 0; left: 0; z-index: 4; pointer-events: none; overflow: hidden; transition: opacity .2s; }
body:has(.menu-panel.is-open) #h8-worm { opacity: 0; } /* above the hero now, so step aside for the open menu */ /* viewport-sized, redrawn on scroll: see home.js */
#h8-gauge { position: fixed; z-index: 9; right: 18px; top: 50%; transform: translateY(-50%); background: var(--ink); color: var(--panel); border-radius: 22px; padding: .8rem 1rem; text-align: center; font-weight: 700; line-height: 1.1; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .3s; pointer-events: none; }
#h8-gauge.is-on { opacity: 1; }
#h8-gauge b { display: block; font-size: 1.6rem; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
#h8-gauge small { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--bg); }
#h8-bubble { position: fixed; z-index: 9; left: 0; top: 0; transform: translateY(-50%); max-width: 230px; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 22px 22px 22px 4px; padding: .7rem 1rem; font-size: .82rem; font-weight: 700; line-height: 1.3; box-shadow: 4px 4px 0 var(--ink); transition: opacity .3s, transform .3s; pointer-events: none; opacity: 0; }
#h8-bubble.is-on { opacity: 1; }
#h8-bubble.is-swap { opacity: 0; transform: translateY(-40%); }
.h8-sticky { position: fixed; z-index: 20; left: 50%; bottom: 14px; transform: translate(-50%, 140%); visibility: hidden; transition: transform .35s, visibility 0s .35s; display: flex; gap: .6rem; background: var(--ink); border: 2px solid var(--panel); padding: .5rem; border-radius: 99px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.h8-sticky.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s; }
.h8-sticky .cta--outline { color: var(--soft); border-color: rgba(255, 255, 255, .4); }

@media (max-width: 860px) {
  .h8 { --gut: 64px; }
  .h8 .hero__brand { margin-bottom: 30px; } /* room under the logo dot for the worm's head */
    .h8-intro { grid-template-columns: minmax(0, 1fr); }
  .h8-pass { transform: none; box-shadow: 8px 8px 0 var(--ink); }
  .h8-dots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  #h8-gauge { top: auto; bottom: 84px; transform: none; right: 10px; padding: .45rem .7rem; }
  #h8-gauge b { font-size: 1.1rem; }
  #h8-gauge small:last-child { display: none; }
  #h8-bubble, .h8-sticker { display: none; }
  .h8-sticky { width: max-content; max-width: calc(100vw - 24px); }
  .h8-sticky .cta { white-space: nowrap; }
  .h8-sticky .cta--outline { display: none; }
}
@media (max-width: 480px) {
  .h8 .cta:not(.cta--small) { font-size: .95rem; padding: 0 20px; }
  .h8-dots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .h8 *, .h8 *::before { animation: none !important; transition: none !important; } }

/* The logo's dot: the glyph is hidden and a real circle takes its place, so the worm can be anchored to it exactly. */
#h8-dot { position: relative; color: transparent; }
#h8-dot i { position: absolute; left: .05em; top: .759em; width: .138em; height: .138em; border-radius: 50%; background: var(--ink, #00081c); }
