/* ==========================================================================
   KADRFLOW Studio — Editorial Performance Creative Agency Design System
   Obsidian Dark Default + Warm Editorial Paper Light Mode
   Self-hosted Newsreader + Plus Jakarta Sans + JetBrains Mono (0 CLS)
   ========================================================================== */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0b0d;
  --surface: #121419;
  --surface-raised: #171a21;
  --ink: #f4f2ec;
  --muted: #b0aca2;
  --hairline: rgba(244, 241, 234, 0.1);
  --hairline-strong: rgba(244, 241, 234, 0.2);
  --accent: #f59e0b;
  --accent-ink: #120d03;
  --accent-soft: rgba(245, 158, 11, 0.13);
  --emerald: #10b981;
  --danger: #f43f5e;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #faf8f4;
  --surface: #f2eee6;
  --surface-raised: #ffffff;
  --ink: #141311;
  --muted: #4b473f;
  --hairline: rgba(20, 19, 17, 0.1);
  --hairline-strong: rgba(20, 19, 17, 0.22);
  --accent: #d97706;
  --accent-ink: #ffffff;
  --accent-soft: rgba(217, 119, 6, 0.1);
  --emerald: #0b6b4f;
  --danger: #be123c;
  --shadow: 0 18px 42px rgba(20, 19, 17, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  caret-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
  font-weight: 600;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.tnum {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 40px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.seg-btn:hover {
  border-color: var(--hairline-strong);
}

.seg-btn:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.28s var(--spring), background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.85rem;
}

/* Hero — Split Editorial + Live Phone Reel Showcase */
.hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--hairline);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.55rem, 4.9vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.hero-lead {
  font-size: clamp(1.04rem, 1.4vw, 1.18rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  max-width: 560px;
}

.proof-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.proof-lbl {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Hero Featured Phone Mockup */
.hero-stage {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: flex-start;
}

.phone-frame {
  position: relative;
  width: 270px;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.phone-frame.secondary {
  width: 215px;
  margin-top: 42px;
  opacity: 0.92;
}

.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 36px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  color: #f4f2ec;
}

.reel-meta strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.25;
}

.reel-meta span {
  display: block;
  font-size: 0.74rem;
  color: rgba(244, 242, 236, 0.78);
}

.mute-btn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 11, 13, 0.7);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mute-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Sections */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 38px;
}

.section-head h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 24ch;
}

.section-head p {
  color: var(--muted);
  max-width: 48ch;
  font-size: 0.98rem;
}

/* 4-Reel Interactive Portfolio Wall */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.reel-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reel-card .phone-frame {
  width: 100%;
  border-radius: 18px;
}

.reel-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reel-caption h3 {
  font-size: 1rem;
  font-weight: 700;
}

.reel-caption p {
  font-size: 0.86rem;
  color: var(--muted);
}

/* Asymmetric Production Pipeline Table / Ledger (No generic icon cards!) */
.ledger {
  border-top: 1px solid var(--hairline-strong);
}

.ledger-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 0.9fr) minmax(0, 1.3fr) 150px;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}

.ledger-step {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.ledger-title {
  font-size: 1.12rem;
  font-weight: 700;
}

.ledger-desc {
  color: var(--muted);
  font-size: 0.94rem;
}

.ledger-time {
  text-align: right;
  font-size: 0.86rem;
  color: var(--ink);
  font-weight: 600;
}

/* ROI Testing Math Workbench */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px;
}

.field-group {
  margin-bottom: 20px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.calc-results {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  padding: 28px;
}

.calc-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.calc-box-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.calc-big {
  display: block;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
}

.calc-big.good {
  color: var(--emerald);
}

.calc-note {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.tier {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px;
}

.tier.featured {
  background: var(--surface-raised);
  border-color: var(--accent);
}

.tier-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tier-price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 14px 0 8px;
}

.tier-unit {
  font-size: 0.86rem;
  color: var(--muted);
}

.tier-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.91rem;
  color: var(--muted);
}

.tier-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.tier-list svg {
  width: 17px;
  height: 17px;
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Free 15s Spec Ad Lead Form */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px;
  align-items: start;
}

.lead-copy h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.lead-copy p {
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 48ch;
}

.guarantee-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.94rem;
}

.guarantee-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guarantee-list svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.lead-form {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  padding: 28px;
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
}

.input-wrap textarea {
  min-height: 88px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  font-size: 0.9rem;
  min-height: 22px;
}

.form-status.ok {
  color: var(--emerald);
  font-weight: 600;
}

.form-status.err {
  color: var(--danger);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 36px 0 48px;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Responsive */
@media (max-width: 1040px) {
  .hero-grid,
  .calc-grid,
  .lead-grid {
    grid-template-columns: 1fr;
  }
  .reels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .ledger-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .ledger-time {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 28px, 1240px);
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 36px 0 48px;
  }
  .hero-stage {
    flex-direction: column;
    align-items: center;
  }
  .phone-frame.secondary {
    display: none;
  }
  .phone-frame {
    width: min(300px, 100%);
  }
  .reels-grid {
    grid-template-columns: 1fr;
  }
  .form-row,
  .calc-compare {
    grid-template-columns: 1fr;
  }
  .proof-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .btn,
  .seg-btn {
    min-height: 44px;
  }
  .header-inner {
    gap: 8px;
  }
  .header-controls {
    gap: 6px;
  }
  .header-controls .btn-sm {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0 11px;
  }
}
