/* Slicewise launch site. Tokens from docs/site/BRIEF.md (mirrors the app's src/styles.css). */

:root {
  color-scheme: light dark;
  --paper: #fbf6ee;
  --card: #fffdf9;
  --sunk: #f3ebdf;
  --ink: #3b2a20;
  --ink-soft: #6e5a4c;
  --rule: #e3d6c4;
  --rule-strong: #b9a48e;
  --berry: #b0204f;
  --berry-deep: #951a42;
  --berry-ink: #ffffff;
  --berry-soft: #fbe5ec;
  --crumb: #e9b97a;
  --glow: rgb(240 168 120 / 0.24);
  --shadow:
    0 1px 2px rgb(59 42 32 / 0.06), 0 10px 28px -10px rgb(59 42 32 / 0.22);
  --shadow-lift: 0 24px 48px -16px rgb(59 42 32 / 0.32);

  --header-bg: rgb(251 246 238 / 0.85);
  --band-bg: var(--berry);
  --band-ink: var(--berry-ink);

  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1511;
    --card: #281d17;
    --sunk: #17110d;
    --ink: #f4e9dc;
    --ink-soft: #c3b09f;
    --rule: #43332a;
    --rule-strong: #6f5949;
    --berry: #f0729a;
    --berry-deep: #f592b1;
    --berry-ink: #2a0a15;
    --berry-soft: #46202d;
    --crumb: #c8955a;
    --glow: rgb(176 32 79 / 0.18);
    --shadow:
      0 0 0 1px rgb(255 240 225 / 0.03), 0 10px 28px -10px rgb(0 0 0 / 0.65);
    --shadow-lift: 0 24px 48px -16px rgb(0 0 0 / 0.75);

    --header-bg: rgb(29 21 17 / 0.85);
    --band-bg: var(--berry-soft);
    --band-ink: var(--ink);
  }
}

/* Base */

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.num {
  font-variant-numeric: tabular-nums lining-nums;
}

.wrap {
  max-width: calc(72rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

[hidden] {
  display: none !important;
}

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

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Links and buttons */

a {
  color: inherit;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 0.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.text-link:hover {
  color: var(--berry);
  text-decoration-color: currentColor;
}

.text-link:active {
  color: var(--berry-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  min-width: 44px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 180ms var(--ease-out);
}

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

.btn-primary {
  background: var(--berry);
  color: var(--berry-ink);
}

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

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

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.btn-secondary:hover {
  border-color: var(--berry);
  color: var(--berry);
}

.btn-invert {
  min-height: 3.25rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn-invert:hover {
  transform: translateY(-2px);
}

.btn-invert:active {
  transform: translateY(0);
}

.closing .btn-invert:focus-visible {
  outline-color: var(--band-ink);
}

/* Logo */

.mark-tin {
  fill: var(--ink);
}
.mark-sponge {
  fill: var(--crumb);
}
.mark-gap {
  fill: var(--mark-gap, var(--paper));
}
.mark-slice {
  fill: var(--mark-slice, var(--berry));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.brand .mark {
  width: 2rem;
  height: 2rem;
  overflow: visible;
}

.wordmark {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
}

/* 0. Header */

.top-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 4rem;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.js .site-header:not(.is-scrolled) {
  border-bottom-color: transparent;
}

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

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

.nav-extra {
  display: none;
  text-decoration: none;
  color: var(--ink-soft);
  padding-inline: 0.5rem;
}

@media (min-width: 48rem) {
  .nav-extra {
    display: inline-flex;
  }
}

/* 1. Hero */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  background: radial-gradient(
    48rem 30rem at 70% 20%,
    var(--glow),
    transparent
  );
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 34ch;
}

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

.small-print {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.hero-art {
  position: relative;
  width: 80%;
  max-width: 28rem;
  margin-inline: auto;
  aspect-ratio: 1;
  container-type: inline-size;
}

.hero-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plate-shadow {
  fill: var(--ink);
  opacity: 0.08;
}
.plate {
  fill: var(--sunk);
}
.plate-rim {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.5;
}
.cake-tin {
  fill: var(--ink);
}
.cake-sponge {
  fill: var(--crumb);
}
.cake-ring {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.1;
  stroke-width: 2;
}
.cake-gap {
  fill: var(--paper);
}
.leader {
  stroke: var(--ink);
  stroke-width: 1.25;
}
.slice-face {
  fill: var(--crumb);
  stroke: var(--ink);
  stroke-opacity: 0.25;
}
.slice-top {
  fill: var(--berry);
}

.hero-slice {
  transform: translate(36px, -36px);
}

.tag {
  position: absolute;
  background: var(--card);
  color: var(--ink);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lift);
  line-height: 1.1;
}

.tag-cost {
  left: 0;
  top: 4%;
  display: grid;
  padding: 0.6rem 0.9rem 0.55rem;
}

.tag-price {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-weight: 700;
  font-size: max(1.5rem, 9cqi);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

.tag-label {
  font-size: 0.875rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.tag-sell {
  right: -2%;
  bottom: 4%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.tag-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--berry);
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .hero-copy {
    grid-column: 1 / span 6;
  }
  .hero-art {
    grid-column: 7 / span 6;
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slice {
    animation: slice-out 900ms var(--ease-out) both;
  }
  .tag-cost {
    animation: tag-in 300ms var(--ease-out) 1050ms both;
  }
  .tag-sell {
    animation: tag-in 300ms var(--ease-out) 1200ms both;
  }
}

@keyframes slice-out {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(36px, -36px);
  }
}

@keyframes tag-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. The problem */

.problem {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.narrow {
  max-width: calc(40rem + 2 * var(--pad));
  text-align: center;
}

.problem h2 + p {
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

.receipt {
  margin: 2.5rem auto 0;
  max-width: 30rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  text-align: left;
  font-variant-numeric: tabular-nums lining-nums;
}

.receipt-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-block: 0.3rem;
}

.dots {
  flex: 1;
  min-width: 1rem;
  border-bottom: 2px dotted var(--rule-strong);
  transform: translateY(-0.3em);
}

.caption {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Reveal on scroll (only with JS and motion allowed) */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal > * {
    transition:
      opacity 500ms var(--ease-out),
      transform 500ms var(--ease-out);
  }
  .js .reveal:not(.is-in) > * {
    opacity: 0;
    transform: translateY(12px);
  }
  .js .reveal > :nth-child(2) {
    transition-delay: var(--stagger);
  }
  .js .reveal > :nth-child(3) {
    transition-delay: calc(var(--stagger) * 2);
  }
  .js .reveal > :nth-child(4) {
    transition-delay: calc(var(--stagger) * 3);
  }
}

.receipt,
.bento {
  --stagger: 60ms;
}
.steps {
  --stagger: 80ms;
}

/* 3. Tin scaling */

.tin-band {
  background: var(--card);
  border-block: 1px solid var(--rule);
  padding-block: clamp(4rem, 8vw, 7rem);
}

.eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--berry);
  margin-bottom: 0.5rem;
}

.tin-intro {
  max-width: 42rem;
}

.tin-intro p:last-child {
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

.tin-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 3rem;
  grid-template-areas: "visual" "control" "recipe";
}

.tin-visual {
  grid-area: visual;
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
}

.tin-svg {
  display: block;
  width: 100%;
  height: auto;
}

.tin-fill {
  fill: var(--crumb);
  stroke: var(--ink);
  stroke-width: 3;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: transform 180ms var(--ease-out);
}

/* The sponge is a light colour in both themes, so its text stays cocoa. */
.tin-recipe {
  fill: none;
  stroke: #3b2a20;
  stroke-opacity: 0.55;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.tin-label {
  fill: #3b2a20;
  font-weight: 600;
  font-size: 13px;
  text-anchor: middle;
  font-family: var(--font-body);
}

.tin-factor {
  fill: #3b2a20;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-weight: 700;
  font-size: 40px;
  text-anchor: middle;
  font-variant-numeric: tabular-nums lining-nums;
}

.tin-control {
  grid-area: control;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}

.range-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 500;
}

.range-head output {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

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

.recipe-card {
  grid-area: recipe;
  background: var(--paper);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.recipe-card h3 {
  font-size: 1.75rem;
}

.recipe-meta {
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.recipe-table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
}

.recipe-table th,
.recipe-table td {
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.recipe-table thead th {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--sunk);
}

.recipe-table thead th:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
  padding-left: 0.6rem;
}
.recipe-table thead th:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
  padding-right: 0.6rem;
}

.recipe-table tbody th {
  font-weight: 500;
  padding-left: 0.6rem;
}

.recipe-table .num {
  text-align: right;
}

.recipe-table td:last-child {
  padding-right: 0.6rem;
}

.recipe-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.recipe-totals p {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: grid;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.recipe-totals strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.recipe-totals p:last-child strong {
  color: var(--berry);
}

.recipe-note {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .tin-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "visual visual visual visual visual recipe recipe recipe recipe recipe recipe recipe"
      "control control control control control recipe recipe recipe recipe recipe recipe recipe";
    column-gap: 2.5rem;
    align-items: start;
  }
}

/* Range slider (sections 3 and 5) */

.range {
  --pct: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 48px;
  margin: 0.25rem 0;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--berry) var(--pct),
    var(--rule) var(--pct)
  );
}

.range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--rule);
}

.range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--berry);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--berry);
  box-shadow: var(--shadow);
}

.range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--berry);
  box-shadow: var(--shadow);
}

.range:hover::-webkit-slider-thumb {
  background: var(--berry-soft);
}
.range:hover::-moz-range-thumb {
  background: var(--berry-soft);
}
.range:active::-webkit-slider-thumb {
  background: var(--berry);
}
.range:active::-moz-range-thumb {
  background: var(--berry);
}

.range:focus-visible {
  outline: 2px solid var(--berry);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* Cards */

.card {
  background: var(--card);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

/* 4. How it works */

.how {
  padding-block: clamp(5rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem);
}

.how h2 {
  max-width: 30rem;
}

.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
}

.step h3,
.step > p {
  padding-right: 2.5rem;
}

.step h3 {
  font-size: 1.5rem;
}

.step-num {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--berry);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step > p {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}

/* A scrap of the app under each step: three lines, as the screen shows them. */
.step-shot {
  margin-top: auto;
  padding: 0.25rem 1rem;
  border-radius: 0.75rem;
  background: var(--sunk);
  font-size: 0.9375rem;
}

.shot-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
  padding-block: 0.625rem;
}

.shot-row + .shot-row {
  border-top: 1px solid var(--rule);
}

.shot-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

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

.shot-strong {
  font-weight: 600;
}

.shot-pill {
  padding: 0.0625rem 0.625rem;
  border-radius: 999px;
  background: var(--berry-soft);
  color: var(--berry);
  font-weight: 600;
}

.shot-price {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  color: var(--berry);
}

.glyph {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

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

/* 5. Key features */

.features {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(5rem, 9vw, 8rem);
}

.features h2 {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

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

.feature {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

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

@media (min-width: 56rem) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }
  .feature-a,
  .feature-d {
    grid-column: span 7;
  }
  .feature-b,
  .feature-c {
    grid-column: span 5;
  }
  .feature-c {
    grid-row: 2;
    grid-column: 1 / span 5;
  }
  .feature-d {
    grid-row: 2;
    grid-column: 6 / span 7;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature {
    transition: transform 180ms var(--ease-out);
  }
  .js .reveal.is-done > .feature {
    transition: transform 180ms var(--ease-out);
    transition-delay: 0s;
  }
  .feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }
}

.margin-demo {
  margin-top: auto;
  background: var(--sunk);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
}

.sell-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
}

.sell-at {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
  letter-spacing: -0.02em;
}

.sell-at strong {
  font-weight: 700;
  font-size: 1.75em;
  color: var(--berry);
}

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

/* Torn receipt */

.torn {
  --zig: 10px;
  margin-top: auto;
  background: var(--paper);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem 1rem calc(1rem + var(--zig));
  -webkit-mask: conic-gradient(
      from -45deg at bottom,
      #0000,
      #000 1deg 89deg,
      #0000 90deg
    )
    50% / calc(2 * var(--zig)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg)
    50% / calc(2 * var(--zig)) 100%;
}

.torn-caption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding-bottom: 0.4rem;
}

.shop {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  border-top: 1px dashed var(--rule);
  font-size: 0.9375rem;
}

.tick {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
}

.ticked .tick {
  border-color: var(--berry);
  background:
    no-repeat center / 70%
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--berry);
}

.ticked .shop-name,
.ticked .shop-figs {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.shop-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.shop-figs {
  display: grid;
  grid-template-columns: 3.4rem 4rem 3.4rem;
  text-align: right;
  gap: 0.25rem;
}

.shop-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.6rem;
  font-weight: 600;
}

@media (max-width: 26rem) {
  .feature {
    padding: 1.25rem;
  }
  .torn {
    padding-inline: 0.75rem;
  }
  .shop-figs {
    grid-template-columns: 2.9rem 3.6rem 3.1rem;
    font-size: 0.875rem;
  }
  .shop li {
    gap: 0.4rem;
  }
}

/* Too narrow for name and figures side by side: figures drop under the name. */
@media (max-width: 24rem) {
  .shop li {
    flex-wrap: wrap;
    padding-block: 0.4rem;
  }
  .shop-figs {
    flex-basis: 100%;
    justify-content: end;
  }
}

/* Device card */

.device-visual {
  margin-top: auto;
  background: var(--sunk);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.device-visual svg {
  width: 100%;
  max-width: 15rem;
  height: auto;
}

.dv-phone,
.dv-file,
.dv-arrow,
.dv-line {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dv-gap {
  fill: var(--sunk);
}

.file-name {
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: right;
  padding-right: 0.5rem;
}

/* App chips (fixed light and dark tokens regardless of page theme) */

.chips {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.chip {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--chip-rule);
  background: var(--chip-paper);
  color: var(--chip-soft);
}

.chip-light {
  --chip-paper: #fbf6ee;
  --chip-card: #fffdf9;
  --chip-rule: #e3d6c4;
  --chip-soft: #6e5a4c;
  --chip-ink: #3b2a20;
  --chip-berry: #b0204f;
  box-shadow: var(--shadow);
}

.chip-dark {
  --chip-paper: #1d1511;
  --chip-card: #281d17;
  --chip-rule: #43332a;
  --chip-soft: #c3b09f;
  --chip-ink: #f4e9dc;
  --chip-berry: #f0729a;
}

.chip-screen {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 0.8rem 1.4rem;
}

.chip-title {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--chip-ink);
}

.chip-price {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--chip-berry);
}

.chip-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--chip-card);
  border-top: 1px solid var(--chip-rule);
  padding: 0.5rem 0.25rem 0.6rem;
  font-size: 0.875rem;
  line-height: 1.1;
  text-align: center;
}

.chip-tabs span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: max(0.875rem, 0.6em);
  letter-spacing: -0.01em;
}

.chip-tabs .active {
  color: var(--chip-berry);
  font-weight: 600;
}

@media (max-width: 30rem) {
  .chips {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 30rem) {
  .chip-tabs span {
    font-size: 0.875rem;
  }
}

/* 6. Live app */

.live {
  padding-block: clamp(4rem, 8vw, 7rem);
  text-align: center;
}

.live-line {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.live-line strong {
  color: var(--ink);
}

.live-stage {
  display: grid;
  justify-content: center;
  margin-top: 2.5rem;
}

.phone {
  width: 390px;
  max-width: 100%;
  height: 780px;
  border: 10px solid var(--ink);
  border-radius: 2.75rem;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  background: var(--paper);
}

.phone iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: calc(2.75rem - 10px);
  box-shadow: inset 0 0 0 1px var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -1px;
}

.note {
  display: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  max-width: 13rem;
  position: relative;
}

@media (min-width: 64rem) {
  .live-stage {
    grid-template-columns: 1fr 390px 1fr;
    align-items: center;
    gap: 2.5rem;
  }
  .note {
    display: block;
  }
  .note-left {
    justify-self: end;
    text-align: right;
    align-self: end;
    margin-bottom: 2.25rem;
  }
  .note-right {
    justify-self: start;
    text-align: left;
    align-self: start;
    margin-top: 9rem;
  }
  .note::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 2.25rem;
    border-top: 1px solid var(--ink-soft);
  }
  .note-left::after {
    left: calc(100% + 0.25rem);
  }
  .note-right::after {
    right: calc(100% + 0.25rem);
  }
}

.full-screen {
  display: none;
}

@media (max-width: 30rem) {
  .live-stage {
    display: block;
  }
  .phone {
    width: 100%;
    height: 70svh;
    border-width: 6px;
  }
  .phone iframe {
    border-radius: calc(2.75rem - 6px);
  }
  .full-screen {
    display: flex;
    width: 100%;
    margin-top: 1.25rem;
  }
}

/* 7. Closing */

.closing {
  background: var(--band-bg);
  color: var(--band-ink);
  padding-block: clamp(4rem, 8vw, 6.5rem);
  --mark-gap: var(--band-bg);
  --mark-slice: var(--card);
}

.closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.closing-copy {
  max-width: 36rem;
}

.closing-copy p {
  margin-top: 1rem;
  font-size: 1.1875rem;
}

.closing-copy .btn {
  margin-top: 2rem;
}

.closing-mark {
  flex: none;
  width: 10rem;
  height: 10rem;
  overflow: visible;
  transform: rotate(-8deg);
}

@media (max-width: 40rem) {
  .closing-inner {
    justify-content: center;
    text-align: center;
  }
  .closing-mark {
    display: none;
  }
}

/* 8. Footer */

.site-footer {
  padding-block: 2rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
}

.footer-inner .wordmark {
  color: var(--ink);
  font-size: 1.25rem;
  margin-right: auto;
}

@media (max-width: 40rem) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion: final states, no transitions */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
