/* Clipka — monochrome design system (design spec §3–6). Black, white, greys only. */

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-sunken: #F2F2F2;
  --media-ph: #EBEBEB;
  --border: #E4E4E4;
  --border-strong: #CFCFCF;
  --ink: #0D0D0D;
  --ink-2: #4A4A4A;
  --ink-3: #6E6E6E;
  --ink-mute: #9A9A9A; /* decorative only — never text */
  --inv-bg: #0D0D0D;
  --inv-ink: #FFFFFF;
  --inv-ink-2: #B8B8B8;
  --inv-ink-3: #8A8A8A;
  --inv-border: #2A2A2A;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border-strong); }
a:hover { color: var(--ink-2); border-bottom-color: var(--ink); }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container { max-width: 1200px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 64px); }
.container-narrow { max-width: 840px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 64px); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }

.wordmark { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; border-bottom: none; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch a {
  border-bottom: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.lang-switch a[aria-current="page"] { background: var(--ink); color: var(--inv-ink); }

/* ---------- type ---------- */

.eyebrow {
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.h1 {
  margin: 12px 0 0;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 700;
  max-width: min(100%, 19ch);
  text-wrap: balance;
}

.h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.016em;
  font-weight: 700;
  max-width: 22ch;
}

.lead {
  margin: 20px 0 0;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.body-text { margin: 20px 0 0; font-size: 16px; line-height: 26px; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }

/* ---------- sections ---------- */

.section { padding-block: clamp(56px, 8vw, 120px); }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; }
.grid-2 > * { min-width: 0; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(28px, 5vw, 64px) clamp(32px, 4vw, 56px); }

/* Copy left, media right on desktop; on mobile the media moves between the
   subhead and the form — the proof that earns the email (spec §7·01). */
.hero-grid {
  display: grid;
  gap: 0 clamp(28px, 4vw, 56px);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "intro media"
    "action media";
  align-items: start;
}
.hero-intro { grid-area: intro; min-width: 0; }
.hero-action { grid-area: action; min-width: 0; }
.hero-media { grid-area: media; min-width: 0; }
@media (max-width: 899px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "media"
      "action";
  }
  .hero-media { margin-top: 28px; }
}

.offers { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; line-height: 20px; color: var(--ink-2); }
.offers .dot { color: var(--border-strong); }
.offers-dark { margin: 16px 0 0; color: var(--inv-ink-2); }
.offers-dark .dot { color: var(--inv-border); }

/* ---------- signup form ---------- */

.signup { margin-top: 20px; max-width: 520px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }

.field {
  flex: 1 1 220px;
  min-height: 52px;
  padding: 0 16px;
  font-size: 16px; /* never smaller — iOS zooms the page below 16px */
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.field[aria-invalid="true"] { border-bottom: 2px solid var(--ink); }

.btn-primary {
  min-height: 52px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--inv-ink);
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.btn-primary:hover { background: #2A2A2A; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary[disabled] { opacity: 0.6; cursor: default; }

.btn-ghost {
  min-height: 52px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--inv-ink);
  background: transparent;
  border: 1px solid var(--inv-ink);
  border-radius: 10px;
  cursor: pointer;
}
.btn-ghost[aria-pressed="true"] { background: var(--inv-ink); color: var(--inv-bg); }

.micro { margin: 10px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-3); }

/* Errors are typographic, never chromatic (spec §3). */
.field-error { margin: 10px 0 0; font-size: 15px; line-height: 22px; color: var(--ink); }

/* Honeypot — hidden from people, present for bots. */
.hp-wrap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- success state ---------- */

.success-card {
  margin-top: 24px;
  max-width: 520px;
  background: var(--inv-bg);
  color: var(--inv-ink);
  border-radius: 12px;
  padding: 24px;
}
.success-title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; outline: none; }
.success-body { margin: 8px 0 0; font-size: 15px; line-height: 23px; color: var(--inv-ink-2); }
.success-secondary { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--inv-border); }
/* The success card is dark even inside light sections — the default ink ring vanishes on it. */
.success-card :focus-visible { outline-color: var(--inv-ink); }
.success-ask { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.success-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- media wells & placeholders ---------- */

.media-well { margin: 0; background: var(--surface-sunken); border-radius: 12px; padding: 16px; }

.media-frame { position: relative; border-radius: 8px; overflow: hidden; }
.media-frame video, .media-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

.media-ph {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, var(--media-ph), var(--media-ph) 10px, var(--border) 10px, var(--border) 20px);
}

.ratio-9x16 { aspect-ratio: 9 / 16; }
.ratio-4x5 { aspect-ratio: 4 / 5; }

/* Single tall frames cap their height and center themselves. */
.frame-hero { width: min(100%, calc(min(62vh, 560px) * 9 / 16)); margin-inline: auto; }
.frame-tall { width: min(100%, calc(min(60vh, 520px) * 9 / 16)); margin-inline: auto; }
.frame-uncut { width: min(100%, calc(min(70vh, 640px) * 9 / 16)); margin-inline: auto; }

.media-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-3);
}

.media-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}

.media-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.media-grid-3-narrow { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- pipeline ---------- */

.pipeline-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding-block: clamp(24px, 3vw, 32px);
}

.pipeline-line { height: 1px; background: var(--border); margin-bottom: 20px; }
.pipeline-line span { display: block; height: 1px; background: var(--ink); width: 0; transition: width 300ms ease-out; }
.pipeline-line span.is-drawn { width: 100%; }

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.pipeline li { padding: 16px 18px; min-width: 0; box-shadow: inset -1px 0 0 var(--border), inset 0 -1px 0 var(--border); }

.step-n { display: block; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-3); }
.step-label { display: block; margin-top: 6px; font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; text-wrap: pretty; }
.step-desc { display: block; margin-top: 6px; font-size: 13px; line-height: 20px; color: var(--ink-3); text-wrap: pretty; }

/* ---------- cards ---------- */

.cards { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  font-size: 16px;
  line-height: 26px;
  text-wrap: pretty;
}

.media-band { margin-top: 24px; }

/* ---------- retake steps ---------- */

.steps-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.steps-list li { background: var(--surface); padding: 18px 20px; display: flex; gap: 16px; align-items: baseline; }
.steps-list .step-n { min-width: 20px; }
.steps-list .step-text { font-size: 16px; line-height: 26px; }

.closing { margin: 24px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- pills ---------- */

.pill {
  display: inline-block;
  background: var(--ink);
  color: var(--inv-ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
}
.pill-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- caption playground ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--inv-ink); border-color: var(--ink); }

.caption-desc { margin: 20px 0 0; font-size: 16px; line-height: 26px; color: var(--ink-2); max-width: 52ch; }

.caption-stage { display: flex; align-items: flex-end; justify-content: center; padding: 24px; }
.caption-sample { position: relative; z-index: 1; margin: 0; max-width: 88%; text-align: center; border-radius: 6px; }
.cap-0 { background: rgba(13, 13, 13, 0.82); color: #FFFFFF; font-size: 15px; font-weight: 600; padding: 8px 12px; }
.cap-1 { background: transparent; color: #FFFFFF; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; text-shadow: 0 2px 8px rgba(13, 13, 13, 0.6); }
.cap-2 { background: #FFFFFF; color: var(--ink); font-size: 18px; font-weight: 700; padding: 8px 12px; box-shadow: 0 2px 8px rgba(13, 13, 13, 0.06); }
.cap-3 { background: transparent; color: #FFFFFF; font-size: 13px; font-weight: 400; letter-spacing: 0.02em; text-shadow: 0 1px 4px rgba(13, 13, 13, 0.7); }

/* ---------- made with clipka ---------- */

.made-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.made-grid figure { margin: 0; min-width: 0; }
.made-grid .media-frame { border-radius: 12px; }
.made-grid figcaption { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--ink-3); }

/* ---------- founders ---------- */

.founders { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.founder { display: flex; gap: 16px; align-items: center; }
.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, var(--media-ph), var(--media-ph) 6px, var(--border) 6px, var(--border) 12px);
}
.founder-name { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.founder-role { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--ink-3); }

/* ---------- faq ---------- */

.faq { margin-top: 32px; }
.faq details { border-top: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .faq-mark { font-weight: 400; color: var(--ink-3); font-size: 20px; transition: transform 200ms ease-out; }
.faq details[open] .faq-mark { transform: rotate(45deg); }
.faq .faq-a { margin: 0 0 20px; font-size: 16px; line-height: 26px; color: var(--ink-2); max-width: 66ch; text-wrap: pretty; }
.faq-end { border-top: 1px solid var(--border); }

/* ---------- final cta ---------- */

.cta-dark { background: var(--inv-bg); color: var(--inv-ink); }
.cta-dark .h2 { margin: 0; max-width: 20ch; }
.cta-dark .signup { margin-top: 32px; max-width: 560px; }
.cta-dark .field { color: var(--inv-ink); background: var(--inv-bg); border-color: var(--inv-border); }
.cta-dark .field[aria-invalid="true"] { border-bottom: 2px solid var(--inv-ink); }
.cta-dark .btn-primary { color: var(--ink); background: var(--inv-ink); }
.cta-dark .btn-primary:hover { background: var(--border); }
.cta-dark .micro { margin-top: 8px; color: var(--inv-ink-3); }
.cta-dark .field-error { color: var(--inv-ink); }
.cta-dark :focus-visible { outline-color: var(--inv-ink); }

.cta-success { margin-top: 32px; max-width: 640px; }
.cta-success .success-title { font-size: clamp(20px, 2vw, 26px); }
.cta-success .success-body { font-size: 16px; line-height: 26px; }
.cta-success .success-secondary { margin-top: 32px; padding-top: 24px; }
.cta-success .success-ask { font-size: 18px; }
.cta-success .btn-ghost { padding: 0 28px; font-size: 16px; }

.openq-label { display: block; margin-top: 32px; font-size: 16px; line-height: 26px; color: var(--inv-ink-2); }
.openq-input { margin-top: 10px; width: 100%; max-width: 560px; flex: none; }
.openq-done { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--inv-ink-3); }

/* ---------- footer ---------- */

.site-footer { background: var(--inv-bg); color: var(--inv-ink-3); border-top: 1px solid var(--inv-border); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: center;
  padding-block: 32px 48px;
  font-size: 13px;
  line-height: 20px;
}
.site-footer a { color: var(--inv-ink-2); border-bottom-color: var(--inv-border); }
.site-footer a:hover { color: var(--inv-ink); border-bottom-color: var(--inv-ink); }
.site-footer :focus-visible { outline-color: var(--inv-ink); }

/* ---------- pre-video mode ---------- */
/* <html data-media="none"> hides everything that needs real footage:
   empty placeholder wells, the two media-only sections (06 Uncut,
   08 Made with Clipka), the playground's "same clip" caption, and the
   section numbers (so the 05 → 09 gap never shows).
   To restore: remove the `media-gated` class from an element once its
   video exists; delete the data-media attribute when everything has
   footage. No copy needs to be touched. */

[data-media="none"] .media-gated { display: none; }
[data-media="none"] .sec-n { display: none; }

/* Hero collapses to a single column while its media is hidden. */
[data-media="none"] .hero-grid {
  grid-template-columns: 1fr;
  grid-template-areas:
    "intro"
    "action";
}

/* Full-width single-column lists read better capped. */
[data-media="none"] .steps-list { max-width: 720px; }

/* ---------- motion (spec §8) ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .pipeline-line span { width: 100% !important; }
}
