/* Shagun launch site. Tokens and rules from docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;
  --paper: #fbf6ec;
  --surface: #fffdf8;
  --sunken: #f3eadb;
  --ink: #2e1a12;
  --ink-soft: #6b4f42;
  --heading: #5c1621;
  --primary: #7a1f2b;
  --primary-hover: #5f1620;
  --on-primary: #ffffff;
  --marigold: #e8a317;
  --stain: #a8461f;
  --leaf: #55602c;
  --line: #e4d6c0;
  --line-strong: #8a7262;
  --warn: #8a4b00;
  --shadow: 0 1px 2px rgb(46 26 18 / 0.06), 0 18px 40px -18px rgb(92 22 33 / 0.28);

  --on-classic: #ffffff;
  --simple-fill: color-mix(in srgb, var(--marigold) 32%, var(--surface));

  --display: "Rozha One", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --rhythm: clamp(5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --p: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1310;
    --surface: #271b16;
    --sunken: #140d0b;
    --ink: #f6ebdd;
    --ink-soft: #cdb8a6;
    --heading: #f8d9b0;
    --primary: #f2b84b;
    --primary-hover: #f7c96f;
    --on-primary: #2a1408;
    --marigold: #f2b84b;
    --stain: #e08a5a;
    --leaf: #a9b46c;
    --line: #3d2c24;
    --line-strong: #8c7464;
    --warn: #f2b84b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 20px 44px -18px rgb(0 0 0 / 0.7);

    --on-classic: var(--on-primary);
    --simple-fill: color-mix(in srgb, var(--marigold) 26%, var(--surface));
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

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

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--heading);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

p {
  max-width: 34em;
}

.num,
.receipt td,
.finish,
.tl-axis {
  font-variant-numeric: tabular-nums;
}

.soft {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9375rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

main > .hero {
  margin-top: clamp(2.5rem, 6vw, 5rem);
}

/* ---------- Links and buttons ---------- */

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

a:focus-visible,
button:focus-visible,
.panel:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

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

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-small {
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: 0.9375rem;
}

.btn-large {
  min-height: 56px;
  padding: 0 2.25rem;
  font-size: 1.125rem;
}

.text-link,
.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.25rem;
  color: var(--primary);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 160ms ease;
}

.text-link:hover,
.text-btn:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

.text-link:active,
.text-btn:active {
  opacity: 0.7;
}

.arrow::after {
  content: "\2192";
  margin-left: 0.4em;
  text-decoration: none;
  display: inline-block;
}

.fine {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-header::after {
  content: "";
  position: absolute;
  left: max(0px, calc((100% - 72rem) / 2 + var(--pad)));
  bottom: -1px;
  width: 48px;
  height: 1px;
  background: var(--marigold);
}

.lockup {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-height: 44px;
  padding-block: 6px;
  color: var(--heading);
  text-decoration: none;
}

.lockup .logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--heading);
  transform: translateY(2px);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 639.98px) {
  .header-how {
    display: none;
  }
}

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

.hero-grid {
  display: grid;
  gap: 3.5rem;
}

h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 30em;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

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

.hero-copy .fine {
  margin-top: 1rem;
}

.comp {
  --mx: 0;
  --my: 0;
  --drift: 0;
  position: relative;
  max-width: 30rem;
  width: 100%;
  margin-inline: auto;
  padding: 0 0.5rem 2rem 1rem;
}

.plane {
  will-change: transform;
}

.plane-back {
  position: absolute;
  top: 0;
  right: 0.5rem;
  width: min(16rem, 74%);
  transform: translate(calc(var(--mx) * 4px), calc(var(--my) * 4px));
}

.plane-mid {
  position: relative;
  z-index: 1;
  margin-top: 8.75rem;
  width: min(21.5rem, 92%);
  transform: translate(calc(var(--mx) * 8px), calc(var(--my) * 8px));
}

.plane-front {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0.75rem;
  transform: translate(calc(var(--mx) * 14px), calc(var(--my) * 14px - var(--drift) * 24px));
}

.slip {
  rotate: -5deg;
  padding: 1rem 1.1rem 6rem;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.8125rem;
}

.slip-title,
.sheet-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.slip ul {
  margin-top: 0.5rem;
}

.slip li,
.sheet-lines li,
.sheet-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.slip li + li {
  border-top: 1px solid var(--line);
}

.slip li {
  padding-block: 0.3rem;
}

.sheet {
  padding: 1.4rem 1.4rem 2rem;
  background: var(--surface);
  border-radius: 4px;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  line-height: 1.5;
}

.sheet-bride {
  margin-top: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
}

.sheet-when {
  color: var(--ink-soft);
}

.sheet-lines {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.sheet-lines li {
  padding-block: 0.2rem;
}

.sheet-lines .more {
  color: var(--ink-soft);
  font-style: italic;
}

.sheet-total {
  align-items: baseline;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--heading);
}

.sheet-total span:first-child {
  font-size: 1.1rem;
}

.sheet-dep {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.sheet-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.25rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.sheet-sign span {
  padding-top: 0.35rem;
  border-top: 1px solid var(--line-strong);
}

.pill {
  rotate: 3deg;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.hero-sprig {
  position: absolute;
  z-index: 0;
  top: 4.4rem;
  left: -2.75rem;
  width: 90px;
  height: 70px;
  overflow: visible;
}

.hero-sprig .sprig-stem,
.steps-vine path,
.vine-path,
.sprig path[pathLength] {
  fill: none;
  stroke: var(--stain);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.leaf,
.vine-leaf {
  fill: var(--leaf);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 3rem;
  }

  h1 {
    font-size: clamp(2.6rem, 1.6rem + 4.6vw, 4.75rem);
  }

  .comp {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .plane-in {
    animation: settle 600ms var(--ease) both;
  }

  .plane-mid .plane-in {
    animation-delay: 120ms;
  }

  .plane-front .plane-in {
    animation-delay: 240ms;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

/* ---------- The call ---------- */

.call-grid {
  display: grid;
  gap: 2.5rem;
}

.call-copy {
  max-width: 36em;
}

.call-copy p {
  margin-top: 1.5rem;
}

.call-quote blockquote {
  padding-left: 1.25rem;
  border-left: 3px solid var(--marigold);
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.2;
  color: var(--heading);
}

.call-quote p {
  margin-top: 1.25rem;
  padding-left: calc(1.25rem + 3px);
}

@media (min-width: 960px) {
  .call-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: 4rem;
  }
}

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

.steps-wrap {
  position: relative;
  margin-top: 3rem;
}

.steps {
  position: relative;
  display: grid;
  gap: 2.5rem;
}

.step-num {
  display: block;
  font-family: var(--display);
  font-size: 4rem;
  line-height: 1;
  color: var(--marigold);
}

.step h3 {
  margin-top: 0.75rem;
}

.step p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.steps-vine {
  display: none;
}

@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .step-num {
    display: inline-block;
    padding-right: 0.75rem;
    background: var(--paper);
  }

  .steps-vine {
    display: block;
    position: absolute;
    top: 0.9rem;
    left: 0;
    width: 100%;
    height: 40px;
  }

  .steps-vine path {
    vector-effect: non-scaling-stroke;
  }
}

/* ---------- The split ---------- */

.split {
  padding-block: clamp(4rem, 9vw, 8rem);
  background: var(--sunken);
}

.split-intro p {
  margin-top: 1.25rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.9375rem;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.swatch {
  width: 1.75rem;
  height: 0.875rem;
  border-radius: 4px;
}

.t-detailed {
  background: var(--primary);
  color: var(--on-primary);
}

.t-classic {
  background: var(--stain);
  color: var(--on-classic);
}

.t-simple {
  background: var(--simple-fill);
  color: var(--ink);
}

.swipe-hint {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.panel {
  --label-w: 80px;
  --finish-w: 4.5rem;
  --tl-pr: 1rem;
  max-width: 64rem;
  margin-top: 1rem;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.tl {
  position: relative;
  min-width: 560px;
  padding: 1rem var(--tl-pr) 1.5rem 0;
}

.tl-axis,
.tl-done {
  position: absolute;
  left: var(--label-w);
  right: calc(var(--finish-w) + var(--tl-pr));
}

.tl-axis {
  top: 0.75rem;
  height: 1.5rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.tl-axis span {
  position: absolute;
  left: calc(var(--at) / 60 * 100%);
  translate: -50% 0;
}

.tl-axis span:first-child {
  translate: 0 0;
}

.tl-axis span:last-child {
  translate: -100% 0;
}

.tl-done {
  top: 2.5rem;
  bottom: 1.25rem;
  pointer-events: none;
}

.tl-done::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -1px;
  width: 2px;
  background: var(--marigold);
}

.tl-done span {
  position: absolute;
  right: 0.5rem;
  bottom: -1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.lane {
  display: grid;
  grid-template-columns: var(--label-w) 1fr var(--finish-w);
  align-items: center;
  min-height: 44px;
}

.lane-bride {
  margin-top: 2.25rem;
}

.lane-label {
  position: sticky;
  left: 0;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 0.6rem 0 1rem;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
}

.track {
  position: relative;
  height: 34px;
}

.lanes {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.lanes .lane + .lane {
  margin-top: 4px;
}

.g {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--start) / 60 * 100%);
  width: calc(var(--len) / 60 * 100% - 4px);
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform-origin: 0 0;
}

.finish {
  padding-left: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.bride-block {
  position: absolute;
  inset: 0 calc(-1 * var(--finish-w) - var(--tl-pr)) 0 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.5rem 0 0.75rem;
  border: 2px solid var(--heading);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.bride-block svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warn {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: none;
  margin: 0.6rem 0 0.5rem var(--label-w);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--warn);
}

.warn svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pile {
  display: none;
}

.summary {
  display: grid;
  gap: 1rem;
  max-width: 64rem;
  margin-top: 2.5rem;
}

.summary li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.fig {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}

.summary span {
  color: var(--ink-soft);
}

.split-close {
  margin-top: 2rem;
}

.deal-again {
  display: block;
  margin-top: 0.75rem;
  border: 0;
  background: none;
  cursor: pointer;
}

@media (min-width: 960px) {
  .panel {
    --label-w: 7.5rem;
    --finish-w: 5rem;
    --tl-pr: 1.5rem;
  }

  .tl {
    padding-top: 1.25rem;
  }

  .lane-label {
    padding-left: 1.5rem;
  }

  .swipe-hint {
    display: none;
  }

  .summary {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 3rem;
  }
}

/* The deal: main.js adds .is-dealing while the guests fly from the pile. */
.panel.is-ready .lane[data-lane="4"] .lane-label,
.panel.is-ready .lane[data-lane="5"] .lane-label,
.panel.is-ready .finish {
  opacity: 0;
}

.panel.is-ready .lane-label,
.panel.is-ready .finish {
  transition: opacity 320ms ease;
}

.panel.is-ready .lane.is-on .lane-label,
.panel.is-ready .lane.is-done .finish {
  opacity: 1;
}

.panel.is-ready .tl-done {
  bottom: 3.25rem;
}

.panel.is-ready .pile {
  display: block;
  position: absolute;
  left: 1rem;
  bottom: 0.75rem;
  margin: 0;
  padding-left: 4.5rem;
  line-height: 34px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: opacity 320ms ease;
}

.panel.is-ready .tl {
  padding-bottom: 3.5rem;
}

.panel.is-dealt .pile {
  opacity: 0;
}

/* ---------- Every line ---------- */

.lines-grid {
  display: grid;
  gap: 3rem;
}

.lines-copy p {
  margin-top: 1.25rem;
}

.receipt-wrap {
  width: 100%;
  max-width: 26rem;
  filter: drop-shadow(0 18px 24px rgb(92 22 33 / 0.14));
}

.receipt {
  width: 100%;
  border-collapse: collapse;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--surface);
  font-size: 0.9375rem;
  --perf: radial-gradient(circle 6px at 50% 0, transparent 97%, #000 100%) 0 0 / 18px 100% repeat-x;
  -webkit-mask: var(--perf);
  mask: var(--perf);
  border-radius: 0 0 4px 4px;
  display: block;
}

.receipt tbody {
  display: table;
  width: 100%;
}

.receipt th,
.receipt td {
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  vertical-align: baseline;
}

.receipt th {
  font-weight: 400;
  text-align: left;
  padding-right: 1rem;
}

.receipt td {
  text-align: right;
  white-space: nowrap;
}

.receipt .r-total th,
.receipt .r-total td {
  padding-top: 0.9rem;
  border-top: 3px double var(--line-strong);
  border-bottom: 0;
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--heading);
}

.receipt .r-sub th,
.receipt .r-sub td {
  border-bottom: 0;
  padding-block: 0.15rem;
  color: var(--ink-soft);
}

.receipt tr:first-child th,
.receipt tr:first-child td {
  padding-top: 1rem;
}

@media (prefers-color-scheme: dark) {
  .receipt-wrap {
    filter: drop-shadow(0 18px 28px rgb(0 0 0 / 0.5));
  }
}

@media (min-width: 960px) {
  .lines-grid {
    grid-template-columns: minmax(0, 1fr) 26rem;
    align-items: start;
    gap: 5rem;
  }
}

/* ---------- What it takes care of ---------- */

.cares-grid {
  display: grid;
  margin-top: 3rem;
}

.cares-grid li {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.cares-grid h3 {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.cares-grid p {
  margin-top: 0.4rem;
  padding-left: calc(20px + 0.6rem);
  color: var(--ink-soft);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.15em;
  fill: none;
  stroke: var(--stain);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cares-major h3 {
  font-size: 1.3rem;
}

.cares-major .icon {
  margin-top: 0.3em;
}

.cares-minor h3 {
  font-size: 1.0625rem;
}

.cares-minor p {
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .cares-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 4.5rem;
  }

  .cares-major li {
    padding-block: 2rem;
  }
}

/* ---------- Live app ---------- */

.live-head {
  text-align: center;
}

.live-head p {
  margin: 1rem auto 0;
}

.frame {
  width: min(100%, 68rem);
  margin: 2.5rem auto 0;
  padding: 0 12px 12px;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.frame-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.dots {
  position: absolute;
  left: 4px;
  display: flex;
  gap: 6px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame-label {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.frame iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
}

.live-foot {
  margin: 1rem auto 0;
  text-align: center;
}

@media (max-width: 959.98px) {
  .dots {
    display: none;
  }
}

@media (min-width: 960px) {
  .frame iframe {
    height: 720px;
  }
}

/* ---------- Close ---------- */

.close {
  padding-top: clamp(2rem, 6vw, 5rem);
}

.close-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.close-bud {
  width: 120px;
  height: 120px;
  color: var(--stain);
  overflow: visible;
}

.close-inner h2 {
  margin-top: 1.5rem;
  max-width: 18em;
}

.close-inner p {
  margin-top: 1rem;
}

.close-inner .btn {
  margin-top: 2rem;
}

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

.site-footer {
  margin-top: var(--rhythm);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding-block: 1.5rem 2rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
}

@media (min-width: 640px) {
  .footer-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }

  .footer-row .text-link:first-of-type {
    margin-left: auto;
  }
}

/* ---------- The vine ---------- */

.vine {
  display: none;
}

@media (min-width: 960px) {
  .wrap {
    padding-inline-start: max(var(--pad), 4.5rem);
  }

  .site-header::after {
    left: calc(max(0px, (100% - 72rem) / 2) + max(var(--pad), 4.5rem));
  }

  .vine.is-built {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 0;
    overflow: visible;
    pointer-events: none;
  }

  svg.sprig {
    display: none;
  }
}

.vine-path {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p));
}

.vine-leaf {
  opacity: clamp(0, (var(--p) - var(--at)) * 40, 1);
}

.sprig {
  display: block;
  width: 64px;
  height: 18px;
  margin-top: 0.75rem;
  overflow: visible;
}

.live-head .sprig,
.close-inner .sprig {
  margin-inline: auto;
}

/* Drawing: elements start undrawn only once main.js marks them, so the page is whole without it. */
.draw path[pathLength] {
  stroke-dasharray: 1;
}

.draw:not(.is-in) path[pathLength] {
  stroke-dashoffset: 1;
}

.draw:not(.is-in) .leaf,
.draw:not(.is-in) .bud-dot {
  opacity: 0;
}

.draw path[pathLength] {
  transition: stroke-dashoffset 1200ms var(--ease);
}

.draw .leaf,
.draw .bud-dot {
  transition: opacity 500ms ease 700ms;
}

.reveal.is-pending {
  opacity: 0;
  translate: 0 12px;
}

.reveal {
  transition:
    opacity 600ms var(--ease),
    translate 600ms var(--ease);
}

.cares-grid.reveal.is-pending {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .vine-path {
    stroke-dashoffset: 0;
  }

  .vine-leaf,
  .reveal.is-pending,
  .draw:not(.is-in) .leaf,
  .draw:not(.is-in) .bud-dot {
    opacity: 1;
  }

  .reveal.is-pending {
    translate: 0 0;
  }

  .draw:not(.is-in) path[pathLength] {
    stroke-dashoffset: 0;
  }

  .plane {
    transform: none;
  }
}
