/* Midroll Partners: warm paper ground, charcoal type, one Ember accent.
   Layout: a 1200px column of rounded blocks, bands of charcoal at the foot. Single light theme by design. */
:root {
  --ember: #E0703A;
  --ember-ink: #A84A1A;
  --ember-soft: #F2B08E;
  --char: #17171C;
  --char-2: #2A2A31;
  --sand: #E9DCC6;
  --paper: #F5F0E8;
  --muted: #4A453F;
  --line: #CFC6B8;
  --on-dark: #F5F0E8;
  --on-dark-muted: #C9C2B8;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-lg: 32px;
  --radius: 24px;
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--char);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--char); }
a:hover { color: var(--ember-ink); }
:focus-visible { outline: 3px solid var(--ember-ink); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Logo: the midroll pill with the ad-countdown ring */
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ember); color: var(--char);
  border-radius: 999px; padding: 8px 10px 8px 18px;
  font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: -0.03em; line-height: 1;
  text-decoration: none;
}
.logo:hover { color: var(--char); }
.ring { width: 22px; height: 22px; flex: none; }
.ring-track { fill: none; stroke: var(--ember-soft); stroke-width: 4; }
.ring-fill { fill: none; stroke: var(--char); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 56.5 75.4; animation: ring 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ring { from { stroke-dashoffset: 56.5; } to { stroke-dashoffset: 0; } }

/* Footer logo: the long pill, "midroll partners" with the ring at the far end */
.logo--long { align-self: stretch; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 20px; font-size: 21px; }
.logo--long .ring { width: 24px; height: 24px; }

/* Homepage intro paragraph */
.intro p { font-size: 20px; color: var(--muted); max-width: 36em; text-wrap: pretty; }
.intro strong { color: var(--char); }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; padding-block: 22px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding-block: 8px; }
.nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .btn { padding: 12px 20px; }

/* Mobile menu */
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--char); background: transparent; color: var(--char); font: 700 15px/1 var(--body); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.2s ease, background-color 0.2s ease; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.site-header.open .menu-icon { background: transparent; }
.site-header.open .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.site-header.open .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 760px) {
  .site-header .wrap { padding-block: 16px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 17px; }
  .site-header.open .nav { display: flex; }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { text-decoration: none; color: var(--ember-ink); }
  .nav .btn { margin-top: 16px; border-bottom: 0; padding-block: 16px; }
  .hero .actions .btn { flex: 1 1 auto; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  background: var(--char); color: var(--on-dark);
  font: 700 16px/1 var(--body); padding: 16px 28px; border-radius: 999px; border: 2px solid var(--char);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--char-2); color: var(--on-dark); }
.btn--outline { background: transparent; color: var(--char); }
.btn--outline:hover { background: var(--sand); color: var(--char); }
.btn--ember { background: var(--ember); border-color: var(--ember); color: var(--char); }
.btn--ember:hover { background: #E8834F; color: var(--char); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Shared blocks */
.eyebrow {
  align-self: flex-start; display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
  background: var(--sand); padding: 8px 14px; border-radius: 999px;
}
.label { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.lede { font-size: 20px; color: var(--muted); max-width: 36em; }
.section { padding-block: 0 88px; display: flex; flex-direction: column; gap: 28px; }
.section-title { font-size: clamp(30px, 4.4vw, 48px); }

.hero { padding-block: 56px 56px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(42px, 8vw, 104px); letter-spacing: -0.05em; line-height: 0.95; max-width: 15ch; }
.hero--home h1 { font-size: clamp(48px, 10vw, 128px); max-width: none; }
.pill-word { background: var(--ember); border-radius: 999px; padding: 0 0.22em; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }

.card { border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; }
.card p { font-size: 16px; }
.card--ember { background: var(--ember); }
.card--dark { background: var(--char); color: var(--on-dark); }
.card--dark h3 { color: var(--ember); }
.card--dark p { color: var(--on-dark-muted); }
.card--sand { background: var(--sand); }
.card--sand p { color: var(--muted); }
.card--line { border: 2px solid var(--char); }
.card--line p { color: var(--muted); }

.stat { font-family: var(--display); font-weight: 900; font-size: clamp(42px, 5vw, 56px); letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.card--dark .stat { color: var(--ember); }

.placeholder { border: 2px dashed var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 15px; padding: 20px; }

/* Split feature cards (home) */
.split { text-decoration: none; border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.split h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; line-height: 1.08; }
.split .more { margin-top: auto; font-weight: 700; }
.split--dark { background: var(--char); color: var(--on-dark); }
.split--dark .label { color: var(--ember); }
.split--dark p { color: var(--on-dark-muted); }
.split--dark:hover { color: var(--on-dark); background: var(--char-2); }
.split--ember { background: var(--ember); color: var(--char); }
.split--ember:hover { color: var(--char); background: #E8834F; }

/* Case teaser */
.teaser { text-decoration: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); border-radius: var(--radius-lg); overflow: hidden; }
.teaser > div { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; }
.teaser .big { font-family: var(--display); font-weight: 900; font-size: clamp(56px, 8vw, 88px); letter-spacing: -0.05em; line-height: 1; }
.teaser h3 { font-size: clamp(26px, 3vw, 34px); }
.teaser:hover { color: var(--char); }
.teaser .side-ember { background: var(--ember); }
.teaser .side-dark { background: var(--char); color: var(--on-dark); }
.teaser .side-dark .label { color: var(--ember); }
.teaser .side-dark p { color: var(--on-dark-muted); }
.teaser .side-sand { background: var(--sand); }
.teaser .side-sand p { color: var(--muted); }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { border-top: 3px solid var(--char); padding-top: 20px; display: flex; flex-direction: column; gap: 6px; counter-increment: step; }
.steps li::before { content: "Step " counter(step); font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: 0.04em; color: var(--ember-ink); text-transform: uppercase; }
.steps strong { font-size: 18px; }
.steps span { font-size: 15px; color: var(--muted); }

/* Logos strip */
.logos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.logos .placeholder { height: 96px; }

/* CTA band */
.cta { background: var(--ember); border-radius: var(--radius-lg); padding: 52px 40px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); max-width: 16em; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--sand); border-radius: 20px; padding: 0 26px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; padding-block: 22px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-weight: 900; color: var(--ember-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 22px; max-width: 46em; }

/* Checklist */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { background: var(--sand); border-radius: 16px; padding: 18px 22px 18px 52px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--ember); }

/* Table */
.table-box { overflow-x: auto; background: var(--sand); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 520px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 18px 24px; }
th { font-family: var(--display); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
tbody th { font-family: var(--body); font-size: 16px; letter-spacing: 0; text-transform: none; }
tbody tr { border-top: 1px solid var(--line); }
tbody tr.total { border-top: 2px solid var(--char); font-weight: 700; }

/* Quote band */
.quote { background: var(--char); color: var(--on-dark); border-radius: var(--radius-lg); padding: 48px 40px; display: flex; flex-direction: column; gap: 14px; }
.quote .label { color: var(--ember); }
.quote p { font-family: var(--display); font-weight: 700; font-size: clamp(21px, 2.8vw, 30px); letter-spacing: -0.02em; line-height: 1.3; max-width: 30em; }

/* Two-column prose */
.cols { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.cols > * { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cols h2 { font-size: clamp(24px, 3vw, 30px); }
.cols p { color: var(--muted); }

/* Form */
.form { background: var(--sand); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form .row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea {
  font: 400 16px/1.4 var(--body); color: var(--char); background: var(--paper);
  border: 1.5px solid var(--char); border-radius: 14px; padding: 14px 16px; width: 100%;
}
.field textarea { resize: vertical; min-height: 140px; }
.form-status { font-size: 15px; font-weight: 500; background: var(--paper); border-radius: 14px; padding: 14px 16px; }
.contact-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.contact-layout .form { flex: 999 1 520px; }
.contact-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.email-line code { font: 700 17px var(--body); color: var(--on-dark); user-select: all; overflow-wrap: anywhere; }
.copy { font: 700 13px var(--body); background: var(--ember); color: var(--char); border: 0; border-radius: 999px; padding: 8px 14px; min-height: 36px; cursor: pointer; }

.crumbs { font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--char); color: var(--on-dark); }
.site-footer .wrap { padding-block: 56px 40px; display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 320px; }
.footer-brand p { color: var(--on-dark-muted); font-size: 15px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; font-size: 15px; }
.footer-cols div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols strong { font-family: var(--display); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember); }
.footer-cols a, .footer-cols span { color: var(--on-dark); text-decoration: none; }
.footer-cols a:hover { color: var(--ember); }
.legal { font-size: 11px; color: var(--on-dark-muted); border-top: 1px solid #34343C; padding-top: 24px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .split, .teaser > div, .cta, .quote, .form { padding: 28px 24px; }
  .card { padding: 26px; }
  .section { padding-block: 0 64px; }
  .hero { padding-block: 24px 36px; gap: 20px; }
  .hero--home h1 { font-size: clamp(46px, 14vw, 64px); }
  .section-title { font-size: 28px; }
  .split { min-height: 0; }
  .faq details { padding: 0 20px; }
  .faq summary { font-size: 17px; padding-block: 18px; }
  .lede { font-size: 18px; }
}
/* 1. Scroll timeline */
.timeline { position: fixed; z-index: 50; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 5px; background: rgba(23, 23, 28, 0.08); pointer-events: none; }
.timeline-fill { position: absolute; inset: 0; background: var(--ember); transform-origin: left center; transform: scaleX(0); }
.timeline-mark { position: absolute; top: 0; width: 4px; height: 5px; margin-left: -2px; background: var(--char); border-radius: 1px; opacity: 0.35; }
.timeline-mark.passed { opacity: 1; }

/* 2. "better" pill sweeps in like a progress bar */
.pill-word { background: linear-gradient(var(--ember), var(--ember)) no-repeat left center / 100% 100%; animation: pill 0.9s 0.25s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pill { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* 4. Lift on hover for things you can click */
.btn, .split, .logo { transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
.btn:hover, .split:hover, .logo:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -12px rgba(23, 23, 28, 0.45); }

@media (prefers-reduced-motion: reduce) {
  .ring-fill, .pill-word { animation: none; }
  .btn, .split, .logo { transition: none; }
  .btn:hover, .split:hover, .logo:hover { transform: none; }
}
