/* ============================================================
   kanops.ai — unified marketing site  ·  "Ground Truth" edition
   The blend: editorial book-cover heroes + a calm paper reading
   mode (Stripe Press / Build inspiration) wrapped around the
   product's dark, interactive surfaces. One nav + footer system
   across every page. Link ../../styles.css first for tokens.
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--kanops-black); color: #fff; -webkit-font-smoothing: antialiased; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* paper palette for reading-mode sections */
:root {
  --paper-ground: #F3EEE7; --paper-ink: #1A1814; --paper-ink-soft: #4F4A41;
  --paper-rule: #DDD5C8; --paper-faint: #8C8578;
}

/* ---- layout primitives ---- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.bleed { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.measure { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.red { color: var(--kanops-red); }
.section { padding: clamp(80px, 10vw, 150px) 0; position: relative; }
.section.tight { padding: clamp(48px, 6vw, 84px) 0; }
.panel { background: #0F0F11; }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: rgba(255,255,255,0.5); margin-bottom: 26px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kanops-red); flex-shrink: 0; }
.eyebrow .idx { font-family: var(--font-numeric); letter-spacing: 0.08em; color: rgba(255,255,255,0.34); }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
.h-display { font-size: clamp(46px, 7vw, 100px); letter-spacing: -0.04em; }
.h-1 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.03em; }
.h-2 { font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.02em; }
.lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: rgba(255,255,255,0.62); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-family: var(--font-sans); font-weight: 600; font-size: 15px; border: 0; border-radius: var(--radius-pill); padding: 14px 28px; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--kanops-red); color: #fff; }
.btn-red:hover { background: var(--kanops-red-hover); }
.btn-line { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.22); }
.btn-line:hover { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.04); }
.btn-dark { background: var(--kanops-black); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---- NAV ---- */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(10,10,10,0.66); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-on-black); }
.site-nav.on-cover { position: absolute; left: 0; right: 0; background: transparent; backdrop-filter: none; border-bottom: 0; }
.site-nav .row { display: flex; align-items: center; gap: 32px; height: 66px; }
.wordmark { font-weight: 800; letter-spacing: -0.02em; font-size: 22px; }
.wordmark .tld { color: var(--kanops-red); }
.nav-links { display: flex; gap: 28px; margin-left: 18px; }
.nav-links a { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.6); transition: color var(--dur-fast) var(--ease-out); }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ---- EDITORIAL COVER ---- */
.cover { position: relative; min-height: 86vh; overflow: hidden; display: flex; flex-direction: column; padding-top: 110px; }
.cover.short { min-height: 62vh; }
.cover .bg { position: absolute; inset: 0; z-index: 0; }
.cover .bg img { width: 100%; height: 100%; object-fit: cover; animation: drift 28s var(--ease-in-out) infinite alternate; filter: saturate(0.9) contrast(1.02); }
@keyframes drift { from { transform: scale(1.08) translate(1.5%, -1%); } to { transform: scale(1.17) translate(-1.5%, 1.5%); } }
.cover .scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,7,5,0.74) 0%, rgba(8,7,5,0.34) 36%, rgba(8,7,5,0.52) 70%, rgba(8,7,5,0.95) 100%); }
.cover .vgrid { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 12.5% 100%; mix-blend-mode: overlay; opacity: 0.5; }
.cover-body { position: relative; z-index: 3; margin-top: auto; padding-bottom: clamp(48px, 6vw, 76px); }
.cover .kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; color: rgba(255,255,255,0.72); margin-bottom: 24px; }
.cover .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kanops-red); }
.cover h1 { font-weight: 800; letter-spacing: -0.045em; line-height: 0.94; font-size: clamp(56px, 11vw, 160px); }
.cover h1 .red { color: var(--kanops-red); }
.cover .sub { margin-top: 26px; max-width: 620px; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.55; color: rgba(255,255,255,0.78); }
.cover .cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.cover .meta-row { display: flex; gap: 40px; margin-top: 44px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.18); flex-wrap: wrap; }
.cover .meta-row .n { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.cover .meta-row .n .red { color: var(--kanops-red); }
.cover .meta-row .l { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 8px; }
.cover .edition { position: absolute; z-index: 3; top: 96px; right: 32px; white-space: nowrap; font-family: var(--font-numeric); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,0.6); opacity: 0.92); }

/* ---- PAPER reading mode ---- */
.read { background: var(--paper-ground); color: var(--paper-ink); padding: clamp(72px, 9vw, 124px) 0; }
.read .col { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.spread { max-width: 1140px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1fr minmax(0,720px) 1fr; }
.spread > * { grid-column: 2; }
.margin-note { grid-column: 3; grid-row: 4; align-self: start; padding-left: 28px; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--paper-faint); border-left: 2px solid var(--kanops-red); }
.margin-note b { color: var(--paper-ink-soft); font-weight: 700; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; font-family: var(--font-numeric); }
.chap { display: flex; align-items: baseline; gap: 16px; margin: 0 0 26px; }
.chap .num { font-family: var(--font-numeric); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--kanops-red); }
.chap .rule { flex: 1; height: 1px; background: var(--paper-rule); }
.chap .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--paper-faint); font-weight: 600; }
.read h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; font-size: clamp(30px, 4vw, 46px); margin: 0 0 26px; }
.read p { font-size: 19px; line-height: 1.72; color: #2C281F; margin: 0 0 24px; text-wrap: pretty; }
.read p.lede-p { font-size: 23px; line-height: 1.6; color: var(--paper-ink); }
.read p .drop { float: left; font-size: 76px; line-height: 0.78; font-weight: 800; padding: 6px 12px 0 0; color: var(--kanops-red); letter-spacing: -0.03em; }
.pull { padding: 44px 0; }
.pull blockquote { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; font-size: clamp(26px, 3.4vw, 40px); }
.pull blockquote .red { color: var(--kanops-red); }
.pull .by { margin-top: 16px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--paper-faint); font-family: var(--font-numeric); }
figure.plate { padding: 48px 0; }
figure.plate img { width: 100%; border-radius: 4px; }
figure.plate figcaption { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--paper-faint); }
figure.plate figcaption .idx { font-family: var(--font-numeric); color: var(--kanops-red); font-weight: 700; }

/* ---- section header ---- */
.sec-head { max-width: 800px; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
.sec-head .lede { margin-top: 22px; }

/* ---- stat band ---- */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); }
.statband .stat { padding-left: 26px; border-left: 1px solid var(--border-on-black); }
.statband .stat:first-child { border-left: 0; padding-left: 0; }
.statband .n { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: clamp(38px, 5vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.95; }
.statband .n .red { color: var(--kanops-red); }
.statband .l { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 14px; line-height: 1.45; max-width: 200px; }

/* ---- split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.rev .col-text { order: 2; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.pill { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.72); padding: 8px 15px; border-radius: var(--radius-pill); border: 1px solid var(--border-on-black); }
.figure { position: relative; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow-on-black); line-height: 0; }
.figure img { width: 100%; }
.figcap { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; background: rgba(10,10,10,0.72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 11px 14px; }
.figcap .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--kanops-red); }
.figcap .t { font-size: 13px; font-weight: 600; }
.figcap .m { font-size: 12px; color: rgba(255,255,255,0.55); margin-left: auto; font-family: var(--font-numeric); }
.eyebrow-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--kanops-red); background: var(--kanops-red-soft); padding: 6px 13px; border-radius: var(--radius-pill); }

/* ---- pipeline / nodes ---- */
.pipe-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.node { background: #131316; border: 1px solid var(--border-on-black); border-radius: var(--radius-lg); padding: 30px 28px 32px; position: relative; transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.node:hover { border-color: rgba(249,56,34,0.5); transform: translateY(-3px); }
.node .step { font-family: var(--font-numeric); font-size: 13px; font-weight: 600; color: var(--kanops-red); letter-spacing: 0.06em; }
.node h3 { font-size: 21px; margin: 18px 0 16px; letter-spacing: -0.015em; }
.node p { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,0.58); margin: 0; }
.node .arrow { position: absolute; right: -13px; top: 50%; transform: translateY(-50%); z-index: 3; color: rgba(255,255,255,0.3); font-size: 16px; }
.loop { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; padding: 16px; border: 1px dashed var(--border-on-black-strong); border-radius: var(--radius-lg); font-size: 14px; color: rgba(255,255,255,0.6); }
.loop .lp { width: 16px; height: 16px; border: 2px solid var(--kanops-red); border-top-color: transparent; border-radius: 50%; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loop b { color: #fff; font-weight: 700; }

/* ---- interactive detection showcase ---- */
.show-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 48px; align-items: center; }
.show-fig { position: relative; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid rgba(255,255,255,0.12); line-height: 0; box-shadow: var(--shadow-on-black); }
.show-fig img { width: 100%; }
.show-fig .box { position: absolute; border: 2px solid; border-radius: 4px; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); pointer-events: none; }
.show-fig .box .lab { position: absolute; top: -1px; left: -2px; transform: translateY(-100%); color: #fff; font-size: 10px; font-weight: 600; padding: 3px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; font-family: var(--font-numeric); }
.show-fig[data-layer="all"] .box,
.show-fig[data-layer="product"] .box.product,
.show-fig[data-layer="price"] .box.price,
.show-fig[data-layer="pos"] .box.pos,
.show-fig[data-layer="gap"] .box.gap { opacity: 1; }
.layer-controls { display: flex; flex-direction: column; gap: 10px; }
.layer-btn { display: flex; align-items: center; gap: 13px; text-align: left; background: #131316; border: 1px solid var(--border-on-black); border-radius: var(--radius-md); padding: 15px 18px; cursor: pointer; color: #fff; font-family: var(--font-sans); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.layer-btn:hover { border-color: var(--border-on-black-strong); }
.layer-btn.active { border-color: rgba(255,255,255,0.5); background: #1A1A1E; }
.layer-btn .sw { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.layer-btn .lt { display: block; font-size: 15px; font-weight: 600; }
.layer-btn .ld2 { display: block; font-size: 12.5px; color: rgba(255,255,255,0.5); margin-top: 6px; }
.layer-btn .cnt { margin-left: auto; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 13px; color: rgba(255,255,255,0.55); }

/* ---- gallery ---- */
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band .h-1 { margin-bottom: 20px; }
.cta-band .lede { max-width: 560px; margin: 0 auto 34px; }

/* ---- FOOTER ---- */
.site-foot { border-top: 1px solid var(--border-on-black); padding: 72px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 44px; }
.foot-brand .wordmark { font-size: 25px; display: inline-block; margin-bottom: 18px; }
.foot-brand p { font-size: 14px; color: rgba(255,255,255,0.5); max-width: 300px; line-height: 1.6; margin: 0; }
.foot-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.4); margin: 0 0 16px; }
.foot-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 11px; transition: color var(--dur-fast) var(--ease-out); }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 60px; padding-top: 28px; border-top: 1px solid var(--border-on-black); font-size: 13px; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 12px; }
.foot-bottom .loading-dot { display: inline-flex; align-items: center; gap: 9px; }
.foot-bottom .ld { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--kanops-red); position: relative; overflow: hidden; }
.foot-bottom .ld::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; top: 0; background: var(--kanops-red); }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cover .bg img, .loop .lp { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 940px) {
  .hero-grid, .split, .show-grid, .foot-grid, .statband { grid-template-columns: 1fr; }
  .split.rev .col-text { order: 0; }
  .pipe-row { grid-template-columns: 1fr; }
  .node .arrow { display: none; }
  .statband { gap: 32px; }
  .statband .stat { border-left: 0; padding-left: 0; }
  .gal { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .spread { grid-template-columns: 1fr; padding: 0 26px; }
  .spread > * { grid-column: 1; }
  .margin-note { grid-column: 1; grid-row: auto; margin: 8px 0 28px; padding-left: 18px; }
}
@media (max-width: 1140px) {
  .spread { grid-template-columns: 1fr; max-width: 784px; margin: 0 auto; padding: 0 32px; }
  .spread > * { grid-column: 1; }
  .margin-note { grid-column: 1; grid-row: auto; max-width: 680px; margin: 10px auto 36px; padding: 18px 0 6px 22px; border-left-width: 3px; }
}
