/* ==========================================================================
   MarkeMark — product page
   Light-first, auto dark via prefers-color-scheme.
   Blocky uppercase display (Bebas Neue) · italic serif wordmark (Literata) ·
   SF/Inter body.
   ========================================================================== */

/* ------- Design tokens ------- */
:root {
  --bg: #fbfbfd;
  --bg-alt: #ffffff;
  --bg-sunken: #f2f2f4;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --text-faint: #86868b;
  --accent: #475569;
  --accent-hover: #334155;
  --border: #d2d2d7;
  --border-soft: #e8e8ed;
  --cta: #0f172a;
  --cta-hover: #1e293b;
  --cta-ink: #f1f5f9;
  --shadow-lg: 0 30px 80px rgba(20, 20, 40, 0.12), 0 4px 16px rgba(20, 20, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 20, 40, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0b0b0d;
    --bg-sunken: #060608;
    --surface: #141417;
    --text: #f5f5f7;
    --text-dim: #a1a1a6;
    --text-faint: #6e6e73;
    --accent: #cbd5e1;
    --accent-hover: #e2e8f0;
    --border: #2a2a2e;
    --border-soft: #1c1c20;
    --cta: #e2e8f0;
    --cta-hover: #f1f5f9;
    --cta-ink: #0f172a;
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

/* ------- Reset ------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Sticky .nav is 52px; add 20px breathing room so anchored landings don't
     tuck the target section right under the nav bar. */
  scroll-padding-top: 72px;
}

/* Belt-and-suspenders for anchor jumps. scroll-padding-top above handles most
   browsers, but embedded WebViews and a couple of older Firefoxes ignore it on
   the html scroller; per-target scroll-margin-top guarantees the landing is
   correct everywhere — desktop, mobile, and in-app browsers alike. */
.feature-block,
#features,
#faq { scroll-margin-top: 72px; }

html, body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

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

/* ------- Layout shells ------- */
.shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.shell-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

main > section {
  /* Was clamp(96px, 14vw, 200px) — desktop max felt cavernous, especially
     between editor-section and #faq (200+200 = 400px gap). Cap at 112px;
     mobile floor only drops 24px. */
  padding-block: clamp(72px, 8vw, 112px);
}

main > section.hero {
  /* Hero owns one full viewport below the 52px sticky nav. svh handles iOS
     URL-bar collapse without jump. .shell fills this height and lays its
     children out in a column: wordmark cluster vertically centered, the
     "3 killer features" header pinned to the bottom. */
  min-height: 100vh;
  min-height: calc(100svh - 52px);
  display: flex;
  padding-block: clamp(40px, 6vw, 80px);
}

main > section.hero .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* Wordmark + tagline + Download CTA — vertically centered in the available
   space above the section header. The padding-block-end guarantees breathing
   room between the Download button and "3 killer features" even on wide,
   short laptop viewports where the cluster would otherwise nearly fill .shell. */
.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-block-end: clamp(40px, 6vw, 88px);
}

/* The "3 killer features" label + chevron now live inside the hero (pinned
   to the bottom), so #features jumps straight to the first feature block.
   Default section padding now matches the old override; no per-section bump
   needed. Kept the comment as a signpost for the hero→features transition. */

/* No horizontal dividers between sections — the page is a single quiet flow. */

/* ------- Nav ------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-brand.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.88rem;
  color: var(--text-dim);
}

.nav-links a:not(.nav-cta) {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:not(.nav-cta):hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--cta);
  color: var(--cta-ink);
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}

.nav-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-cta:hover {
  background: var(--cta-hover);
  color: var(--cta-ink);
  transform: translateY(-1px);
}

.nav-cta.is-visible:hover { transform: translateY(-1px); }

/* ------- Typography ------- */
h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: -0.01em;
  font-weight: 600;
}

/* The blocky uppercase display */
.display {
  font-family: "Bebas Neue", "SF Compact Display", "Oswald", "Helvetica Neue", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  color: var(--text);
}

.eyebrow {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

p {
  color: var(--text-dim);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-sunken);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
}

kbd {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.82em;
  background: var(--surface);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero-wordmark {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  /* Cap at 5.5rem so on wide laptop landscape (which is short on height)
     the wordmark doesn't eat half the viewport. Phone/tablet still scales
     down to the 3.6rem floor via the vw middle term. */
  font-size: clamp(3.6rem, 9vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 0 clamp(24px, 3vw, 44px);
  text-align: center;
}

.hero-headline {
  /* Same logic as the wordmark — short cap so the full hero cluster
     (wordmark + tagline + CTA + section header) fits comfortably in a
     typical 800px laptop viewport. */
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-align: center;
  margin: 0 auto clamp(48px, 6vw, 80px);
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .hero-headline { white-space: normal; }
}

.hero-headline .accent {
  color: var(--accent);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--cta);
  color: var(--cta-ink);
  padding: 18px 34px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

/* Multi-line variant — "Download for macOS" stacked over the version chip.
   Single-line buttons (e.g. "Read the changelog") use the base look so their
   text reads vertically centered inside the pill. */
.btn-primary.is-stacked {
  flex-direction: column;
  gap: 4px;
  padding: 14px 34px;
  line-height: 1.2;
}

.btn-primary:hover {
  background: var(--cta-hover);
  color: var(--cta-ink);
  transform: translateY(-1px);
}

.btn-primary .version {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--cta-ink) 72%, transparent);
  text-transform: uppercase;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 16px 18px;
}

.btn-secondary::after {
  content: "›";
  font-weight: 400;
  transition: transform 0.15s ease;
}

.btn-secondary:hover::after { transform: translateX(3px); }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 18px);
  margin-top: clamp(36px, 4vw, 56px);
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.hero-badges .dot {
  color: var(--border);
  user-select: none;
}

/* ------- Email capture (Buttondown) ------- */
.email-capture {
  display: block;
  max-width: 480px;
  margin: clamp(28px, 3.5vw, 44px) auto 0;
  text-align: center;
}

.email-capture-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.45;
}

.email-capture-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.email-capture input[type="email"],
.email-capture-name {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.email-capture-name {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}

.email-capture input[type="email"]:focus,
.email-capture-name:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.email-capture input[type="email"]::placeholder,
.email-capture-name::placeholder {
  color: var(--text-faint);
}

.email-capture button[type="submit"] {
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--cta-ink);
  background: var(--cta);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.email-capture button[type="submit"]:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.email-capture-fineprint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

@media (max-width: 460px) {
  .email-capture-row { flex-direction: column; }
}

/* Subtle variant — the hero's "Or get notified" form.
   The emphatic signup lives at the bottom of the page; this one is a quiet
   secondary option so it doesn't compete with the Download CTA. */
.email-capture--subtle {
  max-width: 380px;
  margin-top: clamp(20px, 2.5vw, 32px);
}

.email-capture--subtle .email-capture-label {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.email-capture--subtle input[type="email"],
.email-capture--subtle .email-capture-name {
  padding: 9px 14px;
  font-size: 0.9rem;
  background: transparent;
  border-color: var(--border-soft);
}

.email-capture--subtle input[type="email"]:focus,
.email-capture--subtle .email-capture-name:focus {
  border-color: var(--text-dim);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-dim) 18%, transparent);
}

.email-capture--subtle button[type="submit"] {
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.email-capture--subtle button[type="submit"]:hover {
  color: var(--text);
  background: var(--bg-sunken);
  border-color: var(--text-dim);
  transform: none;
}

/* ==========================================================================
   CASCADE + THREADING RAIL
   Cascade lives at the top of #features. A single vertical rail emerges from
   the middle of the "3 killer features" label, threads behind the three
   numbered dots, and continues down through the three feature blocks as a
   visual spine.
   ========================================================================== */

/* No page rail anymore — a chevron between the Download CTA and the cascade
   carries the visual continuity. The cascade dots themselves form the spine
   of the killer-features section. */
.features-shell {
  position: relative;
}

/* Features chevron — subtle, centered down-arrow that sits between the
   "3 killer features" label and the cascade list, leading the eye into the
   actual feature blocks below. (Previously lived inside the hero card; moved
   so the hero owns one clean viewport on landing.) */
.features-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: clamp(8px, 1.5vw, 20px) auto clamp(24px, 3vw, 40px);
  color: var(--text-faint);
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.2s ease;
  animation: features-chevron-bounce 2.4s cubic-bezier(0.22, 0.6, 0.2, 1) infinite;
}

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

.features-chevron svg {
  display: block;
}

@keyframes features-chevron-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(8px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .features-chevron { animation: none; }
}

/* "3 killer features" section header — label + chevron, pinned at the
   bottom of the hero viewport. Chevron jumps straight to the first feature. */
.features-header {
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 0 clamp(8px, 2vw, 16px);
}

.features-header .cascade-label {
  margin: 0 0 clamp(8px, 1.5vw, 16px);
  text-align: center;
  line-height: 1.0;
}

.features-header .label-text {
  display: inline-block;
  padding: 4px 0;
  background: var(--bg);
  font-family: "Bebas Neue", "SF Compact Display", "Oswald", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
}

/* ==========================================================================
   SCROLL INDICATOR (below hero, points to 3 Killer Features)
   ========================================================================== */

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: clamp(48px, 6vw, 88px) auto 0;
  padding: 16px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  width: max-content;
}

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

.scroll-indicator-label {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scroll-indicator-arrow {
  font-size: 1.6rem;
  line-height: 1;
  animation: scroll-bounce 2.2s cubic-bezier(0.22, 0.6, 0.2, 1) infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(10px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator-arrow { animation: none; }
}

/* ==========================================================================
   QUICK LOOK SCROLL SIMULATOR (feature #1)
   Scroll-position-driven: --ql-progress is set by JS per scroll frame.
   0 = folder placeholder in view; 1 = preview image fully zoomed.
   ========================================================================== */

.ql-simulator {
  --ql-progress: 0;
  position: relative;
  width: 100%;
  /* Match the quick-look.png intrinsic aspect (1285×1600) so object-fit has
     nothing to letterbox. */
  aspect-ratio: 1285 / 1600;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ql-folder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32%;
  max-width: 150px;
  height: auto;
  transform: translate(-50%, -50%) scale(calc(1 - var(--ql-progress) * 0.5));
  transform-origin: center center;
  filter: drop-shadow(0 12px 30px rgba(20, 20, 40, 0.14));
  opacity: clamp(0, calc(1 - var(--ql-progress) * 1.6), 1);
  will-change: transform, opacity;
}

/* Markdown-file icon (replaces the old folder). Always a white card with
   dark text — only the surrounding shadow shifts for dark mode. */
.ql-file .ql-file-card {
  fill: #ffffff;
  stroke: rgba(20, 20, 40, 0.08);
  stroke-width: 0.5;
}
.ql-file .ql-file-text rect { fill: #8a8a8f; }

@media (prefers-color-scheme: dark) {
  .ql-folder.ql-file {
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
  }
}

.ql-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transform: scale(calc(0.14 + var(--ql-progress) * 0.86));
  opacity: clamp(0, calc(var(--ql-progress) * 1.5), 1);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .ql-folder { display: none; }
  .ql-preview { transform: scale(1); opacity: 1; }
}

/* Gentle idle float on the markdown-file icon. Fades out as the user starts
   scrubbing the QL animation (var(--ql-progress) > 0) so the float doesn't
   fight the scale/fade transform. */
.ql-folder.ql-file {
  animation: ql-file-float 5.2s ease-in-out infinite;
  animation-play-state: running;
}
@keyframes ql-file-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -3px; }
}
@media (prefers-reduced-motion: reduce) {
  .ql-folder.ql-file { animation: none; }
}

/* Reveal-on-scroll for static feature images. Off by default; the .is-revealed
   class is added by IntersectionObserver when the image enters the viewport.
   Excludes images inside .ql-simulator (those have their own scroll-driven
   animation). */
.feature-visual > img {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.6, 0.2, 1),
              transform 0.7s cubic-bezier(0.22, 0.6, 0.2, 1);
  will-change: opacity, transform;
}
.feature-visual > img.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle hover lift on those same static images. */
.feature-visual > img.is-revealed {
  transition: opacity 0.7s cubic-bezier(0.22, 0.6, 0.2, 1),
              transform 0.4s cubic-bezier(0.22, 0.6, 0.2, 1),
              filter 0.4s ease;
}
.feature-visual > img.is-revealed:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 18px 38px rgba(20, 20, 40, 0.14));
}

@media (prefers-reduced-motion: reduce) {
  .feature-visual > img {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .feature-visual > img:hover { transform: none; filter: none; }
}

/* ==========================================================================
   FEATURE SECTIONS
   ========================================================================== */

.section-kicker {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}

.section-title {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: clamp(20px, 2.5vw, 32px);
  max-width: 20ch;
}

/* Centered variant — kicker + title centered as a block, title kept narrow
   for ragged uppercase wrap. Used by the editor section, FAQ, tribute,
   colophon, bottom signup, etc. */
.section-title--center {
  text-align: center;
  margin-inline: auto;
}

/* Optional centered eyebrow modifier — pair with .section-title--center
   when a section sets its own text alignment. Currently each section
   (.editor-section, #faq, .tribute, .colophon, .bottom-signup) handles its
   own centering explicitly to avoid surprise cascade. */
.section-kicker--center {
  text-align: center;
}

/* Soft horizontal accent rule used inside a single section to separate two
   related blocks (e.g. editor features → keyboard shortcuts). Quieter than
   a full-width section divider. */
.section-divider {
  width: clamp(40px, 6vw, 64px);
  height: 1px;
  background: var(--border);
  opacity: 0.6;
  margin: clamp(56px, 8vw, 96px) auto clamp(40px, 5vw, 56px);
}

/* Small all-caps label used to introduce a sub-block (e.g. "Keyboard
   shortcuts" inside the editor section). Quieter than a full .section-kicker
   so the parent heading still reads as primary. */
.mini-kicker {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin: 0 0 clamp(20px, 2.5vw, 32px);
}

/* Centered, oversized section heading — used as a full-width divider
   between the hero and the feature blocks. */
.section-title--hero {
  font-size: clamp(3.5rem, 10vw, 7rem);
  max-width: none;
  text-align: center;
  margin: clamp(40px, 6vw, 80px) auto clamp(56px, 7vw, 96px);
  letter-spacing: 0.02em;
}

.section-lead {
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 58ch;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(96px, 12vw, 160px);
}

.feature-block:last-of-type { margin-bottom: 0; }

@media (min-width: 900px) {
  .feature-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
  .feature-block.reverse .feature-copy { order: 2; }
  .feature-block.reverse .feature-visual { order: 1; }
}

.feature-h {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.feature-copy .body {
  font-size: clamp(1.05rem, 1.15vw, 1.18rem);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 48ch;
}

.feature-visual {
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feature-visual[data-placeholder]::after {
  content: attr(data-placeholder);
  font-family: "SF Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* When the visual contains a real screenshot as a DIRECT child, let its
   natural aspect drive the frame and drop the placeholder chrome — the macOS
   capture already carries its own drop shadow in the PNG alpha channel.
   Uses `>` so nested imgs (e.g. inside .ql-simulator) keep their own layout. */
.feature-visual:has(> img) {
  aspect-ratio: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.feature-visual > img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Feature #1 uses the .ql-simulator composition instead of a direct img —
   drop the placeholder chrome here too so the folder/preview float cleanly. */
.feature-visual:has(.ql-simulator) {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Compact grid for secondary features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 48px);
  margin-top: clamp(24px, 3vw, 40px);
}

@media (min-width: 680px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}

.features-grid .item h3 {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.features-grid .item p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-dim);
}

/* Centered variant — used in the editor section so each card reads as a
   self-contained beat under the centered headline. */
.features-grid--center {
  max-width: 1040px;
  margin-inline: auto;
}

.features-grid--center .item {
  text-align: center;
}

.features-grid--center .item h3 {
  margin-bottom: 10px;
}

.features-grid--center .item p {
  max-width: 28ch;
  margin-inline: auto;
}

/* Editor section — centered headline + feature cards. */
.editor-section {
  text-align: center;
}

.editor-section .section-kicker {
  text-align: center;
}

.editor-section .section-title {
  margin-inline: auto;
  text-align: center;
}

/* ==========================================================================
   KEYBOARD SHORTCUTS CHEAT SHEET
   ========================================================================== */

.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: clamp(24px, 3vw, 40px);
  max-width: 640px;
  margin-inline: auto;
}

@media (min-width: 860px) {
  .shortcuts-grid { grid-template-columns: repeat(3, 1fr); }
}

.shortcut {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.shortcut .keys {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}

.shortcut .keys kbd {
  font-size: 0.78rem;
  padding: 3px 8px;
}

.shortcut-label {
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ==========================================================================
   CHANGELOG TEASER + STANDALONE CHANGELOG PAGE
   ========================================================================== */

.changelog-entry {
  padding: 0;
  max-width: 720px;
}

.changelog-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.changelog-version {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.changelog-build {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
}

.changelog-date {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-faint);
  margin-left: auto;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.changelog-entry ul {
  list-style: none;
  padding: 0;
}

.changelog-entry li {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.55;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}

.changelog-entry li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.changelog-link {
  margin-top: 28px;
  font-size: 0.95rem;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

/* Tighten the gap between editor-section and the FAQ heading so that when
   the FAQ link in the nav is clicked, the "Questions / FAQ" title lands in
   the upper third of the viewport (centered-ish) instead of being shoved
   well below the fold by 100+px of section padding. Bottom padding stays at
   the section default — only the top is trimmed. */
#faq { padding-top: clamp(48px, 5vw, 72px); }

#faq .section-kicker,
#faq .section-title {
  text-align: center;
  margin-inline: auto;
}

#faq .section-title {
  margin-bottom: clamp(36px, 4vw, 56px);
}

details {
  border-top: 1px solid var(--border-soft);
}

details:last-of-type {
  border-bottom: 1px solid var(--border-soft);
}

summary {
  padding: 22px 0;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.15s ease;
}

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

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-family: "SF Mono", monospace;
  font-size: 1.1rem;
  color: var(--text-faint);
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

details[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 24px;
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 64ch;
}

.faq-answer p { margin-bottom: 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ol, .faq-answer ul { margin: 8px 0; padding-left: 22px; }
.faq-answer li { margin-bottom: 4px; }
.faq-answer strong { color: var(--text); font-weight: 600; }

/* ==========================================================================
   COLOPHON (merged: one person + built with Claude Code)
   ========================================================================== */

.colophon {
  text-align: center;
}

.colophon .section-title {
  margin-inline: auto;
  margin-bottom: clamp(24px, 3vw, 36px);
  /* Override the default 20ch cap so the hard <br> isn't fighting an
     auto-wrap at narrow widths — we want exactly two lines, every size. */
  max-width: none;
}

.colophon-lead {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.05rem, 1.25vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 auto 16px;
}

.colophon-lead a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}

.colophon-lead a:hover { border-bottom-color: var(--accent); }

.colophon-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 24px;
  margin-top: clamp(24px, 3vw, 36px);
}

.br-desktop { display: none; }
@media (min-width: 700px) { .br-desktop { display: inline; } }

/* ==========================================================================
   BUILT WITH CLAUDE CODE — legacy narrative (unused after colophon merge)
   ========================================================================== */

.built-section {
  text-align: center;
}

.built-section .section-title {
  margin-inline: auto;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.built-lead {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 auto 18px;
  text-align: left;
}

.built-lead code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.86em;
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}

.built-lead a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}

.built-lead a:hover { border-bottom-color: var(--accent); }

.built-cta {
  text-align: center;
  margin-top: clamp(24px, 3vw, 36px);
}

/* ==========================================================================
   TRIBUTE — love letter section
   ========================================================================== */

.tribute {
  text-align: center;
  background: var(--bg-alt);
}

.tribute .section-title {
  margin-inline: auto;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.tribute-lead {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 auto 18px;
}

.tribute-lead em {
  color: var(--text);
  font-style: italic;
}

.tribute-lead a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}

.tribute-lead a:hover {
  border-bottom-color: var(--accent);
}

.tribute-sig {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  color: var(--text-faint);
  margin-top: clamp(28px, 3vw, 40px);
}

.tribute-sig em {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-style: normal;
  color: var(--accent);
  padding: 0 2px;
}

.tribute-sig .sig-dash {
  color: var(--border);
  margin-right: 4px;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact {
  text-align: center;
  background: var(--bg-alt);
}

@media (prefers-color-scheme: dark) {
  .contact { background: var(--bg-alt); }
}

.contact .section-title,
.contact .section-lead {
  margin-inline: auto;
}

.contact .section-lead {
  margin-bottom: 40px;
}

/* ==========================================================================
   MID-PAGE CTA (between Features and "Also a real editor")
   ========================================================================== */

.mid-cta {
  text-align: center;
  background: var(--bg-sunken);
  border-block: 1px solid var(--border-soft);
}

.mid-cta-lead {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 clamp(24px, 3vw, 36px);
}

.mid-cta-foot {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   BOTTOM SIGNUP (second email capture, before footer)
   ========================================================================== */

.bottom-signup {
  text-align: center;
  background: var(--bg-alt);
}

.bottom-signup .section-title,
.bottom-signup .section-lead {
  margin-inline: auto;
}

.bottom-signup .section-lead {
  margin-bottom: 32px;
}

.email-capture--bottom {
  max-width: 440px;
}

.bottom-signup-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  margin-top: clamp(24px, 3vw, 36px);
}

/* Visually-hidden utility (accessible labels) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer, .page-footer {
  padding-block: 56px 72px;
  font-size: 0.85rem;
  color: var(--text-faint);
  text-align: center;
  border-top: 1px solid var(--border-soft);
}

.footer-links {
  margin-bottom: 14px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-sep { color: var(--border); user-select: none; }

.built-with, .author { color: var(--text-faint); margin-bottom: 4px; }
.built-with a, .author a { color: var(--text-dim); }
.built-with a:hover, .author a:hover { color: var(--text); }

/* ==========================================================================
   STANDALONE PAGES — page head, changelog page, resources page
   ========================================================================== */

.page-head {
  padding-block: clamp(72px, 9vw, 120px) clamp(36px, 5vw, 64px);
}

.back-link {
  display: inline-block;
  font-size: 0.92rem;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: clamp(32px, 4vw, 48px);
  transition: color 0.15s ease;
}

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

.page-title {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: clamp(14px, 1.5vw, 20px);
}

.page-subtitle {
  font-size: clamp(1.1rem, 1.25vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 56ch;
}

/* Changelog page */
.changelog-story {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 16px;
  max-width: 72ch;
}

.changelog-story + .changelog-story { margin-top: -4px; }

.changelog-page .changelog-entry {
  margin-bottom: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border-soft);
}

.changelog-page .changelog-entry:last-of-type { border-bottom: none; }

.engineering-note {
  margin-top: 18px;
  padding: clamp(18px, 2vw, 24px);
  background: var(--bg-sunken);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 0.94rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 78ch;
}

.engineering-note strong {
  color: var(--text);
  font-weight: 600;
}

.engineering-note code {
  background: var(--surface);
}

/* Resources page */
.resources-section {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.resources-section:last-of-type { margin-bottom: 0; }

.resources-section h2 {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: clamp(18px, 2vw, 24px);
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.5vw, 16px);
}

@media (min-width: 640px) { .resources-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .resources-grid { grid-template-columns: repeat(3, 1fr); } }

.resource-card {
  display: block;
  padding: clamp(18px, 2vw, 22px);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.resource-card:hover {
  background: var(--bg-alt);
  border-color: var(--border);
  transform: translateY(-1px);
}

.resource-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   ARTICLE PAGE (how-it-was-built)
   ========================================================================== */

.article-page .prose {
  padding-block: clamp(8px, 1.5vw, 24px) clamp(80px, 8vw, 120px);
  max-width: 64ch;
}

.article-page .prose p,
.article-page .prose ul {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
  line-height: 1.72;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.article-page .prose .lede {
  font-size: clamp(1.2rem, 1.45vw, 1.38rem);
  color: var(--text);
  margin-bottom: 36px;
}

.article-page .prose h2 {
  font-family: "Bebas Neue", "SF Compact Display", sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: clamp(44px, 5vw, 64px);
  margin-bottom: clamp(14px, 1.5vw, 20px);
}

.article-page .prose strong {
  color: var(--text);
  font-weight: 600;
}

.article-page .prose em {
  color: var(--text);
  font-style: italic;
}

.article-page .prose code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.86em;
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}

.article-page .prose a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
  text-decoration: none;
}

.article-page .prose a:hover { border-bottom-color: var(--accent); }

.article-page .prose ul {
  padding-left: 24px;
}

.article-page .prose ul li {
  margin-bottom: 10px;
}

.article-page .prose ul li:last-child { margin-bottom: 0; }

.article-page .prose .signoff {
  font-family: "Literata", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  color: var(--text-faint);
  margin-top: clamp(40px, 5vw, 60px);
}

/* ==========================================================================
   RESPONSIVE POLISH
   ========================================================================== */

/* Tablet — feature blocks stack at 900px. Tighten section padding and
   feature-block layout; the cascade keeps its single layout at all widths. */
@media (max-width: 899px) {
  main > section { padding-block: clamp(72px, 12vw, 140px); }

  .feature-block { gap: clamp(20px, 4vw, 36px); }
  .feature-h { font-size: clamp(1.6rem, 5.5vw, 2.4rem); }
  .feature-copy { text-align: center; max-width: 56ch; margin-inline: auto; }
  .feature-copy .body { margin-inline: auto; }
  .feature-copy .eyebrow { display: block; }

  /* Restack reverse blocks normally on mobile (visual on top, copy below). */
  .feature-block.reverse .feature-copy { order: 1; }
  .feature-block.reverse .feature-visual { order: 2; }
}

@media (max-width: 600px) {
  .nav-links .hide-mobile { display: none; }
  .hero-headline { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .hero-badges { font-size: 0.82rem; letter-spacing: 0.16em; gap: 8px; }
  .changelog-header { flex-wrap: wrap; }
  .changelog-date { margin-left: 0; width: 100%; }

  .features-grid--center .item p { max-width: 32ch; }

  .shortcuts-grid { gap: 8px; }
  .shortcut { padding: 8px 10px; gap: 8px; }

  /* Embedded WebViews (Telegram, Twitter, Slack, LinkedIn) underrender
     backdrop-filter and ignore color-mix transparency, leaving the nav
     looking streaky. Solid fill renders consistently everywhere. */
  .nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Very narrow — keep the keyboard chips legible. */
@media (max-width: 380px) {
  .hero-wordmark { font-size: clamp(3.4rem, 16vw, 5rem); }
  .btn-primary { padding: 14px 22px; font-size: 0.95rem; }
  .btn-primary.is-stacked { padding: 12px 24px; gap: 3px; }
  .btn-primary .version { font-size: 0.66rem; }
  .shortcut .keys kbd { font-size: 0.74rem; padding: 2px 6px; }
}
