/* Rowan launch page. Every colour, size and duration is a token here. */
:root {
  color-scheme: light dark;
  --paper: #f5efe4;
  --paper-raised: #fbf8f2;
  --paper-sunk: #ebe3d4;
  --ink: #20211c;
  --ink-muted: #5a5b52;
  --line: #d8cebb;
  --sage: #4f6b55;
  --sage-deep: #3a5240;
  --sage-wash: #e1e8db;
  --on-sage: #fbfaf6;
  --berry: #9a4630;
  --focus: #8a5a1e;
  --shadow-sheet:
    0 1px 2px rgb(60 48 30 / 0.08), 0 12px 32px -8px rgb(60 48 30 / 0.18), 0 40px 80px -24px rgb(60 48 30 / 0.16);
  --header-bg: color-mix(in srgb, var(--paper) 85%, transparent);

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Source Sans 3", "Seravek", "Gill Sans Nova", Calibri, system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-body: 1.0625rem;
  --lh-body: 1.65;
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.8125rem;
  --fs-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2vw, 2.875rem);
  --fs-h2-close: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  --fs-h3: 1.375rem;
  --fs-lede: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --fs-statement: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --fs-sheet: 0.8125rem;
  --fs-sheet-small: 0.6875rem;
  --fs-code: 0.875rem;

  /* Space and size */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  --column: min(72rem, 100% - 2 * var(--gutter));
  --section-gap: clamp(5rem, 3rem + 8vw, 10rem);
  --header-h: 64px;
  --tap: 44px;
  --radius-sheet: 3px;
  --radius-card: 16px;
  --radius-stage: 20px;
  --hero-sheet-w: min(100%, 26rem);
  --stage-sheet-w: min(100%, 30rem, (76svh - 6rem) * 8.5 / 11);
  --sheet-rot: -2.5deg;
  --back-x: 18px;
  --back-y: 10px;
  --focus-w: 3px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 300ms;
  --dur-mid: 500ms;
  --dur-slow: 700ms;
  --dur-sheet: 900ms;
  --dur-stem: 1600ms;
  --dur-sprig-leaf: 420ms;
  --stagger-text: 80ms;
  --stagger-sheet: 70ms;
  --stagger-code: 90ms;
  --stagger-sprig: 130ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191a17;
    --paper-raised: #22241f;
    --paper-sunk: #121310;
    --ink: #ebe5d8;
    --ink-muted: #b1ab9d;
    --line: #3a3c35;
    --sage: #9fbaa3;
    --sage-deep: #bcd2bf;
    --sage-wash: #2b382d;
    --on-sage: #141c16;
    --berry: #e0937a;
    --focus: #e8b56a;
    --shadow-sheet:
      0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.5), 0 40px 80px -24px rgb(0 0 0 / 0.45);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-optical-sizing: auto;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.05;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--sage-deep);
}

a {
  color: var(--sage);
}

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

main:focus {
  outline: none;
}

.wrap {
  width: var(--column);
  margin-inline: auto;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-deep);
}

.lede {
  font-size: var(--fs-lede);
  color: var(--ink-muted);
  max-width: 34rem;
}

.intro {
  color: var(--ink-muted);
  max-width: 38rem;
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
}

main > section + section {
  margin-top: var(--section-gap);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: var(--tap);
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  text-align: center;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--sage);
  color: var(--on-sage);
}

.btn--primary:hover {
  background: var(--sage-deep);
}

.btn--secondary {
  background: var(--paper-raised);
  border-color: var(--line);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--sage-wash);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: var(--tap);
  color: var(--sage);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.text-link:hover {
  color: var(--sage-deep);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.actions--center {
  justify-content: center;
}

/* ---------- 1. Header ---------- */
.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-mid) var(--ease);
}

[data-scrolled] .site-header {
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}

.logo__word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.logo--small .logo__word {
  font-size: 1.125rem;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
}

.site-nav a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 0.75rem;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: var(--fs-small);
  text-decoration: none;
  transition:
    color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.site-nav a:hover,
.footer-links a:hover {
  color: var(--sage-deep);
  background: var(--sage-wash);
}

.btn--header {
  flex-shrink: 0;
}

@media (max-width: 719.98px) {
  .site-nav {
    display: none;
  }

  .btn--header {
    margin-left: auto;
    padding-inline: 1rem;
  }
}

/* ---------- Printed sheet (shared by hero and planner) ---------- */
.sheet {
  position: relative;
  aspect-ratio: 8.5 / 11;
  padding: 8% 8.5% 6%;
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
  color: var(--ink);
  font-size: var(--fs-sheet);
  line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
  .sheet {
    border: 1px solid var(--line);
  }
}

.sheet__head {
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.sheet__home {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sheet__addr,
.sheet__foot {
  font-size: var(--fs-sheet-small);
  color: var(--ink-muted);
}

.sheet__addr {
  margin-top: 0.2rem;
}

.sheet__eyebrow,
.sec__label {
  font-size: var(--fs-sheet-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-deep);
}

.sheet__date {
  margin-bottom: 1rem;
}

.sheet__secs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1.25rem;
  align-content: start;
}

.sec {
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.sec__label {
  margin-bottom: 0.15rem;
}

.sec__gap {
  color: var(--ink-muted);
  font-style: italic;
}

.sheet__foot {
  margin-top: auto;
  padding-top: 1rem;
  text-align: center;
}

/* ---------- 2. Hero ---------- */
.hero {
  overflow: clip;
  padding-block: clamp(2.5rem, 1rem + 4vw, 4rem) 1rem;
}

.hero__grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

.hero__copy {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.facts li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-inline: 0.7rem;
  border-radius: 50%;
  background: var(--sage);
  vertical-align: middle;
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 1rem 2rem;
}

.willow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: min(520px, 125%);
  aspect-ratio: 130 / 160;
  translate: -50% -50%;
  stroke: var(--sage);
  opacity: 0.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.willow__stem {
  stroke-width: 0.42;
  stroke-dasharray: 1;
}

.willow__leaves path {
  stroke-width: 1.25px;
  vector-effect: non-scaling-stroke;
}

.stack {
  position: relative;
  width: var(--hero-sheet-w);
}

.stack .sheet--back {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  translate: var(--back-x) var(--back-y);
  rotate: 1.5deg;
}

.stack .sheet--front {
  rotate: var(--sheet-rot);
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    min-height: min(92svh, 56rem);
  }

  .hero__copy {
    grid-column: 1 / span 6;
  }

  .hero__visual {
    grid-column: 7 / span 6;
  }
}

@media (max-width: 959.98px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero .actions .text-link {
    justify-content: center;
  }

  .hero {
    --hero-sheet-w: calc(100% - 2.5rem);
    --sheet-rot: -1.5deg;
    --back-x: 10px;
    --back-y: 6px;
  }

  .hero__visual {
    max-width: 30rem;
    width: 100%;
    margin-inline: auto;
  }

  .willow {
    height: auto;
    width: 120%;
  }
}

/* Hero entrance: once on load, and only for those who are fine with motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero__in {
    animation: rise-8 var(--dur-slow) var(--ease) both;
    animation-delay: calc(100ms + var(--i) * var(--stagger-text));
  }

  .willow__stem {
    animation: draw var(--dur-stem) var(--ease) both;
  }

  .willow__leaves path {
    animation: fade var(--dur-slow) var(--ease) both;
    animation-delay: calc(var(--dur-stem) * 0.75 + var(--i) * var(--stagger-text));
  }

  .stack .sheet--back {
    animation: rise-back var(--dur-slow) var(--ease) 200ms both;
  }

  .stack .sheet--front {
    animation: settle var(--dur-sheet) var(--ease) 350ms both;
  }

  .stack .sec {
    animation: fade var(--dur-mid) var(--ease) both;
    animation-delay: calc(1250ms + var(--i) * var(--stagger-sheet));
  }
}

@keyframes rise-8 {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise-back {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(24px);
    rotate: 0deg;
  }
}

/* ---------- Shared reveal on view (only once main.js has run) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(var(--rise, 8px));
    transition:
      opacity var(--dur-slow) var(--ease),
      transform var(--dur-slow) var(--ease);
    transition-delay: var(--d, 0ms);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 3. The first visitor ---------- */
.visitor__eyebrow {
  grid-column: 1 / span 3;
  padding-top: 0.6rem;
}

.visitor__body {
  grid-column: 4 / span 9;
  display: grid;
  gap: 1.75rem;
}

.statement {
  font-family: var(--font-display);
  font-size: var(--fs-statement);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 44rem;
  text-wrap: pretty;
}

.visitor__more {
  color: var(--ink-muted);
  max-width: 36rem;
}

@media (max-width: 959.98px) {
  .visitor__eyebrow,
  .visitor__body {
    grid-column: 1 / -1;
  }

  .visitor__eyebrow {
    padding-top: 0;
    margin-bottom: 1.25rem;
  }
}

/* ---------- 4. How it works ---------- */
.how__grid {
  display: grid;
  gap: 1rem;
}

.steps {
  display: grid;
  gap: 1rem;
}

.step__body {
  position: relative;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-muted);
}

.step__body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--sage);
  transform: scaleY(0);
  transform-origin: top;
}

.step__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--line);
}

.step h3 {
  color: inherit;
}

/* The active step: one rule, read from data-step. Without JS every step is active. */
html:not(.js) .step,
.how[data-step="1"] .step[data-n="1"],
.how[data-step="2"] .step[data-n="2"],
.how[data-step="3"] .step[data-n="3"],
.how[data-step="4"] .step[data-n="4"],
.how[data-step="5"] .step[data-n="5"],
.how[data-step="6"] .step[data-n="6"] {
  --step-num: var(--berry);
  --step-ink: var(--ink);
  --step-bar: 1;
}

.step .step__num {
  color: var(--step-num, var(--line));
}

.step .step__body {
  color: var(--step-ink, var(--ink-muted));
}

.step .step__body::before {
  transform: scaleY(var(--step-bar, 0));
}

@media (prefers-reduced-motion: no-preference) {
  .step__num,
  .step__body {
    transition: color var(--dur-mid) var(--ease);
  }

  .step__body::before {
    transition: transform var(--dur-mid) var(--ease);
  }
}

.stage {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: 3rem;
  border-radius: var(--radius-stage);
  background: var(--paper-sunk);
}

.stage__sheet {
  position: relative;
  width: var(--stage-sheet-w);
}

.outline {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  overflow: visible;
  pointer-events: none;
}

.outline rect {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.25;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.stage__caption {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.0625rem;
}

.sec__slot {
  display: grid;
}

.sec__slot > * {
  grid-area: 1 / 1;
}

.sec__empty {
  opacity: 0;
  visibility: hidden;
}

/* Desktop, JS and motion on: the sticky sheet fills in step by step. */
@media (min-width: 960px) {
  .how__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
  }

  .steps {
    grid-column: 1 / span 5;
    gap: 0;
  }

  .step {
    min-height: 60svh;
    display: flex;
    align-items: center;
  }

  .step__body {
    padding-left: 1.5rem;
    max-width: 26rem;
  }

  .strip {
    display: none;
  }

  .how__panel {
    grid-column: 6 / span 7;
    position: sticky;
    top: 12svh;
    margin-block: 10svh;
  }

  .js .how .sec__fill {
    opacity: 0;
    transform: translateY(4px);
  }

  .js .how .sec__empty {
    opacity: 1;
    visibility: visible;
  }

  .how[data-step="1"] .sec:is([data-sec="1"]),
  .how[data-step="2"] .sec:is([data-sec="1"], [data-sec="2"]),
  .how[data-step="3"] .sec:is([data-sec="1"], [data-sec="2"], [data-sec="3"]),
  .how[data-step="4"] .sec:is([data-sec="1"], [data-sec="2"], [data-sec="3"], [data-sec="4"]),
  .how[data-step="5"] .sec:is([data-sec="1"], [data-sec="2"], [data-sec="3"], [data-sec="4"]),
  .how[data-step="6"] .sec {
    --sec-fill: 1;
  }

  .js .how .sec .sec__fill {
    opacity: var(--sec-fill, 0);
    transform: translateY(calc((1 - var(--sec-fill, 0)) * 4px));
  }

  .js .how .sec .sec__empty {
    opacity: calc(1 - var(--sec-fill, 0));
    visibility: visible;
  }

  .js .stage__caption {
    opacity: 0;
  }

  .how[data-step="6"] .stage__caption,
  html:not(.js) .stage__caption {
    opacity: 1;
  }

  .how[data-step="6"] .outline rect,
  html:not(.js) .outline rect {
    stroke-dashoffset: 0;
  }
}

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .js .how .sec__fill,
  .js .how .sec__empty {
    transition:
      opacity var(--dur-mid) var(--ease),
      transform var(--dur-mid) var(--ease);
  }

  .js .stage__caption {
    transition: opacity var(--dur-mid) var(--ease);
  }

  .outline rect {
    transition: stroke-dashoffset var(--dur-sheet) var(--ease);
  }
}

/* Reduced motion: every section is filled from the start. */
@media (min-width: 960px) and (prefers-reduced-motion: reduce) {
  .js .how .sec .sec__fill {
    opacity: 1;
    transform: none;
  }

  .js .how .sec .sec__empty {
    opacity: 0;
    visibility: hidden;
  }
}

/* Phone and tablet: step cards with their own printed slips, then the whole sheet once. */
@media (max-width: 959.98px) {
  .step {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--paper-raised);
  }

  .step__body {
    padding-left: 1rem;
  }

  .strip {
    margin-top: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-top: 1.5px dashed var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .how__panel {
    margin-top: 1.5rem;
  }

  .stage {
    padding: 1.75rem 1rem;
    border-radius: var(--radius-card);
  }

  .stage__sheet {
    width: 100%;
  }

  .outline {
    display: none;
  }
}

/* ---------- 5. What's in it ---------- */
.feature-list {
  display: grid;
  gap: 2.25rem;
}

.feature {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.feature p {
  color: var(--ink-muted);
  max-width: 30rem;
}

.icon {
  stroke: var(--sage);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon path,
.icon circle {
  stroke-dasharray: 1;
}

.icon .icon__dots {
  stroke-dasharray: 0.1 2.6;
}

.icon .icon__soft {
  opacity: 0.45;
}

@media (min-width: 960px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem 3rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .feature .icon :is(path, circle):not(.icon__dots) {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 600ms var(--ease);
    transition-delay: calc(var(--d, 0ms) + 200ms);
  }

  .js .feature.is-in .icon :is(path, circle) {
    stroke-dashoffset: 0;
  }
}

/* ---------- 6. See it ---------- */
.demo__body {
  max-width: 64rem;
  margin-inline: auto;
  display: grid;
  gap: 1.25rem;
}

.demo__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab {
  min-height: var(--tap);
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: 600 var(--fs-small) / 1.2 var(--font-body);
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.tab:hover {
  color: var(--sage-deep);
  border-color: var(--sage);
}

.tab[aria-pressed="true"] {
  background: var(--sage-wash);
  border-color: var(--sage-wash);
  color: var(--sage-deep);
}

.frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sheet);
}

.frame__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: 48px;
  padding-inline: 0.75rem;
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--line);
}

.frame__addr {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.2;
}

.frame__open {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: var(--tap);
  padding-inline: 0.6rem;
  color: var(--sage);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.frame__open:hover {
  text-decoration: underline;
}

.frame__view {
  display: block;
  width: 100%;
  height: min(78svh, 46rem);
  border: 0;
  background: var(--paper);
}

@media (prefers-reduced-motion: no-preference) {
  .frame__view {
    transition: opacity var(--dur-fast) var(--ease);
  }
}

.frame__view.is-loading {
  opacity: 0;
}

.demo__open {
  display: none;
}

@media (max-width: 719.98px) {
  .frame__bar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .frame__addr {
    grid-column: 1;
  }

  .frame__open {
    display: none;
  }

  .frame__view {
    height: 36rem;
  }

  .demo__open {
    display: inline-flex;
    width: 100%;
  }

  .tab {
    padding-inline: 0.9rem;
  }
}

/* ---------- 7. Make it yours ---------- */
.adopt__grid {
  display: grid;
  gap: 2.5rem;
}

.adopt__copy {
  display: grid;
  gap: 1.25rem;
  color: var(--ink-muted);
  max-width: 34rem;
}

.adopt__copy p:first-child {
  color: var(--ink);
}

.code {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.code__caption {
  font-size: var(--fs-eyebrow);
  color: var(--ink-muted);
  font-family: var(--font-code);
}

.code__block {
  overflow-x: auto;
  padding: 1.75rem;
  border-radius: var(--radius-card);
  background: var(--paper-sunk);
  color: var(--ink);
  font: var(--fs-code) / 1.7 var(--font-code);
  tab-size: 2;
}

.code__block .k {
  color: var(--ink-muted);
}

.code__block .p {
  color: color-mix(in srgb, var(--ink-muted) 70%, transparent);
}

.code__block .s {
  color: var(--sage-deep);
  padding-inline: 0.15em;
  margin-inline: -0.15em;
  border-radius: 3px;
  background-image: linear-gradient(var(--sage-wash), var(--sage-wash));
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .js .code .s {
    background-size: 0% 100%;
    transition: background-size var(--dur-slow) var(--ease);
    transition-delay: calc(400ms + var(--i) * var(--stagger-code));
  }

  .js .code.is-in .s {
    background-size: 100% 100%;
  }
}

@media (min-width: 960px) {
  .adopt__grid {
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
    align-items: start;
  }
}

/* ---------- 8. What it leaves out ---------- */
.leaves-out__head {
  grid-column: 1 / span 4;
  display: grid;
  gap: 1rem;
  align-content: start;
  padding-right: 1rem;
}

.plain-list {
  grid-column: 5 / span 8;
}

.plain-list li {
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

.plain-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.plain-list strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 959.98px) {
  .leaves-out__head,
  .plain-list {
    grid-column: 1 / -1;
  }

  .leaves-out__head {
    margin-bottom: 2rem;
  }
}

/* ---------- 9. Closing ---------- */
.closing {
  position: relative;
  overflow: clip;
  padding-block: 7rem;
  background: var(--paper-sunk);
}

.closing__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.closing h2 {
  max-width: 40rem;
  font-size: var(--fs-h2-close);
}

.closing h2 em {
  color: var(--berry);
}

.closing__inner > p {
  max-width: 34rem;
  color: var(--ink-muted);
}

.closing .actions {
  margin-top: 0.75rem;
}

.sprig {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  height: 520px;
  width: auto;
  aspect-ratio: 18 / 19.5;
  stroke: var(--sage);
  stroke-width: 0.04;
  stroke-linejoin: round;
  opacity: 0.12;
  pointer-events: none;
}

.sprig path {
  stroke-dasharray: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js .closing .sprig path {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset var(--dur-sprig-leaf) var(--ease);
    transition-delay: calc(var(--i) * var(--stagger-sprig));
  }

  .js .closing.is-in .sprig path {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 719.98px) {
  .closing {
    padding-block: 4.5rem;
  }

  .closing .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .sprig {
    height: 360px;
    right: -5rem;
    bottom: -3rem;
  }
}

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--paper-sunk);
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__row--small {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

@media (max-width: 719.98px) {
  .site-footer__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .footer-links a {
    width: 100%;
    padding-inline: 0;
  }
}
