/*
  Shimpaku — landing page (index.html only).
  Tokens and fonts come from style.css. No JavaScript: the live timer,
  its Pause toggle, and the growing tree are CSS only, and every effect
  falls back to a still, readable page where it isn't supported.
*/

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body.home {
  /* Faint paper fibre, drawn by the browser: no image request. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--sumi-900);
  color: var(--washi-50);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Type ---------- */

.eyebrow {
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-800);
}

.home h2 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 1.35rem + 2.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.home h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--sumi-900);
}

.lede {
  margin: 0;
  font-size: clamp(1.125rem, 1.04rem + 0.35vw, 1.3125rem);
  line-height: 1.55;
  color: var(--sumi-700);
  text-wrap: pretty;
}

.section-head {
  max-width: 40rem;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 230, 0.88);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  backdrop-filter: saturate(1.1) blur(12px);
  border-bottom: 1px solid var(--washi-200);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  color: var(--sumi-900);
  text-decoration: none;
}

.brand picture {
  display: block;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(41, 43, 38, 0.1);
}

.topnav {
  display: none;
  gap: 28px;
}

.topnav a {
  color: var(--sumi-700);
  font-size: 0.9375rem;
  text-decoration: none;
}

.topnav a:hover {
  color: var(--sumi-900);
  text-decoration: underline;
  text-decoration-color: var(--washi-200);
}

/* The app's own button: a word inside a drawn ring. */
.btn-ring {
  flex-shrink: 0;
  padding: 0.42em 1.05em 0.48em;
  border: 1.5px solid var(--sumi-900);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--sumi-900);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-ring:hover {
  background: var(--sumi-900);
  color: var(--washi-50);
}

@media (max-width: 379px) {
  .topbar-inner {
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 1.2rem;
  }

  .btn-ring {
    padding: 0.38em 0.85em 0.44em;
    font-size: 0.9375rem;
  }
}

@media (min-width: 820px) {
  .topnav {
    display: flex;
  }
}

/* ---------- Store buttons ---------- */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-buttons-center {
  justify-content: center;
}

/* The official App Store and Google Play badges, unmodified, at the same
   visible height (Apple asks for at least 40 px). */
.store-badge {
  display: block;
  border-radius: 9px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge img {
  width: auto;
  height: clamp(40px, 30px + 3.2vw, 52px);
}

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  padding: 3.2%;
  border-radius: 15% / 7%;
  background: linear-gradient(150deg, #55564f 0%, #22231f 22%, #191a17 60%, #34352f 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(41, 43, 38, 0.3),
    0 48px 70px -42px rgba(41, 43, 38, 0.6),
    0 20px 40px -26px rgba(41, 43, 38, 0.45);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1320 / 2868;
  border-radius: 12.4% / 5.7%;
  background: #f1e1cf;
  container-type: inline-size;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(36px, 6vw, 72px) clamp(72px, 9vw, 120px);
}

.hero-grid {
  display: grid;
  gap: clamp(56px, 7vw, 80px);
  align-items: center;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero .lede {
  max-width: 34rem;
  margin-bottom: 36px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--sumi-700);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss-700);
}

.hero-visual {
  --phone-w: clamp(250px, 68vw, 330px);
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 8px;
}

/* A low sun of darker paper behind the phone. */
.hero-visual::before {
  content: "";
  position: absolute;
  width: min(125%, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 220, 195, 0.75) 0%, rgba(236, 220, 195, 0.35) 40%, rgba(247, 241, 230, 0) 68%);
}

.phone-hero {
  z-index: 1;
  width: var(--phone-w);
  border-radius: calc(var(--phone-w) * 0.15);
}

.phone-hero .phone-screen {
  border-radius: calc(var(--phone-w) * 0.124);
}

/* Raked sand around a stone: four rake lines follow the phone's outline
   (border + outline on two layers) and dissolve above and below it. */
.rake {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--phone-w) + 240px);
  height: calc(var(--phone-w) * 2.098 + 240px);
  translate: -50% -50%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 26%, #000 74%, transparent 96%);
  mask-image: linear-gradient(to bottom, transparent 4%, #000 26%, #000 74%, transparent 96%);
}

.rake::before,
.rake::after {
  content: "";
  position: absolute;
}

.rake::before {
  inset: 90px;
  border: 1.5px solid rgba(184, 159, 125, 0.78);
  border-radius: calc(var(--phone-w) * 0.15 + 30px);
  outline: 1.5px solid rgba(184, 159, 125, 0.62);
  outline-offset: 24px;
}

.rake::after {
  inset: 38px;
  border: 1.5px solid rgba(184, 159, 125, 0.48);
  border-radius: calc(var(--phone-w) * 0.15 + 82px);
  outline: 1.5px solid rgba(184, 159, 125, 0.32);
  outline-offset: 24px;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    min-height: min(calc(100svh - var(--header-h) - 120px), 760px);
  }

  /* Sized by width and by height, so the whole phone fits in the first
     view on short laptop screens too (the phone is ~2.1 times as tall). */
  .hero-visual {
    --phone-w: clamp(230px, min(25vw, (100svh - var(--header-h) - 110px) / 2.1), 340px);
  }
}

/* Live timer over the focus screenshot. Positions are in the screenshot's own
   units (1 cqw = 1% of the screen's width), matching the app's 72 pt hollow
   Mali timer and 19 pt Pause label. */
.demo-timer {
  position: absolute;
  left: 0.9cqw;
  right: 0;
  top: 27.86cqw;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16.364cqw;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 0.55cqw var(--terracotta-600);
}

.demo-timer .d {
  display: inline-block;
  width: 0.6em;
}

.demo-timer .colon {
  display: inline-block;
  width: 0.31em;
}

.demo-timer .d::before {
  content: counter(d);
}

.m1 { --m1: 2; counter-reset: d var(--m1); }
.m2 { --m2: 5; counter-reset: d var(--m2); }
.s1 { --s1: 0; counter-reset: d var(--s1); }
.s2 { --s2: 0; counter-reset: d var(--s2); }

.demo-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.demo-pause {
  position: absolute;
  left: 1.5cqw;
  top: 15.3cqw;
  padding: 2cqw 3cqw;
  border-radius: 3cqw;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 4.32cqw;
  line-height: 1;
  color: var(--sumi-900);
  -webkit-text-stroke: 0.1cqw var(--sumi-900);
  cursor: pointer;
  user-select: none;
}

.demo-resume,
.demo-toggle:checked ~ .demo-pause .demo-run {
  display: none;
}

.demo-toggle:checked ~ .demo-pause .demo-resume {
  display: inline;
}

.demo-toggle:focus-visible ~ .demo-pause {
  outline: 2px solid var(--terracotta-700);
  outline-offset: 0;
}

/* Floating cards, in the app's own card style. */
.chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 250px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--washi-200);
  border-radius: 16px;
  background: rgba(238, 228, 211, 0.95);
  box-shadow:
    1px 2px 1px rgba(41, 43, 38, 0.06),
    0 20px 40px -22px rgba(41, 43, 38, 0.4);
}

.chip img {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.chip-done img {
  width: 44px;
  height: 43px;
}

.chip-text {
  display: grid;
  gap: 3px;
}

.chip-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--sumi-900);
}

.chip-sub {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--sumi-700);
}

.chip-bar {
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--washi-200);
  overflow: hidden;
}

.chip-bar span {
  display: block;
  width: 33%;
  height: 100%;
  border-radius: 2px;
  background: var(--moss-700);
}

.chip-growth {
  top: 47%;
  left: max(-6%, calc(50% - 270px));
}

.chip-done {
  bottom: 13%;
  right: max(-4%, calc(50% - 260px));
}

@media (max-width: 520px) {
  .chip {
    padding: 8px 12px 8px 8px;
    gap: 9px;
    max-width: 200px;
  }

  .chip img {
    width: 38px;
    height: 38px;
  }

  .chip-label {
    font-size: 0.875rem;
  }

  .chip-growth {
    left: 0;
    top: 44%;
  }

  .chip-done {
    right: 0;
    bottom: 9%;
  }
}

/* ---------- How it works ---------- */

.how {
  padding-block: var(--section-space);
}

.steps {
  display: grid;
  gap: 40px;
  margin: clamp(48px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: minmax(118px, 36%) 1fr;
  gap: 22px;
  align-items: center;
}

.phone-small {
  width: 100%;
  max-width: 250px;
  margin-inline: auto;
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 1.375rem;
  line-height: 1.2;
}

.step p {
  margin: 0;
  color: var(--sumi-700);
}

.step-num {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--sumi-900);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 359px) {
  .step {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .step .phone-small {
    max-width: 200px;
  }

  .step h3 {
    justify-content: center;
  }
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 56px);
  }

  .step {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }

  .step-copy {
    max-width: 21rem;
    margin-inline: auto;
    text-align: center;
  }

  .step h3 {
    justify-content: center;
  }
}

/* ---------- Growth ---------- */

.growth {
  padding-block: var(--section-space);
}

.growth-copy {
  max-width: 34rem;
}

.growth-stage {
  margin-top: clamp(40px, 6vw, 64px);
}

/* Still version (and the fallback): the six stages in a row. */
.stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.stage picture {
  position: relative;
  display: block;
  isolation: isolate;
}

/* Contact shadow under the pot (its base sits at 91.7% of the art's height). */
.stage picture::after {
  content: "";
  position: absolute;
  left: 23%;
  right: 23%;
  top: 89.4%;
  height: 4.6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(75, 74, 67, 0.3), rgba(75, 74, 67, 0));
  z-index: -1;
}

.stage img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.stage-name {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--sumi-900);
}

.stage-when {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--sumi-700);
}

.growth-bar {
  display: none;
}

@media (min-width: 860px) {
  .stages {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ---------- Gardener ---------- */

.gardener {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px);
  background: linear-gradient(to bottom, var(--washi-50), var(--kraft-100) 14%, var(--kraft-100) 86%, var(--washi-50));
}

.gardener-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.gardener-art {
  width: min(100%, 460px, (100svh - 140px) / 1.5);
  margin: 0;
  justify-self: center;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect;
}

.gardener-art img {
  width: 100%;
  height: auto;
}

.home .quote {
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem);
  line-height: 1.12;
}

.gardener .eyebrow {
  color: var(--sumi-700);
}

.gardener-copy .lede {
  max-width: 32rem;
}

@media (min-width: 860px) {
  .gardener-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 88px);
  }
}

/* ---------- Trees ---------- */

.trees {
  padding-block: var(--section-space);
}

.tree-cards {
  display: grid;
  gap: 20px;
  margin: clamp(44px, 6vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.tree-card {
  position: relative;
  padding: 18px 20px 26px;
  border: 1px solid var(--washi-200);
  border-radius: var(--radius-lg);
  background: rgba(238, 228, 211, 0.7);
  text-align: center;
}

.tree-art {
  position: relative;
  isolation: isolate;
  max-width: 300px;
  margin: 0 auto 4px;
}

/* A drawn contact shadow under the pot, like the garden scene's. */
.tree-art::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 6.5%;
  height: 5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(75, 74, 67, 0.28), rgba(75, 74, 67, 0));
  z-index: -1;
}

.tree-art img {
  position: relative;
  width: 100%;
  height: auto;
  transform-origin: 50% 88%;
}

.tree-card h3 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.tree-kind {
  margin: 2px 0 14px;
  color: var(--sumi-700);
}

.tag {
  display: inline-block;
  margin: 0;
  padding: 4px 12px 5px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.tag-free {
  background: var(--moss-700);
  color: var(--washi-50);
}

.tag-pro {
  border: 1.5px solid var(--moss-700);
  color: var(--moss-800);
}

.pro-note {
  max-width: 38rem;
  margin: 32px auto 0;
  text-align: center;
  color: var(--sumi-700);
}

.pro-note strong {
  color: var(--sumi-900);
  font-weight: 600;
}

@media (min-width: 760px) {
  .tree-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Calendar ---------- */

.record {
  overflow-x: clip;
  padding-block: var(--section-space);
  border-top: 1px solid var(--washi-200);
}

.record-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.record-copy .lede {
  max-width: 32rem;
}

.record-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 300px, (100svh - 180px) / 2.1);
}

.record-visual .phone-small {
  max-width: none;
}

.record-seal {
  position: absolute;
  right: -14%;
  bottom: 10%;
  display: block;
  width: 44%;
  transform: rotate(-8deg);
}

@media (min-width: 860px) {
  .record-seal {
    right: -22%;
  }
}

.record-seal img {
  width: 100%;
  height: auto;
}

@media (min-width: 860px) {
  .record-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

/* ---------- Quiet by design ---------- */

.quiet {
  padding-block: var(--section-space);
  background: var(--washi-100);
}

.quiet-list {
  display: grid;
  gap: 0 48px;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.quiet-list li {
  padding: 22px 0 24px;
  border-top: 1px solid var(--washi-200);
}

.quiet-list h3 {
  margin: 0 0 6px;
  font-size: 1.375rem;
  line-height: 1.25;
}

.quiet-list p {
  margin: 0;
  color: var(--sumi-700);
}

@media (min-width: 700px) {
  .quiet-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .quiet-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Questions ---------- */

.questions {
  padding-block: var(--section-space) 0;
}

.questions-grid {
  display: grid;
  gap: clamp(32px, 5vw, 48px);
}

.questions .lede a {
  color: var(--moss-800);
}

.faq-list {
  border-bottom: 1px solid var(--washi-200);
}

.faq-item {
  border-top: 1px solid var(--washi-200);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* A plus drawn in two strokes that turns into a minus when open. */
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--sumi-900), var(--sumi-900)) center / 14px 1.75px no-repeat,
    linear-gradient(var(--sumi-900), var(--sumi-900)) center / 1.75px 14px no-repeat;
  transition: transform 0.25s var(--ease-out);
}

.faq-item[open] summary::after {
  background: linear-gradient(var(--sumi-900), var(--sumi-900)) center / 14px 1.75px no-repeat;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--terracotta-700);
  outline-offset: 4px;
  border-radius: 2px;
}

.faq-item h3 {
  margin: 0;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  line-height: 1.3;
}

.faq-item p {
  max-width: 40rem;
  margin: -4px 0 24px;
  color: var(--sumi-700);
}

.faq-item a {
  color: var(--moss-800);
}

@media (min-width: 900px) {
  .questions-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

/* ---------- Download ---------- */

.download {
  position: relative;
  overflow: clip;
  padding-top: var(--section-space);
  text-align: center;
}

.download-inner {
  position: relative;
  z-index: 1;
}

.download-seal {
  display: block;
  width: 84px;
  margin: 0 auto 24px;
  transform: rotate(-6deg);
}

.download-seal img {
  width: 100%;
  height: auto;
}

.download h2 {
  max-width: 14em;
  margin-inline: auto;
}

.download .lede {
  margin-bottom: 36px;
}

.download-garden {
  display: block;
  margin-top: clamp(24px, 4vw, 48px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%);
  mask-image: linear-gradient(to bottom, transparent, #000 32%);
}

.download-garden img {
  width: 100%;
  height: clamp(220px, 34vw, 420px);
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- Footer ---------- */

.footer {
  padding: 36px 0 40px;
  background: var(--washi-100);
  border-top: 1px solid var(--washi-200);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.footer .brand {
  margin-right: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  color: var(--sumi-900);
  text-decoration-color: var(--washi-200);
}

.footer-nav a:hover {
  text-decoration-color: currentColor;
}

.footer-fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--sumi-700);
}

.footer-fine p {
  margin: 0;
}

/* =====================================================================
   Motion. Everything below is an enhancement: with reduced motion, or in
   a browser without these features, the page above is complete and still.
   ===================================================================== */

/* The timer counts down from 25:00 in real seconds. Each digit is its own
   counter so nothing shifts as numbers change. The animation names come
   from registered properties, so a browser without @property keeps a
   still 25:00 instead of animating the digits incorrectly. */
@property --m1 { syntax: "<integer>"; inherits: false; initial-value: 2; }
@property --m2 { syntax: "<integer>"; inherits: false; initial-value: 5; }
@property --s1 { syntax: "<integer>"; inherits: false; initial-value: 0; }
@property --s2 { syntax: "<integer>"; inherits: false; initial-value: 0; }
@property --tick-m1 { syntax: "<custom-ident>"; inherits: true; initial-value: tick-m1; }
@property --tick-m2 { syntax: "<custom-ident>"; inherits: true; initial-value: tick-m2; }
@property --tick-s1 { syntax: "<custom-ident>"; inherits: true; initial-value: tick-s1; }
@property --tick-s2 { syntax: "<custom-ident>"; inherits: true; initial-value: tick-s2; }

@keyframes tick-m1 {
  0% { --m1: 2; }
  20.0667% { --m1: 1; }
  60.0667% { --m1: 0; }
  100% { --m1: 0; }
}

@keyframes tick-m2 {
  from { --m2: 10; }
  to { --m2: 0; }
}

@keyframes tick-s1 {
  from { --s1: 6; }
  to { --s1: 0; }
}

@keyframes tick-s2 {
  from { --s2: 10; }
  to { --s2: 0; }
}

.m1 { animation: var(--tick-m1, none) 1500s step-end forwards; }
.m2 { animation: var(--tick-m2, none) 600s steps(10, jump-start) -299s 3 forwards; }
.s1 { animation: var(--tick-s1, none) 60s steps(6, jump-start) 1s 25 forwards; }
.s2 { animation: var(--tick-s2, none) 10s steps(10, jump-start) 1s 150 forwards; }

.demo-toggle:checked ~ .demo-timer .d {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Page load: the hero settles in. Text only moves (it is never hidden),
     so it counts as painted from the first frame. */
  .rise {
    animation: rise 0.9s var(--ease-out) both;
  }

  .hero-copy .rise {
    animation-name: settle;
  }

  .hero-copy .rise:nth-child(2) { animation-delay: 0.06s; }
  .hero-copy .rise:nth-child(3) { animation-delay: 0.12s; }
  .hero-copy .rise:nth-child(4) { animation-delay: 0.18s; }
  .hero-copy .rise:nth-child(5),
  .hero-copy .rise:nth-child(6) { animation-delay: 0.24s; }

  .phone-hero {
    animation: rise-phone 1.2s var(--ease-out) 0.1s both;
  }

  .chip-growth {
    animation: chip-in 0.8s var(--ease-out) 0.7s both, float 7s ease-in-out 1.5s infinite alternate;
  }

  .chip-done {
    animation: chip-in 0.8s var(--ease-out) 0.95s both, float 8s ease-in-out 1.75s infinite alternate-reverse;
  }

  /* The trees sway a little when you point at them. */
  .tree-card:hover .tree-art img {
    animation: sway 3.2s ease-in-out infinite alternate;
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes settle {
    from { transform: translateY(14px); }
    to { transform: none; }
  }

  @keyframes rise-phone {
    from { opacity: 0; transform: translateY(48px) scale(0.97); }
    to { opacity: 1; transform: none; }
  }

  @keyframes chip-in {
    from { opacity: 0; scale: 0.92; }
    to { opacity: 1; scale: 1; }
  }

  @keyframes float {
    from { translate: 0 0; }
    to { translate: 0 -8px; }
  }

  @keyframes sway {
    from { transform: rotate(-1.2deg); }
    to { transform: rotate(1.2deg); }
  }

  /* Scroll-driven: sections ease in, the seal stamps, the tree grows. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 28%;
    }

    @keyframes reveal {
      from { opacity: 0; transform: translateY(32px); }
      to { opacity: 1; transform: none; }
    }

    .record-seal {
      animation: stamp linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 45%;
    }

    @keyframes stamp {
      0% { opacity: 0; transform: rotate(-22deg) scale(1.7); }
      70% { opacity: 1; transform: rotate(-6deg) scale(0.96); }
      100% { opacity: 1; transform: rotate(-8deg) scale(1); }
    }

    /* The growth section becomes a tall rail: the tree stays in view and
       moves through its six stages as you scroll past. On wide screens the
       copy stays beside it; on phones it scrolls away first. */
    .growth {
      padding-block: var(--section-space) 0;
    }

    .growth-rail {
      height: 320svh;
      view-timeline: --growth block;
    }

    .growth-stage {
      position: sticky;
      top: var(--header-h);
      display: grid;
      align-content: center;
      height: calc(100svh - var(--header-h));
      margin-top: 0;
    }

    .stages {
      display: grid;
      grid-template-columns: 1fr;
      width: min(100%, calc(100svh - var(--header-h) - 210px), 520px);
      margin-inline: auto;
    }

    .stage {
      grid-area: 1 / 1;
      animation: stage linear both;
      animation-timeline: --growth;
    }

    .stage-name {
      margin-top: 0;
      font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    }

    .stage-when {
      font-size: 1rem;
    }

    .stage:nth-child(1) { animation-name: stage-first; animation-range: contain 0% contain 19.17%; }
    .stage:nth-child(2) { animation-range: contain 14.17% contain 35.83%; }
    .stage:nth-child(3) { animation-range: contain 30.83% contain 52.5%; }
    .stage:nth-child(4) { animation-range: contain 47.5% contain 69.17%; }
    .stage:nth-child(5) { animation-range: contain 64.17% contain 85.83%; }
    .stage:nth-child(6) { animation-name: stage-last; animation-range: contain 80.83% contain 100%; }

    /* The trees crossfade, but the names swap cleanly: each caption only
       shows inside its own sixth of the scroll, so two never overlap. */
    .stage-name,
    .stage-when {
      animation: caption linear both;
      animation-timeline: --growth;
    }

    .stage:nth-child(1) :is(.stage-name, .stage-when) { animation-name: caption-first; animation-range: contain 0% contain 16.67%; }
    .stage:nth-child(2) :is(.stage-name, .stage-when) { animation-range: contain 16.67% contain 33.33%; }
    .stage:nth-child(3) :is(.stage-name, .stage-when) { animation-range: contain 33.33% contain 50%; }
    .stage:nth-child(4) :is(.stage-name, .stage-when) { animation-range: contain 50% contain 66.67%; }
    .stage:nth-child(5) :is(.stage-name, .stage-when) { animation-range: contain 66.67% contain 83.33%; }
    .stage:nth-child(6) :is(.stage-name, .stage-when) { animation-name: caption-last; animation-range: contain 83.33% contain 100%; }

    @keyframes caption {
      0%, 3% { opacity: 0; }
      12%, 88% { opacity: 1; }
      97%, 100% { opacity: 0; }
    }

    @keyframes caption-first {
      0%, 88% { opacity: 1; }
      97%, 100% { opacity: 0; }
    }

    @keyframes caption-last {
      0%, 3% { opacity: 0; }
      12%, 100% { opacity: 1; }
    }

    @keyframes stage {
      0% { opacity: 0; transform: scale(0.985); }
      18%, 82% { opacity: 1; transform: none; }
      100% { opacity: 0; }
    }

    @keyframes stage-first {
      0%, 82% { opacity: 1; }
      100% { opacity: 0; }
    }

    @keyframes stage-last {
      0% { opacity: 0; transform: scale(0.985); }
      18%, 100% { opacity: 1; transform: none; }
    }

    .growth-bar {
      display: block;
      width: min(100%, 280px);
      height: 4px;
      margin: 20px auto 0;
      border-radius: 2px;
      background: var(--washi-200);
      overflow: hidden;
    }

    .growth-bar span {
      display: block;
      height: 100%;
      border-radius: 2px;
      background: var(--moss-700);
      transform-origin: left;
      animation: grow-bar linear both;
      animation-timeline: --growth;
      animation-range: contain 0% contain 100%;
    }

    @keyframes grow-bar {
      from { transform: scaleX(0.04); }
      to { transform: scaleX(1); }
    }

    @media (min-width: 860px) {
      .growth {
        padding-top: 0;
      }

      .growth-track {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: 48px;
        align-items: start;
      }

      .growth-copy {
        position: sticky;
        top: var(--header-h);
        display: grid;
        align-content: center;
        height: calc(100svh - var(--header-h));
      }
    }
  }
}
