:root {
  --ink: #1f2a1b;
  --muted: #66705d;
  --cloth: #f3eee3;
  --red: #c2413a;
  --white: #fbfaf5;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M4 3 L4 23 L9.4 18.2 L13 26 L16.6 24.4 L13.1 16.8 L20.5 16.8 Z' fill='white' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, auto;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #6fa6dc; scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
body {
  font-family: 'Geist', system-ui, sans-serif;
  color: var(--ink);
  background: transparent;
  cursor: var(--arrow);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-over-computer { cursor: pointer; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the meadow ---------- */
#meadow {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0;
  background: linear-gradient(#3f7fd0 0%, #9cc6ec 46%, #5f8f2c 46.2%, #24470f 100%);
  opacity: 0; transition: opacity 1.2s ease;
}
body.ready #meadow, body.no-gl #meadow { opacity: 1; }
#sparkles { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1;
  height: 100vh; height: 100svh;
  display: grid; place-items: center;
  color: var(--white);
  pointer-events: none;
  transition: opacity .8s ease;
}
.hero a, .hero button { pointer-events: auto; }
body.in-story .hero { opacity: 0; }
body.in-story .cloth { box-shadow: none; }
.nav {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px max(28px, env(safe-area-inset-right, 0px)) 22px max(28px, env(safe-area-inset-left, 0px));
  text-shadow: 0 1px 10px rgba(10, 30, 60, .35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; font-size: 17px; }
.brand svg { width: 26px; height: auto; filter: drop-shadow(0 1px 6px rgba(10, 30, 60, .35)); }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav nav a { text-decoration: none; opacity: .92; }
.nav nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.sound { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.sound svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 4px rgba(10, 30, 60, .35)); }
.sound .sound__off, .is-muted .sound__on { display: none; }
.is-muted .sound .sound__off, .is-muted .os__btn .sound__off { display: inline; }
.os__btn .sound__off { display: none; }
.is-muted .os__btn .sound__on { display: none; }

.hero__title {
  display: flex; flex-direction: column; align-items: center;
  width: min(66vw, 1000px);
  margin-top: -15vh;
}
.stitch { display: block; }
.stitch--hero { filter: drop-shadow(0 8px 14px rgba(20, 45, 10, .35)); }
.hero__sub {
  margin-top: 4px;
  font-family: 'Geist Mono', monospace; font-size: 15px; font-weight: 500; letter-spacing: .04em;
  text-shadow: 0 1px 2px rgba(10, 30, 10, .6), 0 0 14px rgba(10, 30, 10, .55);
  opacity: 0; transform: translateY(6px);
  transition: opacity 1s ease 1.4s, transform 1s ease 1.4s;
}
body.ready .hero__sub { opacity: .95; transform: none; }

/* the invitation: sits under the computer */
.hero__play {
  position: absolute; left: 50%; bottom: 13vh; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  background: rgba(251, 250, 245, .9); color: #1f2a1b;
  font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 500; letter-spacing: .02em;
  box-shadow: 0 6px 24px rgba(15, 40, 10, .25);
  cursor: pointer;
  opacity: 0; transition: opacity 1s ease 2.4s, transform .2s ease, background .2s;
}
body.ready .hero__play { opacity: 1; }
.hero__play:hover, body.is-over-computer .hero__play { background: #fff; transform: translateX(-50%) translateY(-2px); }
.hero__dot { width: 10px; height: 10px; border-radius: 50%; background: #c2413a; box-shadow: 0 0 0 0 rgba(194, 65, 58, .5); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(194, 65, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 65, 58, 0); } }
.hero__hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .12em;
  text-decoration: none; opacity: .8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

/* ---------- aida cloth ---------- */
.cloth {
  position: relative; z-index: 2;
  padding: 120px max(24px, env(safe-area-inset-right, 0px)) 140px max(24px, env(safe-area-inset-left, 0px));
  background-color: var(--cloth);
  background-image:
    radial-gradient(circle at 0 0, rgba(110, 90, 55, .22) 0 1.1px, transparent 1.7px),
    linear-gradient(90deg, rgba(255, 255, 255, .55) 0 3px, transparent 3px),
    linear-gradient(0deg, rgba(255, 255, 255, .55) 0 3px, transparent 3px),
    linear-gradient(90deg, rgba(120, 95, 60, .05) 0 1px, transparent 1px);
  background-size: 9px 9px, 9px 9px, 9px 9px, 9px 9px;
  box-shadow: 0 -24px 60px rgba(10, 30, 10, .35), 0 24px 60px rgba(10, 30, 60, .25);
}
.cloth::before, .cloth::after {
  content: ''; position: absolute; left: 22px; right: 22px;
  border-top: 3px dashed var(--red);
  opacity: .75;
}
.cloth::before { top: 22px; }
.cloth::after { bottom: 22px; }

.block { max-width: 940px; margin: 0 auto 120px; }
.block:last-child { margin-bottom: 0; }
.label {
  font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.block h2 { font-size: clamp(28px, 4.2vw, 50px); font-weight: 500; letter-spacing: -.025em; line-height: 1.08; max-width: 19ch; margin-bottom: 26px; text-wrap: balance; }
.block > p:not(.label) { font-size: 19px; line-height: 1.55; max-width: 56ch; color: #33402d; }
.medkit .stitch { margin: 0 0 18px -10px; }
.link { display: inline-block; margin-top: 22px; font-family: 'Geist Mono', monospace; font-size: 14px; text-underline-offset: 5px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 24px 22px 26px; min-height: 180px;
  background: rgba(255, 255, 255, .55);
  border: 2px dashed rgba(60, 90, 40, .55);
  border-radius: 4px;
}
.card--open { border-color: rgba(194, 65, 58, .65); }
.card span { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card b { display: block; font-size: 21px; font-weight: 500; letter-spacing: -.01em; margin: 14px 0 10px; }
.card p { font-size: 15px; line-height: 1.5; color: #4a5642; }

/* ---------- sky footer: the meadow camera looks up ---------- */
.sky {
  position: relative; z-index: 1;
  min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--white);
  text-shadow: 0 1px 10px rgba(10, 30, 60, .35);
  padding: 80px 24px 60px;
}
.stitch--foot { filter: drop-shadow(0 8px 14px rgba(20, 40, 80, .3)); }
.mail { font-family: 'Geist Mono', monospace; font-size: 17px; text-underline-offset: 6px; }
.fine { position: absolute; bottom: 22px; font-size: 12px; opacity: .8; font-family: 'Geist Mono', monospace; }

a, button { cursor: var(--arrow); }
.hero__play, .os__btn, .sound { cursor: pointer; }

@media (max-width: 760px) {
  .hero__title { width: 88vw; margin-top: -18vh; }
  .hero__sub { font-size: 12px; text-align: center; }
  .hero__play { bottom: 16vh; font-size: 12px; }
  .nav { padding: 18px; }
  .nav nav { gap: 16px; font-size: 14px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .block { margin-bottom: 90px; }
  .block > p:not(.label) { font-size: 17px; }
}

/* ---------- waitlist: on the cloth, and on the screen at the end of the film ---------- */
.wl { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.wl input {
  flex: 1 1 240px; min-width: 0; height: 52px; padding: 0 20px;
  font: inherit; font-size: 17px; color: var(--ink, #0b0b0b);
  background: rgba(255, 255, 255, .85); border: 2px dashed rgba(60, 90, 40, .55); border-radius: 999px; outline: none;
}
.wl input:focus { border-style: solid; border-color: #3c5a28; }
.wl button {
  height: 52px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 500; color: #fff; background: #1f2a19;
}
.wl button:hover { background: #33402d; }
.wl button:disabled { opacity: .6; cursor: default; }
.wl__msg { flex-basis: 100%; min-height: 1.4em; margin: 2px 0 0 6px; font-size: 15px; color: #33402d; }
.wl[data-state="error"] .wl__msg { color: #b23b2f; }
.wl__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
