/* Makina Founder License page.
   Level order: tokens → primitives → micro components → layouts. The page (index.html + content.js) only composes these. */

/* ───────── tokens ───────── */
:root {
  --paper: #f6f1e9;
  --ink: #17140f;
  --red: #c4271c;
  --red-ink: #a51f15;
  --gold: #f2c14e;
  --card: #ffffff;
  --line: #e4dccf;
  --muted: #5b5348;
  --soft: #f3ece1;
  --on-ink: #f6f1e9;
  --on-ink-muted: #b9af9f;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.6rem, 4.5vw, 2.25rem);
  --text-2xl: clamp(2.1rem, 6vw, 3.25rem);
  --text-3xl: clamp(2.6rem, 9vw, 5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow: 0 18px 44px rgba(23, 20, 15, 0.1), 0 3px 10px rgba(23, 20, 15, 0.05);
  --shadow-red: 0 12px 28px rgba(196, 39, 28, 0.32);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 260ms;

  --measure: 680px;
  --wide: 1080px;
  --gutter: 16px;
}

/* ───────── base ───────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ───────── primitives ───────── */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--on-ink);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-md);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn--primary {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover {
  --btn-bg: var(--red-ink);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line);
}
.btn--lg {
  padding: 1.15rem 1.9rem;
  font-size: var(--text-lg);
}
.btn--block {
  width: 100%;
}
.btn__icon {
  width: 1.3em;
  height: 1.3em;
  flex: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--red {
  color: var(--red);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink);
  cursor: default;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
button.pill {
  cursor: pointer;
  font-family: var(--font-body);
}
button.pill:hover {
  border-color: var(--ink);
}
.pill[aria-pressed='true'] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: scale(1.03);
}

/* A fact only the owner can supply. Visible on purpose until it's filled. */
.need {
  display: inline;
  padding: 0.05em 0.45em;
  border-radius: 6px;
  border: 1.5px dashed #c99a2e;
  background: rgba(242, 193, 78, 0.25);
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: #6b4e0e;
  white-space: normal;
}

.check {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

/* ───────── micro components ───────── */
.mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.stat {
  color: var(--ink);
  display: grid;
  gap: var(--space-1);
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--line);
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat__label {
  font-size: var(--text-sm);
  color: var(--muted);
}

.tile {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}
.tile video,
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile__tag {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(23, 20, 15, 0.78);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.tile__badge {
  position: absolute;
  right: -10px;
  top: -10px;
}

.row-check {
  color: var(--ink);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--line);
}
.row-check__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.row-check__sub {
  font-size: var(--text-sm);
  color: var(--muted);
}
.row-check__aside {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: right;
  flex: none;
  max-width: 40%;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
}
.step__num {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 500;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}
.step__body {
  color: var(--muted);
  font-size: var(--text-md);
}

.feature {
  color: var(--ink);
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--line);
}
.feature__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}
.feature__body {
  font-size: var(--text-sm);
  color: var(--muted);
}

.faq {
  border-bottom: 2px solid var(--line);
}
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--red);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}
.faq[open] summary::after {
  transform: rotate(45deg);
}
.faq__answer {
  padding-bottom: var(--space-5);
  color: var(--muted);
  display: grid;
  gap: var(--space-3);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: var(--text-sm);
}
.table th,
.table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--soft);
}
.table td:first-child {
  font-weight: 600;
  color: var(--ink);
}

.timeline {
  display: grid;
  gap: var(--space-5);
  position: relative;
  padding-left: var(--space-2);
}
.timeline::before {
  content: '';
  position: absolute;
  left: calc(var(--space-2) + 1.3rem - 1px);
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: var(--line);
}

.callout {
  color: var(--ink);
  padding: var(--space-5);
  border-radius: var(--radius);
  border: 2px solid var(--red);
  background: #fff8ec;
}
.callout__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}

.quote {
  margin: var(--space-5) 0 0;
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--card);
  border-left: 6px solid var(--red);
  color: var(--ink);
}
.quote blockquote {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.quote figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
}

.toc {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}
.toc a {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 2px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease);
}
.toc a:hover {
  border-color: var(--ink);
}
.toc a::after {
  content: '↓';
  color: var(--red);
  font-family: var(--font-mono);
}

.message-preview {
  white-space: pre-wrap;
  padding: var(--space-4);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  background: #dcf8c6;
  color: #111b21;
  font-size: var(--text-sm);
  line-height: 1.5;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.qgroup {
  display: grid;
  gap: var(--space-3);
}
.qgroup__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}
.qgroup__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ───────── layouts ───────── */
.container {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.measure {
  max-width: var(--measure);
}
.section {
  padding: var(--space-8) 0;
}
.section--card {
  background: var(--card);
}
.section--soft {
  background: var(--soft);
}
.section--ink {
  background: var(--ink);
  color: var(--on-ink);
}
.section--ink .eyebrow,
.section--ink .lead,
.section--ink .muted {
  color: var(--on-ink-muted);
}
.section__head {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  max-width: var(--measure);
}
.stack {
  display: grid;
  gap: var(--space-3);
}
.stack--lg {
  gap: var(--space-5);
}
.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr));
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.045em;
}
.h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
}
.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: var(--measure);
}
.muted {
  color: var(--muted);
}
.hl {
  background: var(--red);
  color: #fff;
  padding: 0 0.22em 0.04em;
  border-radius: 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* utilities (token-backed only) */
.mt-3 {
  margin-top: var(--space-3);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-5 {
  margin-top: var(--space-5);
}
.mt-6 {
  margin-top: var(--space-6);
}
.center {
  text-align: center;
}
.strong {
  font-weight: 600;
}
.note {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--muted);
}
.grid--stats {
  --min: 200px;
}
.lead--on-ink,
.section--ink .lead--on-ink {
  color: var(--on-ink);
}
.faq-group {
  margin-bottom: var(--space-6);
}
.faq-group > .eyebrow {
  margin-bottom: var(--space-2);
}

/* top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 241, 233, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 60px;
}
.topbar .btn {
  padding: 0.55rem 1rem;
  font-size: var(--text-sm);
}

/* hero */
.hero {
  position: relative;
  padding: var(--space-7) 0 var(--space-8);
  overflow: hidden;
}
/* Headline, then the video, then the offer line and the CTA (video-sales-letter order). */
.hero__stack {
  display: grid;
  gap: var(--space-5);
  justify-items: center;
  text-align: center;
}
.hero__copy {
  display: grid;
  gap: var(--space-4);
  max-width: 900px;
}
.hero__lead {
  max-width: var(--measure);
}
.hero__trust {
  font-size: var(--text-sm);
  color: var(--muted);
}
.hero__trust li {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.hero__trust ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
}
.cluster--center {
  justify-content: center;
}

.vsl {
  width: 100%;
  max-width: var(--wide);
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.vsl__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 2px solid var(--line);
  background: var(--ink);
  box-shadow: var(--shadow);
}
.vsl__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The whole frame is the sound button while the video is muted; the pill is its visible label. */
.vsl__sound {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.vsl__pill {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: #fff;
  font: 600 var(--text-sm) / 1 var(--font-body);
  box-shadow: var(--shadow-red);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.vsl__sound:hover .vsl__pill {
  background: var(--red-ink);
  transform: translateY(-1px);
}
.vsl__sound:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
  border-radius: var(--radius-lg);
}
.vsl__sound[hidden] {
  display: none;
}
.vsl__note {
  font-size: var(--text-xs);
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  max-width: 640px;
  margin: 0 auto;
}
.frames {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 15vw, 7rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.founder {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
.founder__photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 4px solid var(--card);
  box-shadow: var(--shadow);
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: rgba(246, 241, 233, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease);
}
.sticky-cta.is-on {
  transform: translateY(0);
}

.devbar {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--gutter);
  text-align: center;
}

.footer {
  padding: var(--space-7) 0 calc(var(--space-8) + 40px);
  font-size: var(--text-sm);
  color: var(--muted);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 860px) {
  :root {
    --gutter: 32px;
  }
  .founder {
    grid-template-columns: 320px 1fr;
  }
  .frames {
    grid-template-columns: repeat(8, 1fr);
  }
  .sticky-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .pill {
    transition: none;
  }
}
