:root {
  --forest: #163020;
  --moss: #2f5539;
  --sage: #8e9a5f;
  --leaf: #7f9d6a;
  --cream: #faf7f0;
  --paper: #f7f3eb;
  --sand: #e5dfd3;
  --clay: #b3845a;
  --ink: #1e241f;
  --night: #0d0d0d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.walk {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--cream);
}

.scene-wrap {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(250, 247, 240, .86), transparent 34%), var(--cream);
}

.scene {
  width: 100%;
  height: 100%;
  display: block;
  transition: filter .5s ease, opacity .5s ease;
}

.walk:not(.is-started) .scene,
.walk.is-final .scene {
  filter: saturate(.82) brightness(.75);
  opacity: .86;
}

.walk.is-final .scene {
  filter: saturate(.78) brightness(.7) blur(1px);
  opacity: .9;
}

.topbar {
  position: fixed;
  z-index: 5;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.dots {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 48, 32, .2);
  background: rgba(250, 247, 240, .76);
  backdrop-filter: blur(12px);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(22, 48, 32, .26);
}

.dot.is-active { background: var(--forest); }
.button .icon { width: 16px; height: 16px; margin-right: 8px; flex: none; }

.skip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--forest);
  background: rgba(250, 247, 240, .82);
  border: 1px solid rgba(22, 48, 32, .22);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  pointer-events: auto;
}

.intro {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.intro.is-visible { display: flex; }

.intro-card {
  width: min(420px, 100%);
  padding: 26px 22px 22px;
  background: rgba(250, 247, 240, .92);
  border: 1px solid rgba(22, 48, 32, .22);
  box-shadow: 0 24px 80px rgba(13, 13, 13, .22);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--moss);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(42px, 13vw, 60px); }
h2 { font-size: clamp(31px, 8vw, 43px); }

.body-copy {
  margin: 14px 0 0;
  color: rgba(30, 36, 31, .78);
  font-size: 16px;
  line-height: 1.52;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--forest);
  border-radius: 0;
  background: transparent;
  color: var(--forest);
  font: 700 15px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--forest);
  color: var(--cream);
}

.button.text {
  min-width: 72px;
  border-color: transparent;
  padding-inline: 4px;
}

.sheet {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 258px;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  background: rgba(247, 243, 235, .96);
  border-top: 1px solid rgba(22, 48, 32, .22);
  box-shadow: 0 -18px 70px rgba(13, 13, 13, .17);
  transform: translateY(110%);
  transition: transform .44s cubic-bezier(.22, 1, .36, 1);
}

.sheet.is-visible { transform: translateY(0); }

.sheet.final {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  background:
    linear-gradient(180deg, rgba(22, 48, 32, .28), transparent 26%, transparent 74%, rgba(22, 48, 32, .34)),
    rgba(250, 247, 240, .3);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

.sheet.final .sheet-inner {
  position: relative;
  padding: 34px 28px;
  background: rgba(250, 247, 240, .92);
  border: 1px solid rgba(22, 48, 32, .18);
  box-shadow: 0 30px 90px rgba(13, 13, 13, .32);
}

.sheet.final .sheet-inner::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 6px;
  background: var(--forest);
}

.sheet-inner { width: min(560px, 100%); margin: 0 auto; }

.sheet .body-copy { max-width: 34rem; }

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.step-count {
  color: rgba(30, 36, 31, .58);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

@media (min-width: 760px) {
  .topbar {
    left: 28px;
    right: 28px;
  }

  .sheet {
    left: auto;
    right: 28px;
    bottom: 28px;
    width: 430px;
    border: 1px solid rgba(22, 48, 32, .22);
  }

  .sheet.final {
    inset: 0 0 0 auto;
    width: min(520px, 44vw);
    min-height: 100vh;
    border-width: 0 0 0 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
