@font-face { font-family: 'Makena'; src: url('../fonts/Makena.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
/* Planet Foot — an Insole Studio microsite. Dark by design (space). Accent = Insole Studio green. */
:root {
  color-scheme: dark;
  --bg: #000; --ink: #f7f4f0; --body: rgba(247, 244, 240, .86); --dim: rgba(247, 244, 240, .64); --faint: rgba(247, 244, 240, .42);
  --green: #9fcc3b; --ice: #b9dcff; --lockup-grey: #8a8d92;
  --font: 'Makena', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --gut: clamp(16px, 4.5vw, 64px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; touch-action: pan-y; }
#track { position: relative; z-index: 1; pointer-events: none; }

/* top bar: Planet Foot, by Insole Studio. */
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 18px) var(--gut) 28px; pointer-events: none; background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.35) 55%, rgba(0,0,0,0)); }
.mark { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.mark b { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.mark span { font-size: 13px; font-weight: 500; color: var(--dim); letter-spacing: -.005em; }
.mark span i, .lock i { font-style: normal; color: var(--green); }
.play { pointer-events: auto; font: inherit; font-size: 14px; font-weight: 550; color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; padding: 9px 16px 9px 13px; display: flex; align-items: center; gap: 9px; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s; }
.play:hover { background: rgba(255, 255, 255, .14); }
.play:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.play .ico { width: 0; height: 0; border-left: 8px solid var(--ink); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.play[aria-pressed="true"] .ico { width: 8px; height: 10px; border: 0; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }

/* slide text — high contrast, generous size, a soft shade behind it so the 3D never fights the words */
.stage { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.stage::before { content: ''; position: absolute; left: 0; bottom: 0; width: min(1000px, 100vw); height: 78vh;
  background: radial-gradient(ellipse 85% 75% at 0% 100%, rgba(0,0,0,.82), rgba(0,0,0,.55) 42%, rgba(0,0,0,0) 72%); opacity: var(--shade, 0); transition: opacity .5s; }
.slide { position: absolute; left: var(--gut); bottom: clamp(60px, 13vh, 140px); max-width: min(600px, 86vw); opacity: 0; will-change: opacity, transform; }
.slide .k { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--green); margin-bottom: 16px; display: flex; gap: 12px; align-items: baseline; }
.slide .k b { font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.slide h2 { font-size: clamp(44px, 6.2vw, 96px); line-height: 1; font-weight: 650; letter-spacing: -.035em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.55); }
.slide p { margin-top: 22px; font-size: clamp(18px, 1.45vw, 22px); line-height: 1.45; font-weight: 450; color: var(--body); max-width: 32ch; text-wrap: pretty; text-shadow: 0 1px 18px rgba(0,0,0,.7); }
.slide.hero { left: 0; right: 0; bottom: auto; top: 25%; max-width: none; text-align: center; transform: translateY(-50%); }
.slide.hero .k { justify-content: center; color: var(--ink); opacity: .8; font-weight: 500; letter-spacing: .01em; font-size: 16px; }
.slide.hero h2 { font-size: clamp(68px, 13vw, 210px); letter-spacing: -.05em; line-height: .92; text-shadow: 0 0 80px rgba(0,0,0,.7); }
.slide.hero p { margin: 22px auto 0; color: var(--ink); font-size: clamp(19px, 1.7vw, 24px); }
.slide.center { left: 0; right: 0; bottom: auto; top: 27%; max-width: none; text-align: center; transform: translateY(-50%); }
.slide.center p { margin-left: auto; margin-right: auto; }
.slide.center .k { justify-content: center; }
.slide.end p { color: var(--ink); }
.slide .sign { margin-top: 30px; }
.cta { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--green); color: #0b0f04;
  font: inherit; font-size: 17px; font-weight: 650; letter-spacing: -.01em; text-decoration: none; text-shadow: none; transition: transform .2s, filter .2s; box-shadow: 0 8px 30px rgba(159, 204, 59, .22); }
.cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cta span { transition: transform .2s; } .cta:hover span { transform: translateX(3px); }
.lock { font-size: 22px; font-weight: 650; letter-spacing: -.03em; color: var(--ink); }
.slide .note { margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--dim); max-width: 46ch; }
.slide .count { margin-top: 24px; font-size: 15px; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.slide .count em { font-style: normal; color: var(--ink); font-weight: 650; }

/* labels that follow 3D points */
.labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.labels span { position: absolute; left: 0; top: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); white-space: nowrap; opacity: 0;
  display: flex; align-items: center; gap: 10px; margin-top: -10px; text-shadow: 0 1px 14px rgba(0,0,0,.9); }
.labels span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(0,0,0,.4); margin-left: -4px; }
.labels span.ice::before { background: var(--ice); }
.labels span.green::before { background: var(--green); }

/* chapter rail */
.rail { position: fixed; z-index: 5; right: calc(var(--gut) - 8px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; }
.rail button { width: 20px; height: 17px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rail button i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); transition: transform .3s, background .3s; }
.rail button.on i { background: var(--ink); transform: scale(1.6); }
.rail button:hover i { background: var(--ink); }
.rail button:focus-visible { outline: 2px solid var(--green); border-radius: 4px; }

.cue { position: fixed; z-index: 3; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 26px); transform: translateX(-50%); font-size: 13px; font-weight: 500; color: var(--dim); pointer-events: none; transition: opacity .5s; text-align: center; }
.cue::after { content: ''; display: block; width: 1px; height: 34px; margin: 12px auto 0; background: linear-gradient(var(--dim), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.loader { position: fixed; inset: 0; z-index: 9; background: #000; display: grid; place-items: center; transition: opacity 1s .2s, visibility 0s 1.3s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader .lt { font-size: 15px; font-weight: 600; color: var(--dim); text-align: center; }
.loader .lb { width: 140px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); margin: 16px auto 0; overflow: hidden; }
.loader .lb i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }

@media (max-width: 760px) {
  .slide { left: var(--gut); right: var(--gut); bottom: calc(env(safe-area-inset-bottom) + 40px); max-width: none; }
  .stage::before { width: 100vw; height: 62vh; background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.6) 45%, rgba(0,0,0,0)); }
  .slide h2 { font-size: clamp(40px, 11.5vw, 58px); }
  .slide p { font-size: 17px; margin-top: 14px; }
  .slide .k { margin-bottom: 12px; }
  .rail { right: 4px; gap: 0; }
  .rail button { width: 14px; height: 13px; }
  .mark span { display: none; }
  .labels span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .cue::after { animation: none; } }

/* film mode (?film, used by film/film.py): no UI chrome, titles only, an end card */
.endcard { display: none; }
.film .bar, .film .rail, .film .cue, .film .loader, .film .slide .note, .film .slide .sign, .film .slide:not(.hero) p, .film .slide .k b { display: none !important; }
.film .stage::before { opacity: calc(var(--shade, 0) * .8); }
.film .endcard { display: grid; place-items: center; position: fixed; inset: 0; z-index: 8; background: #000; opacity: 0; text-align: center; pointer-events: none; }
.film .endcard h3 { font-size: clamp(60px, 9vw, 150px); font-weight: 650; letter-spacing: -.05em; line-height: .95; }
.film .endcard p { margin-top: 18px; font-size: clamp(18px, 1.7vw, 26px); color: var(--body); }
.film .endcard .lock { margin-top: 44px; font-size: clamp(18px, 1.6vw, 24px); }

/* the film player */
.player { position: fixed; inset: 0; z-index: 30; background: #000; display: grid; place-items: center; }
.player[hidden] { display: none; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pclose { position: absolute; top: calc(env(safe-area-inset-top) + 16px); right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.55); color: #fff; font: 400 26px/1 var(--font); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pclose:hover { background: rgba(255,255,255,.15); }
.pclose:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.has-player body { overflow: hidden; }

/* bones slide: three titles in one place, crossfaded by main.js */
.bstack { display: grid; } .bt { grid-area: 1 / 1; align-self: end; } .bt em { font-style: normal; font-variant-numeric: tabular-nums; }

/* by the logo: a star that glimmers on the corner of "Planet Foot", and a shooting star that streaks past every few seconds */
.mark { position: relative; }
.mark b { position: relative; }
.glint { position: absolute; right: -11px; top: -7px; width: 14px; height: 14px; pointer-events: none; opacity: 0; animation: glint 6.5s ease-in-out 1.2s infinite; }
.glint::before, .glint::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.4px; border-radius: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 50%, rgba(255,255,255,0)); transform: translate(-50%, -50%); }
.glint::after { transform: translate(-50%, -50%) rotate(90deg); }
.glint { filter: drop-shadow(0 0 3px rgba(255, 244, 220, .9)); }
@keyframes glint {
  0%, 62% { opacity: 0; transform: scale(.2) rotate(0deg); }
  70% { opacity: 1; transform: scale(1.15) rotate(30deg); }
  76% { opacity: .85; transform: scale(.8) rotate(45deg); }
  84%, 100% { opacity: 0; transform: scale(.15) rotate(70deg); }
}
.logostar { position: absolute; left: 70px; top: -20px; width: 150px; height: 2px; pointer-events: none; opacity: 0;
  transform-origin: 100% 50%; animation: logostar 9s cubic-bezier(.3, .1, .3, 1) 3s infinite; }
.logostar::before { content: ''; position: absolute; inset: 0; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 190, 140, 0), rgba(255, 214, 180, .45) 60%, #fff 97%, rgba(255,255,255,0)); }
.logostar::after { content: ''; position: absolute; right: 2px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(220, 235, 255, .9), 0 0 14px 4px rgba(255, 255, 255, .35); }
@keyframes logostar {
  0%, 80% { opacity: 0; transform: translate(170px, -18px) rotate(-9deg) scaleX(.2); }
  82% { opacity: 1; transform: translate(120px, -11px) rotate(-9deg) scaleX(.8); }
  88% { opacity: .85; transform: translate(-10px, 3px) rotate(-9deg) scaleX(1); }
  90.5%, 100% { opacity: 0; transform: translate(-50px, 8px) rotate(-9deg) scaleX(.4); }
}
@media (max-width: 760px) { .logostar { left: 40px; width: 110px; } }
@media (prefers-reduced-motion: reduce) { .glint, .logostar { animation: none; opacity: 0; } }

.thumb .stage, .thumb .labels, .thumb .endcard { display: none !important; }
