/* Kadran marketing site. Layout: dark petrol hero carrying the live product, then quiet paper sections. */
:root {
  color-scheme: light;
  --ink: #0c2a2e; --ink2: #46555a; --ink3: #78858a;
  --petrol: #0e6b73; --petrol-lt: #2e8e96; --sand: #d9c7a3; --tint: #d7ecec;
  --paper: #f6f4ef; --card: #fdfcfa; --line: #e4e1d9; --line2: #d3cfc4;
  --good: #1b7f3b; --good-bg: #e3f5e6; --warn: #8a5a00; --warn-bg: #fdf0d0; --bad: #b3261e; --bad-bg: #fbe4e2;
  --display: "Space Grotesk", -apple-system, "Segoe UI", Arial, sans-serif;
  --body: Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  --gl: max(20px, env(safe-area-inset-left, 0px)); --gr: max(20px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 16px/1.6 var(--body); background: var(--paper); color: var(--ink); }
a { color: var(--petrol); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 19px; letter-spacing: -.01em; }
p { margin: 0; }
.in { max-width: 1140px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--petrol); margin-bottom: 12px; }
.lede { color: var(--ink2); max-width: 62ch; margin-top: 12px; }

.top { background: rgba(12, 42, 46, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; position: sticky; top: 0; z-index: 30; }
.top .in { display: flex; align-items: center; gap: 24px; padding-block: 11px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 21px/1 var(--display); letter-spacing: -.02em; color: #fff; text-decoration: none; }
.top nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.top nav a { color: #c7d6d8; text-decoration: none; font-size: 14.5px; }
.top nav a:hover { color: #fff; }
.btn { display: inline-block; font: 600 15px/1 var(--body); padding: 13px 20px; border-radius: 9px; text-decoration: none; border: 1px solid transparent; }
.btn.pri { background: var(--sand); color: var(--ink); }
.btn.pri:hover { background: #e6d7b8; }
.btn.ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn.ghost:hover { border-color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #154046; }
.btn.line { border-color: var(--line2); color: var(--ink); background: var(--card); }
.btn.line:hover { border-color: var(--petrol); }
.top nav .btn { padding: 10px 15px; font-size: 14px; color: var(--ink); }

/* --- pinned product scene: default layout is static (no JS / reduced motion); .js turns on the scroll-driven version --- */
.scene { background: var(--ink); color: #fff; padding-block: 48px 56px; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-left: var(--gl); padding-right: var(--gr); }
.herotext { text-align: center; max-width: 980px; }
.herotext h1 { font-size: clamp(36px, 6.4vw, 84px); }
.herotext h1 em { font-style: normal; color: var(--sand); }
.herotext .lede { color: #c7d6d8; font-size: clamp(16px, 1.5vw, 20px); max-width: 52ch; margin: 20px auto 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; justify-content: center; }
.caps { display: flex; flex-direction: column; gap: 26px; text-align: center; max-width: 900px; }
.cap h2 { font-size: clamp(24px, 3.6vw, 48px); margin-top: 10px; }
.cap p { color: #c7d6d8; margin-top: 10px; font-size: clamp(15px, 1.3vw, 18px); }
.tn { font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--sand); }
.shot { width: min(100%, 1180px); border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: #08191b; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .45); transform-origin: 50% 0%; will-change: transform; }
.shot .bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: #9fb3b6; }
.shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .22); flex: none; }
.shot .bar span { margin-left: 8px; color: #fff; font: 600 13px/1 var(--display); }
.shot .bar b { margin-left: auto; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame { position: relative; height: 0; overflow: hidden; background: #fdfcfa; }
.view { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.view.show { opacity: 1; }
.view iframe { position: absolute; top: 0; left: 0; width: 1180px; height: 720px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fdfcfa; }
.dots, .scrollcue { display: none; }

.js .scene { height: calc(7 * 90vh + 100vh); padding-block: 0; }
.js .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: block; }
.js .herotext { position: absolute; left: 50%; top: 40%; width: min(980px, 100% - 40px); margin-left: calc(min(980px, 100% - 40px) / -2); margin-top: -150px; z-index: 3; will-change: transform, opacity; }
.js .caps { position: absolute; left: 0; right: 0; top: 74px; height: 190px; max-width: none; padding-inline: 20px; display: block; z-index: 2; }
.js .cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; opacity: 0; will-change: transform, opacity; }
.js .shot { position: absolute; left: 50%; top: 286px; width: min(100% - 40px, 1180px, (100vh - 350px) / 0.61); min-width: min(100% - 40px, 300px); margin-left: calc(min(100% - 40px, 1180px, max((100vh - 350px) / 0.61, 300px)) / -2); }
.js .dots { display: flex; gap: 7px; justify-content: center; position: absolute; left: 0; right: 0; bottom: 18px; z-index: 4; }
.dots i { width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); transition: background .3s ease, width .3s ease; }
.dots i.on { background: var(--sand); width: 38px; }
.js .scrollcue { display: block; position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9fb3b6; z-index: 5; }
.js .scrollcue::after { content: "↓"; display: block; margin-top: 4px; color: var(--sand); font-size: 16px; }

.glow { display: none; }
.js .glow { display: block; position: absolute; top: 0; bottom: 0; width: 42vw; pointer-events: none; z-index: 0; }
.js .glow.l { left: 0; background: radial-gradient(ellipse 100% 46% at 0% var(--gy, 50%), rgba(46, 142, 150, .62), rgba(46, 142, 150, .18) 45%, rgba(46, 142, 150, 0) 72%); }
.js .glow.r { right: 0; background: radial-gradient(ellipse 100% 46% at 100% var(--gy, 50%), rgba(217, 199, 163, .40), rgba(217, 199, 163, .12) 45%, rgba(217, 199, 163, 0) 72%); }
.js .pin2 { position: sticky; }
.js .pin2 > :not(.glow) { position: relative; z-index: 1; }
.words { background: var(--ink); color: #fff; padding-block: 60px; }
.pin2 { padding-left: max(var(--gl), calc(50% - 500px)); padding-right: max(var(--gr), calc(50% - 500px)); overflow: hidden; }
.wlead { font: 600 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--sand); margin-bottom: 22px; }
.wline { font: 700 clamp(30px, 5.6vw, 72px)/1.12 var(--display); letter-spacing: -.03em; }
.wline span { color: #fff; transition: color .35s ease; }
.wline span.last { color: var(--sand); }
.wsub { color: #c7d6d8; max-width: 58ch; margin-top: 26px; font-size: 17px; }
.js .words { height: 260vh; padding-block: 0; }
.js .pin2 { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.js .wline span { color: rgba(255, 255, 255, .16); }
.js .wline span.lit { color: #fff; }
.js .wline span.last.lit { color: var(--sand); }

.stats { background: var(--ink); color: #fff; padding-block: 30px 110px; }
.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.stat b { display: block; font: 700 clamp(64px, 11vw, 150px)/.95 var(--display); letter-spacing: -.05em; color: var(--sand); }
.stat span { display: block; color: #c7d6d8; margin-top: 12px; max-width: 26ch; }
.js .reveal { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .statgrid .reveal:nth-child(2) { transition-delay: .12s; }
.js .statgrid .reveal:nth-child(3) { transition-delay: .24s; }

section { padding-block: 72px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.steps li { background: var(--card); border: 1px solid var(--line2); border-radius: 30px; padding: 8px 15px; font: 600 14px/1.2 var(--display); display: flex; align-items: center; gap: 9px; }
.steps li::after { content: "→"; color: var(--ink3); font-weight: 400; margin-right: -4px; }
.steps li:last-child::after { content: none; }
.steps li:last-child { background: var(--ink); color: #fff; border-color: var(--ink); }

.feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 34px; border-top: 1px solid var(--line2); }
.feat div { padding: 24px 22px 26px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.feat div:not(:nth-child(3n+1)) { padding-left: 22px; border-left: 1px solid var(--line2); }
.feat p { color: var(--ink2); margin-top: 8px; font-size: 15px; }

.band { background: var(--card); border-block: 1px solid var(--line); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 34px; counter-reset: s; padding: 0; list-style: none; }
.how li { counter-increment: s; min-width: 0; }
.how li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--petrol); font: 700 16px/1 var(--display); margin-bottom: 14px; }
.how p { color: var(--ink2); margin-top: 8px; font-size: 15px; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plan.main { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan .who { font-size: 14px; color: var(--ink3); }
.plan.main .who { color: #b3c6c8; }
.price { font: 700 34px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { display: block; font: 400 13.5px/1.4 var(--body); letter-spacing: 0; color: var(--ink3); margin-top: 7px; }
.plan.main .price small { color: #b3c6c8; }
.plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; flex: 1; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 5px; border-left: 2px solid var(--petrol-lt); border-bottom: 2px solid var(--petrol-lt); transform: rotate(-45deg); }
.plan.main li::before { border-color: var(--sand); }
.plan .btn { text-align: center; margin-top: 6px; }
.fine { font-size: 13px; color: var(--ink3); margin-top: 18px; }

.tuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.tut { display: block; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; text-decoration: none; color: var(--ink); min-width: 0; }
.tut:hover { border-color: var(--petrol); }
.tut span { font: 600 12px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink3); }
.tut h3 { margin: 10px 0 6px; }
.tut p { color: var(--ink2); font-size: 14.5px; }

.faq { max-width: 760px; margin-top: 26px; }
.faq details { border-bottom: 1px solid var(--line2); padding: 16px 0; }
.faq summary { font: 600 17px/1.3 var(--display); cursor: pointer; }
.faq p { color: var(--ink2); margin-top: 10px; max-width: 65ch; }

.contact { background: var(--ink); color: #fff; }
.contact h2 { max-width: 20ch; }
.contact .lede { color: #c7d6d8; }
.addr { display: inline-block; margin-top: 22px; font: 600 20px/1.3 var(--display); color: var(--sand); user-select: all; overflow-wrap: anywhere; }
footer { background: #08191b; color: #9fb3b6; font-size: 13.5px; }
footer .in { padding-block: 26px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: #c7d6d8; }

/* tutorials page */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 48px 80px; align-items: start; }
.toc { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.toc a { color: var(--ink2); text-decoration: none; }
.toc a:hover { color: var(--petrol); }
.doc article { min-width: 0; }
.doc article section { padding-block: 0 44px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 12px; }
.doc article > p { margin-bottom: 40px; }
.doc h2 { font-size: 26px; margin-bottom: 12px; scroll-margin-top: 20px; }
.doc p, .doc li { color: var(--ink2); max-width: 68ch; }
.doc p + p, .doc ol, .doc ul, .doc .tw, .doc pre { margin-top: 12px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc b { color: var(--ink); }
code { font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #ece9e1; padding: 1px 5px; border-radius: 4px; }
pre { background: var(--ink); color: #dfe9ea; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.tw { overflow-x: auto; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px/1.3 var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); background: #f0eee8; }
tr:last-child td { border-bottom: 0; }
.chip { display: inline-block; font: 600 12.5px/1.5 var(--body); padding: 0 8px; border-radius: 20px; }
.chip.good { color: var(--good); background: var(--good-bg); } .chip.warn { color: var(--warn); background: var(--warn-bg); } .chip.bad { color: var(--bad); background: var(--bad-bg); }
.note { background: var(--tint); border-radius: 10px; padding: 12px 14px; margin-top: 14px; color: var(--ink); font-size: 14.5px; max-width: 68ch; }

@media (max-width: 900px) {
  .feat, .how, .plans, .tuts { grid-template-columns: minmax(0, 1fr); }
  .statgrid { grid-template-columns: minmax(0, 1fr); }
  .js .glow { width: 62vw; }
  .top nav a:not(.btn) { display: none; }
  .top nav { margin-left: auto; }
  .top .in { flex-wrap: nowrap; }
  .js .caps { top: 64px; height: 200px; }
  .js .shot { top: 282px; }
  .shot .bar b { display: none; }
  .feat div, .feat div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  section { padding-block: 52px; }
  .top nav { gap: 14px; margin-left: 0; }
}
