:root {
  --blush: #fbe3e8;
  --blush-deep: #f6cdd6;
  --paper: #fffdf8;
  --ink: #1e1a17;
  --ink-soft: #5e554d;
  --postmark: #a3242e;
  --brass: #d9a441;
  --strip: rgba(255, 253, 248, 0.55);

  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.875rem;
  --step-3: clamp(2.25rem, 4vw + 1rem, 3.5rem);
  --step-4: clamp(2.75rem, 6vw + 1rem, 5.25rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--blush);
  /* faint grid, like the album paper in the app */
  background-image:
    linear-gradient(rgba(163, 36, 46, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 36, 46, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--postmark); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--postmark); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* ---------- header ---------- */
.site-head {
  padding-block: 1.25rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.75rem; }
.brand img { width: 40px; height: 40px; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; font-size: var(--step--1); }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--postmark); }
@media (max-width: 560px) { .site-nav .hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  background: var(--ink); color: var(--paper);
  border-radius: 999px; text-decoration: none; font-weight: 600;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--postmark); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--small { padding: 0.5rem 1rem; font-size: var(--step--1); }
.site-nav .btn { color: var(--paper); }

/* ---------- perforated stamp ---------- */
.stamp {
  --hole: 9px;
  --pitch: 22px;
  background: var(--paper);
  padding: calc(var(--hole) + 6px);
  -webkit-mask:
    radial-gradient(var(--hole) at var(--hole) var(--hole), #0000 97%, #000)
      calc(var(--hole) * -1) calc(var(--hole) * -1) / var(--pitch) var(--pitch) round,
    linear-gradient(#000 0 0) content-box;
          mask:
    radial-gradient(var(--hole) at var(--hole) var(--hole), #0000 97%, #000)
      calc(var(--hole) * -1) calc(var(--hole) * -1) / var(--pitch) var(--pitch) round,
    linear-gradient(#000 0 0) content-box;
}
.stamp-shadow { filter: drop-shadow(0 18px 28px rgba(120, 30, 50, 0.18)) drop-shadow(0 2px 3px rgba(60, 20, 20, 0.12)); }

/* ---------- hero ---------- */
.hero { overflow-x: clip; padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--step-4); max-width: 11ch; }
.hero .lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 30ch; margin: 1.5rem 0 2rem; }
.hero .meta { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-soft); }

.hero-stamp { position: relative; justify-self: center; width: min(100%, 360px); }
.hero-stamp .stamp { transform: rotate(3deg); }
.hero-stamp .photo { aspect-ratio: 33 / 40; object-fit: cover; width: 100%; }
.hero-stamp .caption { padding: 0.75rem 0.25rem 0.25rem; font-family: var(--sans); }
.hero-stamp .caption strong { display: block; font-variant-numeric: tabular-nums; font-size: 1.05rem; letter-spacing: 0.02em; }
.hero-stamp .caption span { font-size: 0.8rem; color: var(--ink-soft); }

.postmark {
  position: absolute; right: -14%; bottom: 4%;
  width: 52%; color: var(--postmark);
  transform: rotate(-14deg);
  mix-blend-mode: multiply;
  opacity: 0.9;
  animation: ink 0.5s cubic-bezier(.2, .9, .3, 1.25) 0.7s both;
}
@keyframes ink {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.7); }
  60% { opacity: 0.95; }
  100% { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .postmark { animation: none; } }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stamp { width: min(78%, 320px); margin-top: 1rem; }
}

/* ---------- section scaffolding ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section h2 { font-size: var(--step-3); max-width: 16ch; }
.section .intro { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; max-width: 36ch; margin: 1rem 0 0; }

/* ---------- how it works (a real sequence) ---------- */
.steps { list-style: none; padding: 0; margin: clamp(2.5rem, 5vw, 4rem) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: step; }
.steps li { counter-increment: step; }
.steps figure { margin: 0 0 1.25rem; }
.steps img { border-radius: 22px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 20px 40px -18px rgba(120, 30, 50, 0.35); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 100%; width: 100%; height: auto; }
.steps h3 { font-size: var(--step-2); display: flex; align-items: baseline; gap: 0.6rem; }
.steps h3::before {
  content: counter(step);
  font-family: var(--serif); font-style: italic; color: var(--postmark);
  font-size: 0.8em;
}
.steps p { margin: 0.5rem 0 0; color: var(--ink-soft); max-width: 34ch; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 38% 1fr; gap: 1.25rem; align-items: center; }
  .steps figure { margin: 0; }
}

/* ---------- stockbook (features) ---------- */
.stockbook-section { background: var(--paper); border-block: 1px solid rgba(163, 36, 46, 0.12); }
.stockbook-section .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.stockbook-section .shot { margin-top: 2.5rem; max-width: 300px; height: auto; border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(120, 30, 50, 0.35); }
.stockbook { list-style: none; padding: 0; margin: 0; }
.stockbook > li {
  position: relative;
  padding: 1.4rem 0 1.4rem 4.25rem;
  border-bottom: 1px solid rgba(30, 26, 23, 0.1);
}
.stockbook > li:first-child { border-top: 1px solid rgba(30, 26, 23, 0.1); }
.stockbook .glyph {
  position: absolute; left: 0; top: 1.4rem;
  width: 2.75rem; height: 3.1rem;
  display: grid; place-items: center;
  color: var(--postmark);
  background: var(--blush);
  --hole: 4px; --pitch: 10px;
  padding: 6px;
}
.stockbook .glyph svg { width: 22px; height: 22px; }
.stockbook h3 { font-size: var(--step-1); font-family: var(--serif); font-weight: 600; }
.stockbook p { margin: 0.3rem 0 0; color: var(--ink-soft); max-width: 52ch; }
@media (max-width: 820px) {
  .stockbook-section .wrap { grid-template-columns: 1fr; }
  .stockbook-section .shot { display: none; }
}

/* ---------- frames ---------- */
.frames { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.frames li { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: var(--step--1); color: var(--ink-soft); }
.frame-swatch { width: 64px; height: 80px; --hole: 4px; --pitch: 10px; padding: 8px; }
.frame-swatch i { display: block; width: 100%; height: 100%; }
.f-minimal { background: #fff; } .f-minimal i { background: #fff; outline: 1px solid #e7e1d6; }
.f-classic { background: #f4f1ea; } .f-classic i { background: #fff; outline: 2px solid #ddd5c7; }
.f-royal { background: #fff9e6; } .f-royal i { background: #fffdf3; outline: 2px solid var(--brass); }
.f-cyber { background: #15151b; } .f-cyber i { background: #15151b; outline: 2px solid #2fd6c2; }
.f-airmail { background: repeating-linear-gradient(135deg, #c8323c 0 7px, #fff 7px 14px, #2c5fb8 14px 21px, #fff 21px 28px); }
.f-airmail i { background: #fff; }

/* ---------- privacy promise ---------- */
.promise .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.promise .seal { width: clamp(120px, 18vw, 180px); color: var(--postmark); transform: rotate(-8deg); }
.promise p { max-width: 54ch; color: var(--ink-soft); }
.promise ul { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); max-width: 54ch; }
.promise li + li { margin-top: 0.35rem; }
@media (max-width: 640px) { .promise .wrap { grid-template-columns: 1fr; } }

/* ---------- final call ---------- */
.final { text-align: center; padding-bottom: clamp(4rem, 10vw, 8rem); }
.final img { width: 120px; margin: 0 auto 1.5rem; transform: rotate(-6deg); }
.final h2 { margin-inline: auto; }
.final p { color: var(--ink-soft); margin: 1rem auto 2rem; max-width: 36ch; }

/* ---------- footer ---------- */
.site-foot {
  background: var(--ink); color: #d8cfc4;
  padding-block: 2.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  font-size: var(--step--1);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-foot a { color: #fff5ea; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .brand { color: #fff5ea; font-size: 1.4rem; }
.site-foot .brand img { width: 32px; height: 32px; }

/* ---------- legal documents ---------- */
.doc { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(4rem, 9vw, 6rem); }
.doc article {
  max-width: 44rem; margin-inline: auto;
  background: var(--paper);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(120, 30, 50, 0.3);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.65;
}
.doc h1 { font-size: var(--step-3); }
.doc .effective { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-soft); margin: 0.75rem 0 2rem; }
.doc h2 { font-size: var(--step-1); font-weight: 600; margin: 2.25rem 0 0.5rem; line-height: 1.25; }
.doc p, .doc li { color: #2d2722; }
.doc ul { padding-left: 1.25rem; }
.doc li + li { margin-top: 0.4rem; }
.doc .summary {
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.55;
  background: var(--blush); border-left: 3px solid var(--postmark);
  padding: 1rem 1.25rem; margin: 0 0 1.5rem;
}
.doc .summary p { margin: 0; }
.doc .summary ul { margin: 0.5rem 0 0; }
.doc table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.95rem; line-height: 1.45; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid rgba(30, 26, 23, 0.12); }
.doc th { font-weight: 600; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
.table-scroll table { min-width: 34rem; }
.frames .frame-swatch { filter: drop-shadow(0 1px 1.5px rgba(60, 20, 20, 0.35)); }
.frames { justify-content: flex-start; }
