:root {
  color-scheme: dark;
  --background: #000;
  --tree: #f1f1ee;
  --tree-soft: #d8d8d4;
  --toggle-border: rgba(255, 255, 255, 0.25);
  --toggle-muted: rgba(255, 255, 255, 0.42);
  --toggle-thumb: #f1f1ee;
  --toggle-icon: #050505;
  --muted: rgba(241, 241, 238, 0.5);
  --line: rgba(241, 241, 238, 0.16);
  --red: #e51b16;
  --green: #718d3a;
}

html[data-theme="light"] {
  color-scheme: light;
  --background: #f4f3ef;
  --tree: #090909;
  --tree-soft: #252525;
  --toggle-border: rgba(0, 0, 0, 0.22);
  --toggle-muted: rgba(0, 0, 0, 0.42);
  --toggle-thumb: #090909;
  --toggle-icon: #f4f3ef;
  --muted: rgba(9, 9, 9, 0.5);
  --line: rgba(9, 9, 9, 0.16);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: var(--background);
  color: var(--tree);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  transition: background-color 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero {
  display: grid;
  width: 100%;
  height: 100svh;
  place-items: center;
  overflow: hidden;
}

.hero__cue {
  position: absolute;
  bottom: clamp(20px, 3.2vh, 44px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  transform: translateX(-50%);
}

.hero__cue i {
  display: block;
  width: 38px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.hero__cue i::after {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--tree);
  content: "";
  animation: cue-line 2.4s ease-in-out infinite;
}

.hero-meta {
  position: absolute;
  z-index: 5;
  top: clamp(22px, 3vw, 38px);
  left: clamp(20px, 3.2vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font: 600 8px/1.35 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-meta__row {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 16px;
}

.hero-meta__row--contract {
  gap: 10px;
}

.hero-meta__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-meta__item strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tree);
  font: inherit;
}

.hero-meta__link {
  color: var(--tree);
  text-decoration: none;
  transition: opacity 200ms ease;
}

.hero-meta__link[href]:hover {
  opacity: 0.58;
}

.hero-meta__link[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.4;
}

.hero-meta__address {
  color: var(--tree);
  font: inherit;
  letter-spacing: 0.08em;
}

.hero-meta__status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(113, 141, 58, 0.35);
}

.hero-meta__divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.hero-meta__copy {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--tree);
  background: transparent;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.hero-meta__copy[data-copied="true"] {
  color: #fff;
  border-color: #45c66b;
  background: #27a94f;
  box-shadow: 0 0 0 4px rgba(39, 169, 79, 0.18), 0 0 20px rgba(39, 169, 79, 0.42);
  transform: scale(1.08);
}

.hero-meta__copy:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hero-meta__copy svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.tree {
  --tree-lift: -4vh;
  display: block;
  width: min(94vw, 1100px);
  height: min(98svh, 1060px);
  overflow: visible;
  opacity: 0;
  transform: translateY(calc(var(--tree-lift) + 2.5vh)) scale(0.985);
  transform-origin: 50% 100%;
  animation: reveal-tree 1800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tree__silhouette,
.tree__branches {
  fill: var(--tree);
  stroke: var(--tree);
}

.tree__trunk,
.tree__root { fill: var(--tree); }

.tree__trunk,
.tree__branches--primary { filter: url(#rough-bark); }

.tree__bark {
  fill: none;
  stroke: var(--background);
  stroke-linecap: round;
  stroke-width: 1.8;
  opacity: 0.36;
}
.tree__branches {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tree__branches--primary { color: var(--tree); }

.tree__branches--secondary,
.tree__branches--fine { color: var(--tree-soft); }

.tree__branches--fine {
  opacity: 0.94;
}

.branch-tip-cluster {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: tip-sway var(--sway-duration) ease-in-out var(--sway-delay) infinite alternate;
  will-change: transform;
}

.tree__branches path { stroke: currentColor; }
.tree__apples { filter: url(#apple-halo); }

.tree__apple {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

.tree__apple-stem {
  fill: none;
  stroke: var(--tree);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.tree__apple-fruit { fill: url(#apple-red); }
.tree__apple--unripe .tree__apple-fruit { fill: url(#apple-green); }
.tree__apple-glint { fill: rgba(255, 255, 255, 0.5); }

.story,
.how,
.orange-filter,
.closing {
  position: relative;
  border-top: 1px solid var(--line);
}

.story {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(100px, 14vw, 220px) clamp(24px, 8vw, 130px);
}

.story__inner {
  width: min(100%, 1120px);
}

.story__inner--narrow {
  width: min(100%, 1120px);
}

.story__index {
  margin: 0 0 clamp(28px, 5vw, 70px);
  color: var(--muted);
  font: 600 clamp(9px, 0.8vw, 11px)/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story h1,
.story h2,
.how h2,
.orange-filter h2,
.closing h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.story h1 {
  max-width: 1100px;
  font-size: clamp(68px, 11.2vw, 182px);
}

.story h2,
.how h2,
.orange-filter h2,
.closing h2 {
  font-size: clamp(58px, 8.7vw, 144px);
}

.story__aside {
  margin: clamp(40px, 7vw, 92px) 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.25vw, 18px);
}

.story__aside--contract {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.story__aside--contract code {
  color: var(--tree);
  font: inherit;
  letter-spacing: 0.01em;
}

.story__prose {
  display: grid;
  gap: 6px;
  margin-top: clamp(70px, 11vw, 160px);
}

.story__prose p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(22px, 3.1vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.story__prose p strong {
  color: var(--tree);
  font-weight: 550;
}

.story--opening::after {
  position: absolute;
  right: 8vw;
  bottom: 9vw;
  width: clamp(12px, 1.6vw, 24px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 22px rgba(229, 27, 22, 0.3);
  content: "";
}

.story--plain {
  background: color-mix(in srgb, var(--tree) 3%, var(--background));
}

.how {
  padding: clamp(100px, 13vw, 200px) clamp(24px, 8vw, 130px);
}

.how__header {
  width: min(100%, 1120px);
  margin: 0 auto clamp(100px, 15vw, 230px);
}

.how__steps {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  min-height: 520px;
  padding: 34px clamp(22px, 3vw, 46px) 48px;
  border-right: 1px solid var(--line);
}

.step:last-child {
  border-right: 0;
}

.step__number {
  color: var(--muted);
  font: 500 10px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.14em;
}

.step__meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.step__mark {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.step__mark--seed {
  width: 5px;
  height: 9px;
  border-radius: 80% 20% 70% 30%;
  background: var(--tree);
  transform: rotate(35deg);
}

.step__mark--green { background: var(--green); box-shadow: 0 0 20px rgba(113, 141, 58, 0.25); }
.step__mark--red { background: var(--red); box-shadow: 0 0 20px rgba(229, 27, 22, 0.28); }

.step__icon {
  position: absolute;
  top: 39%;
  left: 50%;
  width: clamp(68px, 6.5vw, 92px);
  height: auto;
  overflow: visible;
  color: var(--tree);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transform: translate(-50%, -50%);
}

.step__icon circle {
  fill: var(--background);
}

.step h3 {
  margin: 340px 0 20px;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.step p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.story--orchard {
  overflow: hidden;
}

.story--orchard .story__inner {
  position: relative;
  z-index: 2;
}

.orchard-dots {
  position: absolute;
  inset: 0;
  opacity: 0.13;
}

.orchard-dots i {
  position: absolute;
  width: clamp(80px, 12vw, 190px);
  aspect-ratio: 1;
  border: 1px solid var(--tree);
  border-radius: 50%;
}

.orchard-dots i:nth-child(1) { top: 5%; left: 4%; }
.orchard-dots i:nth-child(2) { top: 17%; left: 27%; }
.orchard-dots i:nth-child(3) { top: 3%; right: 12%; }
.orchard-dots i:nth-child(4) { top: 42%; left: 10%; }
.orchard-dots i:nth-child(5) { top: 47%; left: 43%; }
.orchard-dots i:nth-child(6) { top: 40%; right: 5%; }
.orchard-dots i:nth-child(7) { bottom: 4%; left: 20%; }
.orchard-dots i:nth-child(8) { bottom: 9%; right: 27%; }
.orchard-dots i:nth-child(9) { bottom: -5%; right: 2%; }

.story__prose--large p {
  color: var(--tree);
  font-size: clamp(28px, 4vw, 62px);
}

.orchard-line {
  max-width: 680px;
  margin: clamp(70px, 10vw, 150px) 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.story--honest {
  background: var(--tree);
  color: var(--background);
}

.story--honest .story__index,
.story--honest .story__aside {
  color: color-mix(in srgb, var(--background) 52%, transparent);
}

.no-list {
  margin-top: clamp(70px, 10vw, 140px);
  border-top: 1px solid color-mix(in srgb, var(--background) 18%, transparent);
}

.no-list p {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--background) 18%, transparent);
  font-size: clamp(18px, 2.2vw, 31px);
  letter-spacing: -0.03em;
}

.orange-filter {
  display: grid;
  min-height: 100svh;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  padding: clamp(100px, 12vw, 190px) clamp(24px, 8vw, 130px);
}

.orange-filter__fruit {
  width: min(30vw, 400px);
  aspect-ratio: 1;
  border-radius: 48% 52% 49% 51%;
  background: #f26a11;
  box-shadow: inset -25px -30px 60px rgba(126, 36, 0, 0.28), inset 14px 14px 30px rgba(255, 199, 99, 0.24);
}

.orange-filter__copy p:last-child {
  margin: clamp(38px, 5vw, 70px) 0 0;
  color: var(--muted);
  font-size: clamp(22px, 3vw, 45px);
  letter-spacing: -0.035em;
}

.closing {
  display: grid;
  min-height: 110svh;
  place-items: center;
  padding: 120px 24px;
  text-align: center;
}

.closing__copy > p:not(.story__index) {
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 20px);
}

.closing__action {
  display: inline-flex;
  min-width: 220px;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 58px;
  padding: 0 14px 0 26px;
  border-radius: 999px;
  color: var(--background);
  background: var(--tree);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.closing__action[href]:hover { transform: translateY(-4px); }

.closing__action[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
}

.closing__action i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--background) 20%, transparent);
  border-radius: 50%;
  font-style: normal;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 22px;
  padding: 34px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 600 8px/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.13em;
}

.footer p {
  max-width: 760px;
  grid-column: 1 / -1;
  margin: 44px 0 0;
  letter-spacing: 0.03em;
}

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 1000ms cubic-bezier(0.22, 1, 0.36, 1), transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle {
  position: fixed;
  z-index: 5;
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 38px);
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.theme-toggle__track {
  position: relative;
  display: grid;
  width: 64px;
  height: 32px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  color: var(--toggle-muted);
  font: 11px/1 system-ui, sans-serif;
  transition: border-color 600ms ease, color 600ms ease;
}

.theme-toggle__moon,
.theme-toggle__sun {
  position: relative;
  z-index: 2;
  text-align: center;
}

.theme-toggle__moon {
  color: var(--toggle-icon);
  font-size: 9px;
}

.theme-toggle__thumb {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--toggle-thumb);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1), background-color 600ms ease;
}

html[data-theme="light"] .theme-toggle__thumb { transform: translateX(32px); }
html[data-theme="light"] .theme-toggle__moon { color: var(--toggle-muted); }
html[data-theme="light"] .theme-toggle__sun { color: var(--toggle-icon); }

@keyframes reveal-tree {
  to { opacity: 1; transform: translateY(var(--tree-lift)) scale(1); }
}

@keyframes tip-sway {
  from { transform: translateY(0) rotate(var(--sway-from)); }
  to { transform: translateY(-0.8px) rotate(var(--sway-to)); }
}

@keyframes cue-line {
  from { transform: translateX(-100%); }
  55%, to { transform: translateX(250%); }
}

@media (max-width: 640px) {
  .tree { --tree-lift: -7vh; width: 100vw; max-width: none; height: 100svh; }

  .hero__cue { bottom: 15px; }

  .hero-meta {
    top: 20px;
    left: 18px;
    gap: 7px;
    font-size: 7px;
    letter-spacing: 0.14em;
  }

  .hero-meta__row {
    min-height: 27px;
    gap: 10px;
  }

  .hero-meta__row--contract {
    gap: 8px;
  }

  .hero-meta__item {
    gap: 7px;
  }

  .hero-meta__divider {
    height: 13px;
  }

  .hero-meta__copy {
    width: 27px;
    height: 27px;
  }

  .story,
  .how,
  .orange-filter,
  .closing { padding-right: 20px; padding-left: 20px; }

  .story h1 { font-size: clamp(63px, 21vw, 90px); }

  .story h2,
  .how h2,
  .orange-filter h2,
  .closing h2 { font-size: clamp(54px, 16vw, 78px); }

  .how__steps { grid-template-columns: 1fr; }

  .step {
    min-height: 430px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step h3 { margin-top: 270px; }

  .orange-filter {
    grid-template-columns: 1fr;
    gap: 90px;
  }

  .orange-filter__fruit { width: min(60vw, 280px); }

  .footer { grid-template-columns: 1fr; }

  .footer p { grid-column: 1; margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .tree,
  .branch-tip-cluster,
  .hero__cue i::after { opacity: 1; animation: none; transform: none; }

  .reveal { opacity: 1; transform: none; transition: none; }
}
