/* Endpaper launch site. Tokens from docs/site/BRIEF.md, shared with the app. */

:root {
  --paper: #f6f1e7;
  --surface: #fbf8f2;
  --ink: #1a1714;
  --ink-muted: #6b6257;
  --line: #e2d9c8;
  --accent: #b8381a;
  --accent-ink: #ffffff;
  --accent-soft: #f4dccf;
  --plate: #efe6d8;
  --gallery: #1c1916;
  --gallery-ink: #ede6da;
  --shadow-art: 0 1px 2px rgb(40 30 20 / 0.08), 0 18px 40px -22px rgb(40 30 20 / 0.35);
  --shadow-panel: 0 1px 2px rgb(40 30 20 / 0.06), 0 30px 60px -36px rgb(40 30 20 / 0.4);
  --shadow-deep: 0 2px 4px rgb(40 30 20 / 0.08), 0 48px 90px -40px rgb(40 30 20 / 0.55);

  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  --max: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1916;
    --surface: #25211d;
    --ink: #ede6da;
    --ink-muted: #a89e90;
    --line: #3a342d;
    --accent: #f07050;
    --accent-ink: #1c1916;
    --accent-soft: #3d2219;
    --plate: #2b2621;
    --gallery: #12100e;
    --gallery-ink: #ede6da;
    --shadow-art: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 40px -22px rgb(0 0 0 / 0.8);
    --shadow-panel: 0 1px 2px rgb(0 0 0 / 0.4), 0 30px 60px -36px rgb(0 0 0 / 0.85);
    --shadow-deep: 0 2px 4px rgb(0 0 0 / 0.45), 0 48px 90px -40px rgb(0 0 0 / 0.95);
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
}

h1 {
  font-size: clamp(2.75rem, 1.8rem + 4.2vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

p {
  margin: 0;
}

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

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

main:focus {
  outline: none;
}

figure {
  margin: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

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

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
}

.btn--outline {
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
}

.btn--outline:hover {
  background: var(--accent-soft);
}

.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;
}

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

.quiet-link:hover {
  color: var(--accent);
}

/* ---------- 0. Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  border-bottom: 1px solid transparent;
  transition:
    background-color 200ms ease,
    border-color 200ms ease;
}

html:not(.js) .topbar,
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.mark {
  flex: none;
}

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

.topbar__nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.topbar__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 8px;
}

.topbar__nav a:hover {
  color: var(--ink);
}

.topbar .btn {
  margin-left: 0.5rem;
}

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

  .topbar .btn {
    margin-left: auto;
  }
}

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(2.5rem, 6vw, 5rem);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -64px;
  right: 0;
  width: min(70vw, 900px);
  height: min(70vw, 900px);
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--accent) 6%, transparent),
    transparent
  );
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    /* The copy column never moves: the wall's box is fixed, and the copy is
       optically centred against the Grid state, not re-centred per layout. */
    align-items: start;
  }

  .hero__copy {
    padding-top: clamp(4rem, 9vw, 9rem);
  }
}

.hero__sub {
  margin-top: 1.5rem;
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

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

.footnote {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.hero__wallcol {
  transform: translateY(var(--drift, 0px));
  will-change: transform;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.segmented button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--ink);
}

.wall {
  /* Locked to the Grid layout's size (three rows of 4:5 tiles), so re-hanging
     the pieces never changes the wall's box or reflows the page. */
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: clamp(0.875rem, 2vw, 1.5rem);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.piece img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-art);
}

.piece figcaption {
  display: none;
}

.wall[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
}

.wall[data-layout="grid"] .piece {
  min-height: 0;
}

.wall[data-layout="grid"] img {
  height: 100%;
  object-fit: cover;
}

.wall[data-layout="masonry"] {
  columns: 3;
  column-gap: 0.875rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, #000 85%, transparent);
}

.wall[data-layout="masonry"] .piece {
  break-inside: avoid;
  margin-bottom: 0.875rem;
}

.wall[data-layout="masonry"] .piece:last-child {
  margin-bottom: 0;
}

.wall[data-layout="single"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 0.5rem;
}

.wall[data-layout="single"] .piece:first-child {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.wall[data-layout="single"] .piece:first-child figcaption {
  display: grid;
  gap: 0.25rem;
}

.piece__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.2;
}

.piece__meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.wall[data-layout="single"] .piece:not(:first-child) img {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

@media (max-width: 719.98px) {
  .piece--wide-only {
    display: none;
  }

  .segmented {
    display: flex;
  }

  .segmented button {
    flex: 1;
    padding: 0 0.5rem;
  }

  .wall {
    aspect-ratio: 8 / 14;
  }

  .wall[data-layout="grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall[data-layout="masonry"] {
    columns: 2;
  }

  .wall[data-layout="single"] .piece:first-child {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ---------- 2. Strip ---------- */

.strip {
  margin-top: var(--section);
  padding-inline: var(--gutter);
  display: flex;
  justify-content: center;
}

.strip__line {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: calc(28ch + 2 * 32px + 2.5rem);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.strip__line::before,
.strip__line::after {
  content: "";
  flex: none;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

@media (max-width: 599.98px) {
  .strip__line {
    flex-direction: column;
  }
}

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

.how {
  margin-top: var(--section);
}

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

.how__path {
  display: none;
}

.how__draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.how__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  position: relative;
}

@media (min-width: 960px) {
  /* Drawn above the cards, from just right of numeral 1 to just left of
     numeral 3. Centre line = card padding + half the 3rem numeral - half the
     60 px SVG. */
  .how__steps {
    --how-gap: clamp(2rem, 4vw, 3.5rem);
  }

  .how__path {
    --path-start: calc(1.75rem + 2.5rem);
    --path-end: calc((100% - 2 * var(--how-gap)) / 3 - 1.25rem);
    display: block;
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: var(--path-start);
    top: calc(1.75rem + 1.5rem - 30px);
    width: calc(100% - var(--path-start) - var(--path-end));
    height: 60px;
  }

  .how__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--how-gap);
  }

  /* The path passes behind numeral 2 with a small break either side. */
  .card__num {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    padding-inline: 0.5rem;
    margin-inline: -0.5rem;
    background: var(--surface);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  min-width: 0;
}

.card__num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
}

.card p {
  color: var(--ink-muted);
}

.vignette {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8125rem;
}

.upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--ink-muted) 50%, transparent);
  border-radius: 8px;
}

.upload__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: url("art/03.svg") center / cover var(--plate);
}

.upload__name,
.file {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.upload__bar {
  display: block;
  height: 4px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.upload__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
}

.vignette--rows {
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 44px;
  padding: 0 0.75rem 0 6px;
  border-radius: 8px;
  background: var(--paper);
}

.row img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--plate);
}

.row span:first-of-type {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__handle {
  color: var(--ink-muted);
  letter-spacing: -0.2em;
}

.vignette--files {
  display: grid;
  gap: 0.5rem;
}

.file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--paper);
}

.file svg {
  flex: none;
  color: var(--accent);
}

/* ---------- 4. Features ---------- */

.features {
  margin-top: var(--section);
}

.feature {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

.feature__copy p {
  margin-top: 0.75rem;
  max-width: 40ch;
  color: var(--ink-muted);
}

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

  .feature__visual {
    grid-column: 1 / span 7;
    grid-row: 1;
  }

  .feature__copy {
    grid-column: 8 / span 5;
    grid-row: 1;
  }

  .feature--flip .feature__visual {
    grid-column: 6 / span 7;
  }

  .feature--flip .feature__copy {
    grid-column: 1 / span 5;
  }
}

.filter {
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

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

.chips--tags {
  margin-top: 0.5rem;
}

.chip {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

.chip:hover {
  border-color: color-mix(in srgb, var(--ink-muted) 60%, transparent);
}

.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.chip--tag {
  color: var(--ink-muted);
}

.chip--tag::before {
  content: "#";
  margin-right: 0.1em;
  opacity: 0.6;
}

.filter__count {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.minigrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  min-height: 2rem;
}

.plate img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-art);
}

.plate.is-fading {
  opacity: 0;
  transition: opacity 200ms ease;
}

.plate.is-out {
  display: none;
}

.filter__empty {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--ink-muted);
}

@media (max-width: 599.98px) {
  .minigrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.looks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 1.25rem);
}

.look {
  aspect-ratio: 4 / 5;
  padding: clamp(0.35rem, 1vw, 0.6rem);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.look img {
  width: 100%;
  border-radius: 2px;
  background: var(--plate);
}

.look--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: min-content;
  gap: 4px;
}

.look--grid img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.look--masonry {
  columns: 2;
  column-gap: 4px;
}

.look--masonry img {
  margin-bottom: 4px;
}

.look--single {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.look__lines {
  display: grid;
  gap: 4px;
}

.look__lines span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.look__lines span:first-child {
  width: 70%;
  height: 6px;
  background: var(--ink-muted);
  opacity: 0.5;
}

.look__lines span:last-child {
  width: 45%;
}

.look__label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-align: center;
}

/* The always-dark viewer band */

.band {
  --accent: #f07050;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--gallery);
  color: var(--gallery-ink);
}

.band:focus-visible {
  outline-offset: -6px;
}

.band__inner {
  display: grid;
  gap: 2.5rem;
  justify-items: center;
  text-align: center;
}

.band__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(68vh, 36rem);
}

.band__frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  background: #2b2621;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 30px 60px -30px rgb(0 0 0 / 0.9);
  transition: opacity 100ms ease;
}

.band__frame img.is-swapping {
  opacity: 0;
}

.band__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.band__arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgb(237 230 218 / 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--gallery-ink);
  font: inherit;
  font-size: 1.125rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.band__arrow:hover {
  background: rgb(237 230 218 / 0.1);
}

.band__count {
  min-width: 5.5em;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--gallery-ink);
}

.band__copy {
  max-width: 34rem;
}

.band__copy p {
  margin-top: 0.75rem;
  color: rgb(237 230 218 / 0.75);
}

.facts {
  list-style: none;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem 2rem;
}

.facts li {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.facts strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--ink);
}

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

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

/* ---------- 5. Try it ---------- */

.try {
  margin-top: var(--section);
}

.try__lead {
  margin-top: 1rem;
  max-width: 52ch;
  color: var(--ink-muted);
}

.try__open {
  display: flex;
  justify-content: flex-end;
  margin: 1.5rem 0 0.5rem;
}

.browser {
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  transition:
    transform 700ms var(--ease),
    box-shadow 700ms var(--ease);
}

.browser__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 0.875rem;
  border-bottom: 1px solid var(--line);
}

.browser__dots {
  position: absolute;
  left: 0.875rem;
  display: flex;
  gap: 6px;
}

.browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.browser__url {
  padding: 0.15rem 0.9rem;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.browser__view {
  position: relative;
  height: min(78vh, 760px);
}

.browser__poster {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--paper);
}

.browser__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-art);
}

.browser iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transition: opacity 300ms ease;
}

.js .browser iframe:not(.is-loaded) {
  opacity: 0;
}

@media (max-width: 599.98px) {
  .browser__view {
    height: 640px;
  }
}

/* ---------- 6. Ownership ---------- */

.own {
  margin-top: var(--section);
}

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

.own__inner > p {
  margin-top: 1.25rem;
  color: var(--ink-muted);
}

.flow {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.flow__box {
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.9375rem;
}

.flow__box--file {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--accent);
}

.flow__arrow {
  display: flex;
  color: var(--ink-muted);
}

@media (max-width: 599.98px) {
  .flow {
    flex-direction: column;
  }

  .flow__arrow svg {
    transform: rotate(90deg);
  }
}

/* ---------- 7. Closing ---------- */

.closing {
  margin-top: var(--section);
  padding-bottom: var(--section);
}

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

.closing__art {
  width: 220px;
  margin-bottom: 2.5rem;
  transform: rotate(-2deg);
  transition: transform 400ms var(--ease);
}

.closing__art:hover {
  transform: rotate(0deg);
}

.closing__art img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--plate);
  box-shadow: var(--shadow-art);
}

.closing h2 {
  font-size: clamp(2.75rem, 1.8rem + 4.2vw, 5.25rem);
  line-height: 1.02;
}

.closing p {
  margin: 1.25rem 0 2rem;
  color: var(--ink-muted);
}

/* ---------- 8. Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

/* ---------- Motion (only with JS and when motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not([data-reveal="steps"]):not([data-reveal="rise"]) {
    transition:
      opacity 700ms var(--ease),
      transform 700ms var(--ease);
  }

  .js [data-reveal]:not([data-reveal="steps"]):not([data-reveal="rise"]):not(.is-in) {
    opacity: 0;
    transform: translateY(12px);
  }

  .js [data-reveal="rise"]:not(.is-in) {
    transform: translateY(32px);
    box-shadow: var(--shadow-panel);
  }

  .js .how__draw {
    transition: stroke-dashoffset 900ms ease-in-out;
  }

  .js .how__steps:not(.is-in) .how__draw {
    stroke-dashoffset: 1;
  }

  .js .how__steps:not(.is-in) .upload__bar span {
    width: 0;
  }

  .js .how__steps.is-in .upload__bar span {
    animation: fill-bar 1400ms var(--ease) 400ms both;
  }

  .js .how__steps:not(.is-in) .row--lifted {
    transform: translateY(52px);
  }

  .js .how__steps:not(.is-in) .row--dropped {
    transform: translateY(-52px);
  }

  .js .how__steps.is-in .row--lifted {
    animation: lift-swap 1100ms var(--ease) 700ms both;
    position: relative;
    z-index: 1;
  }

  .js .how__steps.is-in .row--dropped {
    animation: drop-swap 1100ms var(--ease) 700ms both;
  }
}

@keyframes fill-bar {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes lift-swap {
  0% {
    transform: translateY(52px);
    box-shadow: none;
  }
  20% {
    transform: translateY(48px) scale(1.02);
    box-shadow: var(--shadow-art);
  }
  80% {
    transform: translateY(0) scale(1.02);
    box-shadow: var(--shadow-art);
  }
  100% {
    transform: none;
    box-shadow: none;
  }
}

@keyframes drop-swap {
  0%,
  20% {
    transform: translateY(-52px);
  }
  80%,
  100% {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    animation-delay: 0ms !important;
  }

  .hero__wallcol {
    transform: none;
  }

  .closing__art {
    transform: none;
  }
}
