/* CleanMargin by MARGINOVA - landing preview. Own CSS only, system fonts, 8px spacing scale. */
:root {
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --on-accent: #ffffff;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --warn-bg: #fef3c7;
  --warn-text: #78350f;
  --ok-bg: #ccfbf1;
  --ok-text: #115e59;
  --neg: #b42318;
  --focus: #0f766e;
  --header-bg: rgba(248, 250, 252, 0.82);
  --mesh-a: rgba(15, 118, 110, 0.16);
  --mesh-b: rgba(14, 116, 144, 0.1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --section-pad: clamp(56px, 8vw, 96px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1215;
    --bg-alt: #0f191d;
    --surface: #131f24;
    --text: #e6edf0;
    --muted: #a3b2b9;
    --line: #25353b;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --on-accent: #04201d;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --warn-bg: #3a2d0f;
    --warn-text: #fcd34d;
    --ok-bg: #12352f;
    --ok-text: #99f6e4;
    --neg: #fca5a5;
    --focus: #5eead4;
    --header-bg: rgba(11, 18, 21, 0.8);
    --mesh-a: rgba(45, 212, 191, 0.14);
    --mesh-b: rgba(56, 189, 248, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s2); }
.narrow { max-width: 760px; }
section { padding: var(--section-pad) 0; }
.alt { background: var(--bg-alt); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--s2); }
h1 { font-size: clamp(2.125rem, 1.2rem + 3.4vw, 3.5rem); letter-spacing: -0.03em; font-weight: 750; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s2); }
.lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); color: var(--muted); max-width: 58ch; }
.sub { color: var(--muted); max-width: 62ch; margin-bottom: var(--s4); }
.small { font-size: 0.9375rem; color: var(--muted); }
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}
.skip { position: absolute; left: var(--s2); top: -64px; background: var(--surface); color: var(--text); padding: var(--s1) 12px; border: 2px solid var(--accent); border-radius: 8px; z-index: 30; }
.skip:focus { top: var(--s1); }

/* Header: constant height; only colors/blur change after scroll */
.site-header { position: sticky; top: 0; z-index: 20; height: 64px; border-bottom: 1px solid transparent; transition: background-color .2s, border-color .2s; }
.site-header.is-scrolled { background: var(--header-bg); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); height: 64px; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; color: var(--text); text-decoration: none; border-radius: 6px; }
.wm-name { font-weight: 750; font-size: 1.1875rem; letter-spacing: -0.02em; }
.wm-name span { color: var(--accent); }
.wm-by { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav-list { display: flex; gap: 0 var(--s3); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 6px 2px; transition: color .15s; }
.nav-list a:not(.btn):hover { color: var(--text); }
@media (max-width: 860px) { .nav-list li:not(:last-child) { display: none; } }

/* Buttons */
.btn { position: relative; display: inline-block; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; line-height: 1.4; padding: 12px 24px; border-radius: 10px; border: 2px solid var(--accent); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(0.98); box-shadow: var(--shadow-sm); }
.btn-small { padding: 6px 16px; font-size: 0.9375rem; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: var(--s4) 0 var(--s2); }
.note { font-size: 0.9375rem; color: var(--muted); }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 7vw, 88px) 0 var(--section-pad); margin-top: -64px; padding-top: calc(64px + clamp(40px, 7vw, 80px)); }
.hero::before { content: ""; position: absolute; inset: -15%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 22%, var(--mesh-a), transparent 70%),
    radial-gradient(34% 38% at 82% 14%, var(--mesh-b), transparent 70%),
    radial-gradient(40% 40% at 70% 85%, var(--mesh-a), transparent 72%);
  will-change: transform; animation: drift 48s ease-in-out infinite alternate; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s6); } }
.hero h1 { max-width: 18ch; }

/* Product mock window */
.hero-visual .tag { margin-bottom: 12px; }
.app { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.app-bar { display: flex; align-items: center; gap: 6px; padding: 12px var(--s2); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); box-shadow: inset 0 0 0 1px var(--muted); opacity: .6; }
.app-title { margin-left: var(--s1); font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.app-body { padding: var(--s2); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); }
.kpi { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 12px var(--s2); min-width: 0; }
.kpi-label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); }
.kpi-val { display: block; min-width: 7.5ch; margin-top: 4px; font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-val span { display: inline-block; min-width: 1ch; }
.neg { color: var(--neg); }
.sites { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.sites li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 12px 4px; border-top: 1px solid var(--line); }
.site-name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.site-name small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.site-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Hero stagger entrance: only when JS is present (content visible otherwise) */
.js .hero-in { animation: rise .7s var(--ease) both; }
.hero-copy > .hero-in:nth-child(1) { animation-delay: 0ms; }
.hero-copy > .hero-in:nth-child(2) { animation-delay: 90ms; }
.hero-copy > .hero-in:nth-child(3) { animation-delay: 180ms; }
.hero-copy > .hero-in:nth-child(4) { animation-delay: 270ms; }
.hero-copy > .hero-in:nth-child(5) { animation-delay: 360ms; }
.hero-visual.hero-in { animation-delay: 300ms; }

/* Scroll reveal: hidden state exists only under .js */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

.steps { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s3); box-shadow: var(--shadow-sm); }
.step-n { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 12px; }
.steps p { margin: 0; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--s6); } }
.two-col > * { min-width: 0; }

.ticks { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Cards: hover elevation via transform + shadow only */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s3); margin: 0; box-shadow: var(--shadow-sm); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid .card, .steps li { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.grid .card:hover, .steps li:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.grid .card:focus-within, .steps li:focus-within, .card:focus-visible { box-shadow: 0 0 0 3px var(--focus); }
.grid .card p { margin: 0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--muted); border: 1px dashed var(--muted); border-radius: 999px; padding: 2px 12px; margin-bottom: var(--s2); }
.cap { margin: 12px 0 0; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.num th:not(:first-child), table.num td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody th { font-weight: 600; }
.flag { background: var(--warn-bg); color: var(--warn-text); }
.flag th, .flag td { color: var(--warn-text); }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-text); }
.pill.ask { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-text); }

/* FAQ: layout of siblings is identical open/closed except the opened panel itself */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: border-color .2s; }
details[open] { border-color: var(--accent); }
summary { position: relative; cursor: pointer; font-weight: 600; padding: var(--s2) 52px var(--s2) var(--s3); list-style: none; border-radius: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: var(--s3); top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s var(--ease); }
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { padding: 0 var(--s3); margin: 0 0 var(--s2); color: var(--muted); }
details[open] p { animation: fade-in .3s var(--ease) both; }

.cta { background: var(--bg-alt); }
.contact p:last-child { margin-bottom: 0; }

.site-footer { border-top: 1px solid var(--line); padding: var(--s4) 0; font-size: 0.9375rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); }
.footer-inner p { margin: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.06); } }

/* Reduced motion: no animation or transform transitions; opacity fades <= 150ms only */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:active, .grid .card:hover, .steps li:hover { transform: none; }
}

@media print { .site-header, .cta { display: none; } .js .reveal { opacity: 1; transform: none; } .hero { margin-top: 0; padding-top: var(--s5); } }
