/* PostPitch landing page. Plain HTML, CSS and JavaScript, no build step (landing/README.md).
   Look: the product brand (brand/README.md) and the Milestone 2 deck.
   - Ground: white. Only the hero lies on dot paper (1 px dots on a 24 px grid, as in the deck, but lighter); the dots
     scroll with the page and fade out slowly below the hero. Surfaces are opaque white sheets with a fine edge and a
     real shadow, so the dots stop at their edge.
   - Type: DM Sans for text, 600 for labels, buttons and card titles; Source Serif 4 at 450 for headlines.
   - Colour: ink #060606 on white, one blue (#5277B1) for focus, the current step and small accents. Ink main button.
     No glow (interface decision of 1 Dec 2026).
   - Corners: 12 px controls and wells, 20 px tiles and windows, 32 px large panels and the floating bar, round buttons. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
}

:root {
  --ink: #060606;
  --ink-soft: #2a2b2e;
  --muted: #575b62;
  --way: #858a93;
  --blue: #5277b1;
  --bg: #ffffff;
  --sheet: #ffffff;
  --well: #f5f6f8;
  --line: rgba(6, 6, 6, 0.08);
  --line-strong: rgba(6, 6, 6, 0.14);
  --dot: rgba(6, 6, 6, 0.1);
  --dots-tail: 480px;  /* how far the dots run on below the hero */
  --dots-fade: 640px;  /* how long the fade to white is, ending at the bottom of the tail */

  --shadow: 0 0 0 1px rgba(6, 6, 6, 0.08), 0 1px 2px rgba(6, 6, 6, 0.06), 0 12px 28px -14px rgba(6, 6, 6, 0.28);
  --shadow-lg: 0 0 0 1px rgba(6, 6, 6, 0.08), 0 2px 4px rgba(6, 6, 6, 0.04), 0 40px 80px -40px rgba(6, 6, 6, 0.36);

  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --r-control: 12px;
  --r-tile: 20px;
  --r-panel: 32px;

  --page: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(96px, 12vw, 168px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  interpolate-size: allow-keywords;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

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

/* ---- type ---- */
.display {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.title {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.016em;
}
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--muted); }
.lead strong { color: var(--ink); font-weight: 600; }

/* ---- buttons: ink main button, white sheet second, round ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  font: 600 16px/1 var(--sans); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-soft); }
.btn-sheet { background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); }
.btn-sheet:hover { box-shadow: 0 0 0 1px rgba(6, 6, 6, 0.14), 0 1px 2px rgba(6, 6, 6, 0.06), 0 16px 32px -16px rgba(6, 6, 6, 0.32); }
.btn-s { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---- logo: one lockup; the word folds away when the bar floats ---- */
.logo { --logo-h: 24px; display: block; height: var(--logo-h); width: calc(var(--logo-h) * 1382 / 251); overflow: hidden; color: var(--ink); transition: width 0.45s var(--ease); }
.logo svg { height: 100%; width: calc(var(--logo-h) * 1382 / 251); max-width: none; }

/* ---- navigation: a row at the top, a floating frosted bar once you scroll (as on the reference) ---- */
.nav {
  position: fixed; inset: 16px 0 auto; z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-inline: 16px; pointer-events: none;
}
.nav-bar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 40px;
  height: 56px; padding: 0 10px 0 22px; border-radius: var(--r-panel);
  background: rgba(255, 255, 255, 0); box-shadow: 0 0 0 1px rgba(6, 6, 6, 0);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), gap 0.45s var(--ease), padding 0.45s var(--ease);
}
.nav-brand { display: flex; align-items: center; border-radius: 8px; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .nav-menu a {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px;
  color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color 0.2s;
}
.nav-links a:hover { background: rgba(6, 6, 6, 0.05); }
.nav-toggle {
  display: none; width: 38px; height: 38px; border: 0; border-radius: 999px; padding: 0;
  background: transparent; color: var(--ink); cursor: pointer; place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .close { display: none; }
.nav-toggle[aria-expanded="true"] .open { display: none; }
.nav-toggle[aria-expanded="true"] .close { display: block; }

.is-scrolled .nav-bar, .nav.is-open .nav-bar {
  gap: 24px; padding-left: 18px;
  background: rgba(255, 255, 255, 0.76);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
}
.is-scrolled .nav .logo { width: calc(var(--logo-h) * 257 / 251); --word: 0; }
.logo-word { opacity: var(--word, 1); transition: opacity 0.3s var(--ease); }

.nav-menu {
  pointer-events: auto;
  width: min(100%, 420px); padding: 8px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.nav-menu[hidden] { display: none; }
.nav-menu a { height: 48px; font-size: 17px; padding: 0 16px; }
.nav-menu a:hover { background: rgba(6, 6, 6, 0.05); }

/* ---- the window: a browser frame for screen recordings ---- */
.window { background: var(--sheet); border-radius: var(--r-tile); box-shadow: var(--shadow-lg); overflow: hidden; }
.window-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line);
}
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e2e4e8; }
.window-address {
  min-width: min(280px, 40vw); padding: 4px 24px; border-radius: 8px; background: var(--well);
  color: var(--muted); font-size: 12.5px; line-height: 1.4; text-align: center;
}

/* ---- the phone: the same sheet, phone-shaped ---- */
.phone {
  width: min(272px, 72%); padding: 9px; border-radius: 46px;
  background: var(--sheet); box-shadow: var(--shadow-lg);
}
.phone .media { --ratio: 9 / 19.5; border-radius: 37px; }

/* ---- media slots: a video or picture from media/ appears on its own; until then a quiet placeholder ---- */
.media { position: relative; aspect-ratio: var(--ratio, 16 / 10); background: var(--well); overflow: hidden; isolation: isolate; }
.media > video, .media > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.media.is-ready > video, .media.is-ready > img { opacity: 1; }
.media-placeholder {
  position: absolute; inset: 0; z-index: -1;
  display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px;
  color: var(--muted); font-size: 13px; line-height: 1.4; text-align: center;
  transition: opacity 0.4s;
}
.media-placeholder::before {
  content: ""; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 50%;
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7.5v9l7.5-4.5z' fill='%23575b62'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: var(--shadow);
}
.media-file { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.media.is-ready .media-placeholder { opacity: 0; }

/* ---- hero ---- */
.hero { position: relative; isolation: isolate; padding-top: clamp(136px, 16vw, 188px); text-align: center; }
/* The hero's dot paper: part of the page, so it scrolls with it. It runs on below the hero and fades to white
   along an eased curve, so there is no visible edge. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 calc(-1 * var(--dots-tail));
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, var(--dot) 1px, transparent 1.5px) 12px 12px / 24px 24px;
  --fade-mask: linear-gradient(to bottom,
    #000 0,
    #000 calc(100% - var(--dots-fade)),
    rgba(0, 0, 0, 0.94) calc(100% - var(--dots-fade) * 0.875),
    rgba(0, 0, 0, 0.8) calc(100% - var(--dots-fade) * 0.75),
    rgba(0, 0, 0, 0.5) calc(100% - var(--dots-fade) * 0.5),
    rgba(0, 0, 0, 0.2) calc(100% - var(--dots-fade) * 0.25),
    rgba(0, 0, 0, 0.06) calc(100% - var(--dots-fade) * 0.125),
    transparent 100%);
  -webkit-mask-image: var(--fade-mask);
  mask-image: var(--fade-mask);
}
.hero-head { display: flex; flex-direction: column; align-items: center; }
.hero-title { max-width: 14em; }
.hero-lead { max-width: 34em; margin-top: 24px; text-wrap: balance; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.hero-stage { margin-top: clamp(56px, 7vw, 88px); perspective: 1800px; }
.hero-stage .window {
  max-width: 1040px; margin-inline: auto;
  transform-origin: 50% 0;
  transform: rotateX(calc(var(--tilt, 0) * 16deg)) scale(calc(1 - var(--tilt, 0) * 0.05));
  will-change: transform;
}

/* ---- sections ---- */
.section { padding-top: var(--section); }
.section-head { max-width: 760px; margin: 0 auto clamp(48px, 6vw, 72px); text-align: center; }
.section-head .lead { margin-top: 16px; }

/* ---- how it works: numbered rings joined by a dashed way, like the app's step bar ---- */
.steps { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.steps-list { list-style: none; margin: 0; padding: 0; }
.steps-list li { position: relative; }
.steps-list li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 58px; bottom: -10px;
  border-left: 2px dashed var(--line-strong);
}
.step-tab {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 20px; align-items: start;
  width: 100%; padding: 14px 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: var(--muted);
}
.step-tab:focus-visible { outline-offset: 4px; border-radius: 12px; }
.ring {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--sheet);
  font-size: 15px; font-weight: 600; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.step-tab.is-done .ring { border-color: var(--ink); color: var(--ink); }
.step-tab[aria-selected="true"] .ring { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-name { display: block; padding-top: 7px; font-size: 19px; font-weight: 600; line-height: 1.4; color: var(--ink); transition: color 0.3s; }
.step-tab:not([aria-selected="true"]) .step-name { color: var(--muted); }
.step-tab:not([aria-selected="true"]):hover .step-name { color: var(--ink); }
.step-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.step-tab[aria-selected="true"] .step-more { grid-template-rows: 1fr; }
.step-more > span { overflow: hidden; }
.step-desc { display: block; padding-top: 6px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.step-progress { display: block; height: 2px; margin-top: 16px; border-radius: 2px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity 0.3s; }
.step-progress::after { content: ""; display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.steps.has-video .step-progress { opacity: 1; }

.steps-panels { display: grid; }
.steps-panels > .media { grid-area: 1 / 1; opacity: 0; transition: opacity 0.5s var(--ease); }
.steps-panels > .media.is-active { opacity: 1; }

/* ---- features: tiles as sheets on the paper ---- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tile {
  display: flex; flex-direction: column; gap: 28px; padding: 32px;
  border-radius: var(--r-tile); background: var(--sheet); box-shadow: var(--shadow);
}
.tile-copy { display: flex; flex-direction: column; gap: 10px; }
.tile-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: var(--r-control);
  background: var(--well); color: var(--ink);
}
.tile-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.tile p { color: var(--muted); }
.tile .media { --ratio: 4 / 3; margin-top: auto; border-radius: var(--r-control); }
.tile-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding: clamp(32px, 4vw, 48px); }
.tile-wide .media { --ratio: 16 / 10; }
.tile-wide .tile-copy { max-width: 400px; }
.tile-visual {
  display: flex; justify-content: center; align-items: flex-start; height: clamp(320px, 34vw, 420px);
  padding-top: 40px; border-radius: var(--r-control); background: var(--well); overflow: hidden;
}
.tile-visual .phone { box-shadow: var(--shadow); }
.tile-visual .phone .media { --ratio: 9 / 19.5; margin-top: 0; border-radius: 37px; }

/* ---- closing call ---- */
.cta {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(64px, 9vw, 112px) var(--gutter); border-radius: var(--r-panel);
  background: var(--sheet); box-shadow: var(--shadow);
}
.cta-mark { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; margin-bottom: 32px; box-shadow: 0 12px 28px -14px rgba(5, 72, 168, 0.55); }
.cta .lead { max-width: 32em; margin-top: 16px; }
.cta .btn { margin-top: 36px; }

/* ---- FAQ: heading left, questions on a sheet right ---- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq-title { position: sticky; top: 120px; }
.faq-list { padding: 8px clamp(24px, 3vw, 36px); border-radius: var(--r-panel); background: var(--sheet); box-shadow: var(--shadow); }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline-offset: 2px; }
.plus { position: relative; flex: none; width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); }
.plus::after { transform: rotate(90deg); }
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }
.faq-answer { padding: 0 40px 28px 0; color: var(--muted); }
.faq-note { margin-top: 24px; padding-inline: clamp(24px, 3vw, 36px); color: var(--muted); font-size: 15px; }
.faq-note a { color: var(--ink); font-weight: 600; text-decoration: none; }
.faq-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- footer: a white band, so the paper ends ---- */
.footer { margin-top: var(--section); background: var(--sheet); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(40px, 8vw, 120px); padding-top: 72px; padding-bottom: 56px; }
.footer-brand .logo { --logo-h: 30px; }
.footer-brand p { max-width: 30em; margin-top: 24px; color: var(--muted); }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-label { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--way); }
.footer-col a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-base { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 24px; padding-bottom: 32px; color: var(--way); font-size: 14px; }
.footer-base::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }

/* ---- motion: only with JavaScript and only if the visitor has not asked for less ---- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(0.3em); animation: word-in 0.9s var(--ease) forwards; animation-delay: calc(var(--i) * 55ms + 80ms); }
  .js .hero-in { opacity: 0; transform: translateY(16px); animation: fade-up 0.9s var(--ease) forwards; animation-delay: var(--d, 0.45s); }
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes word-in { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes fade-up { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-stage .window { transform: none; }
}

/* ---- tablet ---- */
@media (max-width: 960px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps-stage { order: -1; }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq-title { position: static; }
}

/* ---- phone ---- */
@media (max-width: 720px) {
  :root { --dots-tail: 280px; --dots-fade: 440px; }
  body { font-size: 16px; }
  .nav { inset: 12px 0 auto; padding-inline: 12px; }
  .nav-bar { width: 100%; justify-content: space-between; gap: 8px; padding: 0 6px 0 18px; }
  .is-scrolled .nav-bar, .nav.is-open .nav-bar { gap: 8px; padding-left: 16px; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .is-scrolled .nav .logo { width: calc(var(--logo-h) * 1382 / 251); --word: 1; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
  .window-bar { height: 32px; padding: 0 12px; }
  .window-dots i { width: 8px; height: 8px; }
  .window-address { min-width: 0; padding: 2px 16px; font-size: 11px; }
  .bento { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tile, .tile-wide { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
  .tile-wide .tile-copy { max-width: none; }
  .tile-visual { height: 360px; padding-top: 32px; }
  .faq-answer { padding-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding-top: 56px; }
  .footer-brand { grid-column: 1 / -1; }
}
