/* Shop Ledger launch site. Tokens from docs/site/BRIEF.md; the colours are
   the app's so the embedded app and the hero mock read as one product. */

:root {
  color-scheme: light dark;

  --surface: #f4f2ee;
  --surface-raised: #ffffff;
  --surface-sunken: #e9e6df;
  --text: #1f1d1a;
  --text-muted: #625d55;
  --text-faint: #8d877d;
  --border: #e0dcd3;
  --border-strong: #b8b1a6;
  --accent: #c2410c;
  --accent-hover: #a8370a;
  --accent-soft: #fbe6da;
  --accent-text: #ffffff;
  --success: #246b42;
  --success-soft: #dff0e5;
  --warning: #8a5a00;
  --warning-soft: #fbeccb;
  --danger: #b42318;
  --danger-soft: #fde3df;
  --focus: #1d4ed8;

  /* site-only */
  --rule: rgb(31 29 26 / 0.07);
  --paper: #ffffff;
  --ink: #1f1d1a;

  --shadow-sm: 0 1px 2px rgb(31 29 26 / 0.05), 0 1px 1px rgb(31 29 26 / 0.03);
  --shadow-md: 0 2px 6px rgb(31 29 26 / 0.07), 0 8px 24px rgb(31 29 26 / 0.07);
  --shadow-lg: 0 4px 12px rgb(31 29 26 / 0.1), 0 24px 64px rgb(31 29 26 / 0.18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-hero: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 320ms;

  /* The dark bezel of the phone frame, the same in both themes. */
  --bezel: #1a1816;
  --phone-scale: 1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1a1816;
    --surface-raised: #24211e;
    --surface-sunken: #13110f;
    --text: #ece8e1;
    --text-muted: #a8a197;
    --text-faint: #7c766d;
    --border: #37332e;
    --border-strong: #5a544c;
    --accent: #f97316;
    --accent-hover: #fb8a3c;
    --accent-soft: #3d2212;
    --accent-text: #1a1a1a;
    --success: #6fcf97;
    --success-soft: #173524;
    --warning: #f5c04a;
    --warning-soft: #3a2b08;
    --danger: #ff8a7a;
    --danger-soft: #44190f;
    --focus: #93c5fd;
    --rule: rgb(236 232 225 / 0.06);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 2px 6px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 4px 12px rgb(0 0 0 / 0.5), 0 24px 64px rgb(0 0 0 / 0.6);
    --bezel: #0b0a09;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

svg {
  display: block;
}

.step__icon,
.feature__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-muted);
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 639.98px) {
  .wrap {
    padding-inline: 16px;
  }
}

/* Display type: Fraunces 600, soft axis 50, tight tracking. */
.hero__title,
.section__title,
.closing__title,
.trust__title,
.step__number,
.totals__total dd {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.125rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 120ms var(--ease),
    opacity 120ms var(--ease);
}

.btn:hover {
  text-decoration: none;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--surface-sunken);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--text);
  background: var(--surface-sunken);
}

.btn--sm {
  min-height: 32px;
  padding: 0 0.75rem;
  font-size: var(--text-xs);
}

.btn--lg {
  min-height: 48px;
  padding: 0 1.5rem;
  font-size: var(--text-md);
}

/* Mock buttons in the due rows are not links; they do not react. */
span.btn {
  cursor: default;
}

span.btn:hover,
span.btn:active {
  transform: none;
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

/* ------------------------------------------------------------------ */
/* Badges, segmented control, due rows: as the app draws them         */
/* ------------------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem;
  min-height: 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
}

.badge::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
  flex: none;
}

.badge--overdue {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--due-soon {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--ok {
  background: var(--success-soft);
  color: var(--success);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface-sunken);
}

.segmented > * {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease);
}

.segmented > :hover {
  color: var(--text);
}

.segmented > :active {
  transform: scale(0.98);
}

.segmented > [aria-pressed="true"],
.segmented > .is-on {
  background: var(--surface-raised);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.segmented--static > * {
  cursor: default;
}

.segmented--static > :active {
  transform: none;
}

.due-list {
  display: grid;
  gap: 0.75rem;
}

.due-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.due-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--border-strong);
}

.due-row[data-status="overdue"]::before {
  background: var(--danger);
}

.due-row[data-status="due-soon"]::before {
  background: var(--warning);
}

.due-row__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.due-row__title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.due-row__sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.due-row .btn {
  justify-self: end;
}

/* On the phone: title top-left, status top-right, service beneath, the
   number to call across the bottom. */
@media (max-width: 639.98px) {
  .due-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .due-row > :nth-child(2) {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .due-row .badge {
    grid-row: 1;
    grid-column: 2;
    align-self: start;
    justify-self: end;
  }

  .due-row .btn {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

/* ------------------------------------------------------------------ */
/* 1. Header                                                           */
/* ------------------------------------------------------------------ */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 0.5rem;
}

.brand:hover {
  color: var(--text);
}

.brand:hover .logo {
  transform: rotate(-6deg);
}

.brand:active .logo {
  transform: rotate(-6deg) scale(0.96);
}

.logo {
  flex: none;
  transition: transform 160ms var(--ease);
}

.brand__name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header__nav {
  display: flex;
  gap: 1.75rem;
}

.header__nav a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding: 0.375rem 0;
  border-radius: 0.25rem;
}

.header__nav a:hover {
  color: var(--text);
}

.header__nav a:active {
  color: var(--accent);
}

.header__cta {
  min-height: 40px;
  padding: 0 0.875rem;
  font-size: var(--text-sm);
}

@media (max-width: 899.98px) {
  .header__nav {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section {
  padding-block: 96px;
}

.section__title {
  font-size: var(--text-3xl);
  letter-spacing: -0.025em;
  max-width: 24ch;
}

.section__lede {
  margin-top: 0.75rem;
  max-width: 40rem;
  font-size: var(--text-lg);
  color: var(--text-muted);
}

@media (max-width: 639.98px) {
  .section {
    padding-block: 64px;
  }

  .section__title {
    font-size: var(--text-2xl);
    letter-spacing: -0.015em;
  }
}

/* ------------------------------------------------------------------ */
/* 2. Hero                                                             */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}

/* Ruled ledger lines, fading out by 70% of the hero's height. */
.hero::before,
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--rule) 0,
    var(--rule) 1px,
    transparent 1px,
    transparent 2rem
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: start;
}

.hero__copy {
  max-width: 34rem;
}

.kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__title {
  margin-top: 1rem;
  font-size: var(--text-hero);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__sub {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: var(--text-lg);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1rem;
  font-size: var(--text-sm);
  color: var(--text-faint);
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }
}

@media (max-width: 639.98px) {
  .hero {
    padding: 56px 0 48px;
  }

  .hero__title {
    letter-spacing: -0.015em;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

/* The hero visual: an estimate with a Due row peeking out behind it. */
.hero__visual {
  position: relative;
  min-width: 0;
}

.stack {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
  --px: 0px;
  --py: 0px;
}

@media (min-width: 960px) {
  .stack {
    margin-inline: auto 0;
    /* Room for the back card and its shadow under the hero's overflow: hidden. */
    margin-bottom: 56px;
  }
}

.due-list--peek {
  position: absolute;
  right: -28px;
  bottom: -56px;
  width: 100%;
  transform: translate(var(--px), var(--py)) scale(0.8);
  transform-origin: bottom right;
}

/* A 56 px band of the row shows beneath the estimate: the amber rail, the
   car and service, the badge and the phone button, all sitting at the
   card's bottom edge so nothing is seen cut in half. */
.due-list--peek .due-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  padding: 2.25rem 1rem 0.75rem 1.5rem;
  box-shadow: var(--shadow-md);
}

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

.estimate {
  position: relative;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  transform: translate(calc(var(--px) * -0.5), calc(var(--py) * -0.5));
  font-size: var(--text-sm);
}

/* Ink on paper stays the same in the dark theme, so the paper's own
   secondary tones are fixed here rather than taken from the theme. */
.estimate {
  --paper-muted: #625d55;
  --paper-rule: #e0dcd3;
  --paper-band: #f4f2ee;
}

.estimate__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.estimate__shop {
  font-weight: 600;
  font-size: var(--text-md);
}

.estimate__shop-sub {
  color: var(--paper-muted);
}

.estimate__meta {
  text-align: right;
}

.estimate__label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.estimate__parties {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.25rem;
  padding: 1rem 0;
}

.estimate__parties > div {
  display: contents;
}

.estimate__parties dt {
  color: var(--paper-muted);
}

.lines {
  width: 100%;
  border-collapse: collapse;
}

.lines th,
.lines td {
  padding: 0.5rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.lines th {
  background: var(--paper-band);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.lines th:first-child,
.lines td:first-child {
  padding-left: 0.75rem;
}

.lines th:last-child,
.lines td:last-child {
  padding-right: 0.75rem;
}

.lines td {
  border-bottom: 1px solid var(--paper-rule);
}

.lines .num {
  text-align: right;
  white-space: nowrap;
}

/* Rows only fade; transforms on table rows are not reliable. */
.lines tbody tr[data-reveal] {
  transform: none;
}

.totals {
  display: grid;
  justify-content: end;
  grid-template-columns: auto minmax(7rem, auto);
  gap: 0.375rem 1.5rem;
  padding: 1rem 0.75rem 0;
}

.totals > div {
  display: contents;
}

.totals dt {
  color: var(--paper-muted);
  text-align: right;
}

.totals dd {
  text-align: right;
}

.totals__total dt,
.totals__total dd {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ink);
}

.totals__total dt {
  align-self: end;
  color: var(--ink);
  font-weight: 600;
}

.totals__total dd {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
}

.estimate__foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--paper-muted);
}

@media (max-width: 479.98px) {
  .estimate {
    padding: 20px;
  }

  .estimate__head {
    flex-direction: column;
  }

  .estimate__meta {
    text-align: left;
  }

  .estimate__parties {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }

  .estimate__parties dd {
    margin-bottom: 0.5rem;
  }

  /* Two columns: description and amount. */
  .lines th:nth-child(2),
  .lines th:nth-child(3),
  .lines td:nth-child(2),
  .lines td:nth-child(3) {
    display: none;
  }

  .totals {
    grid-template-columns: 1fr auto;
    padding-inline: 0;
  }
}

/* ------------------------------------------------------------------ */
/* 3. How it works                                                     */
/* ------------------------------------------------------------------ */

.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

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

.step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--surface-raised);
}

/* The accent at low opacity reads as a soft number on the card in both
   themes; the soft token alone was invisible on white. */
.step__number {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: var(--text-3xl);
  color: var(--accent);
  opacity: 0.22;
}

.step__icon {
  color: var(--text-muted);
}

.step__title {
  margin-top: 1.25rem;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.2;
}

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

/* ------------------------------------------------------------------ */
/* 4. The Due list                                                     */
/* ------------------------------------------------------------------ */

.split {
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }
}

.split__copy > p {
  margin-top: 1rem;
}

.split__copy > .section__title + p {
  margin-top: 1.25rem;
}

.split__visual {
  min-width: 0;
}

.statuses {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.75rem;
  font-size: var(--text-sm);
}

.statuses > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.statuses dt {
  flex: none;
  min-width: 6rem;
}

.statuses dd {
  color: var(--text-muted);
}

.panel {
  padding: 24px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-md);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.panel__title {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
}

.panel__counts {
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 479.98px) {
  .panel {
    padding: 16px;
  }
}

/* ------------------------------------------------------------------ */
/* 5. Features                                                         */
/* ------------------------------------------------------------------ */

.features {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

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

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

.feature {
  padding: 24px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform 160ms var(--ease),
    opacity var(--duration) var(--ease);
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature__icon {
  color: var(--accent);
}

.feature__title {
  margin-top: 1rem;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.2;
}

.feature p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ */
/* 6. Try it                                                           */
/* ------------------------------------------------------------------ */

.try {
  margin-top: 2.5rem;
}

.try__bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.frame-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: opacity 100ms var(--ease);
}

.frame.is-switching {
  opacity: 0;
}

.frame__titlebar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 0.875rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.frame__dots {
  display: flex;
  gap: 6px;
}

.frame__dots i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border-strong);
}

.frame__address {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.frame__app {
  display: block;
  flex: none;
  width: 100%;
  height: 640px;
  border: 0;
  background: var(--surface);
}

.frame[data-mode="phone"] {
  width: 438px;
  padding: 24px;
  background: var(--bezel);
  border-color: var(--bezel);
  border-radius: 2rem;
}

.frame[data-mode="phone"] .frame__titlebar {
  display: none;
}

.frame[data-mode="phone"] .frame__app {
  width: 390px;
  height: 760px;
  border-radius: 1.25rem;
}

.try__foot {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

@media (max-width: 479.98px) {
  .try__bar {
    display: none;
  }

  /* Only the phone frame, scaled to the viewport on a fixed 390 px box. */
  .frame-stage {
    height: calc(808px * var(--phone-scale));
    justify-content: flex-start;
  }

  .frame,
  .frame[data-mode="desktop"] {
    width: 438px;
    flex: none;
    padding: 24px;
    background: var(--bezel);
    border-color: var(--bezel);
    border-radius: 2rem;
    transform: scale(var(--phone-scale));
    transform-origin: top left;
  }

  .frame .frame__titlebar {
    display: none;
  }

  .frame .frame__app {
    width: 390px;
    height: 760px;
    border-radius: 1.25rem;
  }

  .try__foot .btn {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* 7. Trust band                                                       */
/* ------------------------------------------------------------------ */

.trust {
  padding-block: 64px;
  background: var(--surface-sunken);
}

.trust__grid {
  display: grid;
  gap: 2rem;
}

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

.trust__title {
  font-size: var(--text-xl);
}

.trust p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ */
/* 8. Closing call to action                                           */
/* ------------------------------------------------------------------ */

.closing {
  position: relative;
  padding-block: 128px;
  overflow: hidden;
}

/* The ledger rules again, rising from the bottom. */
.closing::before {
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 70%);
  mask-image: linear-gradient(to top, #000 0%, transparent 70%);
}

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

.closing__title {
  font-size: var(--text-3xl);
  letter-spacing: -0.025em;
}

.closing__inner p:last-child {
  margin-top: 0.75rem;
}

@media (max-width: 639.98px) {
  .closing {
    padding-block: 80px;
  }

  .closing__title {
    font-size: var(--text-2xl);
    letter-spacing: -0.015em;
  }
}

/* ------------------------------------------------------------------ */
/* 9. Footer                                                           */
/* ------------------------------------------------------------------ */

.footer {
  padding-block: 32px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 3rem;
}

.footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer__name {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.footer__tagline {
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  color: var(--text-faint);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.25rem;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__links a:active {
  color: var(--accent);
}

.footer__last {
  margin-top: 1.5rem;
  font-size: var(--text-sm);
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

/* Elements reveal when seen. Only with script running: without it,
   everything is at rest from the first paint. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--duration) var(--ease),
    transform var(--duration) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* The feature card keeps its hover lift once revealed. */
html.js .feature[data-reveal].is-visible:hover {
  transform: translateY(-2px);
}

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

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .logo,
  .feature,
  .frame,
  .segmented > * {
    transition: none;
  }

  .feature:hover,
  .brand:hover .logo,
  .btn:active {
    transform: none;
  }
}
