/* Estimatix — dark theme, detection-box motif */
:root {
  --bg: #0b0f14;
  --bg-2: #10161e;
  --panel: #131b24;
  --line: #1f2a36;
  --text: #e6edf3;
  --muted: #8b98a5;
  --green: #3fe08f;
  --cyan: #4cc9f0;
  --magenta: #ff4fa3;
  --amber: #ffc857;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 17px;
  color: var(--text); letter-spacing: 0.04em;
}
.logo:hover { text-decoration: none; }
.logo .dot { color: var(--green); }
.nav { display: flex; gap: 28px; align-items: center; }
.sysline {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--muted); white-space: nowrap;
}
@media (max-width: 980px) { .sysline { display: none; } }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-block;
  background: var(--green); color: #06130c;
  font-weight: 700; font-size: 15px;
  padding: 12px 24px; border: none; border-radius: 6px;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(63, 224, 143, 0.25); text-decoration: none; }
.btn.small { padding: 8px 18px; font-size: 14px; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; background: var(--bg);
}
.cam {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 40%, #17222e 0%, #0d141c 70%);
}
.cam video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.cam::after { /* scanlines */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.18) 3px 4px);
  pointer-events: none;
}
.cam-label {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono); font-size: 11px; color: rgba(230,237,243,0.55);
  letter-spacing: 0.1em; z-index: 3;
}
.cam-note {
  position: absolute; bottom: 12px; right: 14px;
  font-family: var(--mono); font-size: 10px; color: rgba(139,152,165,0.45);
  z-index: 3;
}
.rec { color: var(--magenta); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* detection boxes */
.dbox {
  position: absolute; border: 1.5px solid var(--green);
  z-index: 2; animation: drift 7s ease-in-out infinite alternate;
}
.dbox .tag {
  position: absolute; top: -20px; left: -1.5px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1;
  padding: 4px 6px; white-space: nowrap;
  background: var(--green); color: #06130c; font-weight: 700;
}
.dbox.cyan { border-color: var(--cyan); }
.dbox.cyan .tag { background: var(--cyan); color: #051318; }
.dbox.magenta { border-color: var(--magenta); }
.dbox.magenta .tag { background: var(--magenta); color: #1a0510; }
.dbox.amber { border-color: var(--amber); }
.dbox.amber .tag { background: var(--amber); color: #191204; }
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(14px, 8px); }
}
.dbox.slow { animation-duration: 11s; }
.dbox.fast { animation-duration: 5s; }

.hero-overlay {
  position: relative; z-index: 5; text-align: center;
  padding: 120px 24px 80px;
  background: radial-gradient(ellipse at center, rgba(11,15,20,0.93) 0%, rgba(11,15,20,0.72) 55%, rgba(11,15,20,0.25) 85%, transparent 100%);
}
.hero h1, .hero .sub { text-shadow: 0 2px 24px rgba(11,15,20,0.9); }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 52px); font-weight: 800; line-height: 1.18;
  letter-spacing: 0; max-width: 960px; margin: 0 auto 22px;
}
.hero h1 .accent { color: var(--green); }
.hero .sub {
  font-size: clamp(16px, 1.6vw, 20px); color: var(--muted);
  max-width: 680px; margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
section.alt { background: var(--bg-2); }

.sec-label {
  display: inline-block; position: relative;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green);
  padding: 6px 12px; margin-bottom: 20px;
  border: 1px solid rgba(63, 224, 143, 0.35);
}
.sec-label::before, .sec-label::after {
  content: ""; position: absolute; width: 7px; height: 7px;
}
.sec-label::before { top: -1px; left: -1px; border-top: 2px solid var(--green); border-left: 2px solid var(--green); }
.sec-label::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--green); border-right: 2px solid var(--green); }

h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.7vw, 33px); font-weight: 700; letter-spacing: 0;
  line-height: 1.28; max-width: 820px; margin-bottom: 16px;
}
.lead { color: var(--muted); font-size: 18px; max-width: 720px; margin-bottom: 40px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .k {
  font-family: var(--mono); font-size: 11px; color: var(--magenta);
  letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 14px;
}

/* scenes (section 2 — pains as camera frames) */
.scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.scene {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background: radial-gradient(ellipse at 35% 45%, #1a2634 0%, #0e151d 75%);
}
.scene video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.scene::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,15,20,0.1) 40%, rgba(11,15,20,0.75) 100%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.15) 3px 4px);
  pointer-events: none;
}
.scene.night { background: radial-gradient(ellipse at 45% 40%, #0f1722 0%, #080c11 80%); }
.scene .phrase {
  position: absolute; left: 20px; bottom: 18px; right: 110px; z-index: 3;
  font-size: clamp(17px, 1.9vw, 23px); font-weight: 800; line-height: 1.25;
  letter-spacing: -0.01em;
}
.scene .tc {
  position: absolute; right: 16px; bottom: 18px; z-index: 3;
  font-family: var(--mono); font-size: 11px; color: rgba(139,152,165,0.6);
}
.scene .cam-note { bottom: auto; top: 12px; right: 14px; }

/* cycle (section 3) */
.cycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.cycle .step {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 26px; position: relative;
}
.cycle .step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--cyan);
  display: block; margin-bottom: 12px;
}
.cycle .step h3 { font-size: 17px; margin-bottom: 8px; }
.cycle .step p { color: var(--muted); font-size: 15px; }

/* markers (section 4) */
.marker-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 32px; }
.mgroup {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--panel);
}
.mgroup .thumb {
  height: 150px; position: relative;
  background: radial-gradient(ellipse at 40% 50%, #182430 0%, #0e151d 75%);
}
.mgroup .thumb .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: rgba(139,152,165,0.5);
}
.mgroup .body { padding: 22px; }
.mgroup h3 { font-size: 17px; margin-bottom: 10px; }
.mgroup ul { list-style: none; }
.mgroup li { color: var(--muted); font-size: 15px; padding: 3px 0 3px 18px; position: relative; }
.mgroup li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border: 1.5px solid var(--green);
}
.plate {
  background: var(--panel); border: 1px dashed var(--line); border-radius: 10px;
  padding: 24px 28px; color: var(--muted); font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

/* two-col (section 5) */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.role-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 30px;
}
.role-card .who {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block;
}
.role-card p { color: var(--muted); font-size: 15.5px; }
.role-card .shot {
  margin-top: 20px; height: 160px; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: rgba(139,152,165,0.5);
}

/* cases */
.case-card { display: flex; flex-direction: column; gap: 8px; }
.case-card .num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--green); }

/* trust + form */
.demo-box {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start;
}
.form {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px;
}
.form label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
.form label:first-child { margin-top: 0; }
.form input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font-size: 16px; padding: 12px 14px; font-family: var(--sans);
}
.form input:focus { outline: none; border-color: var(--green); }
.form .btn { width: 100%; margin-top: 24px; }
.form .ok { color: var(--green); font-size: 15px; margin-top: 16px; display: none; }

.trust-row {
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.trust-row span { display: flex; align-items: center; gap: 8px; }

/* footer */
footer {
  border-top: 1px solid var(--line); padding: 40px 0 60px;
  color: var(--muted); font-size: 14px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* visitor detection box (hero, desktop only) */
#visitor-box {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 90px; height: 90px;
  border: 1.5px solid var(--green);
  pointer-events: none; opacity: 0;
  transition: opacity 0.35s;
}
#visitor-box .vtag {
  position: absolute; top: -20px; left: -1.5px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1;
  padding: 4px 6px; white-space: nowrap;
  background: var(--green); color: #06130c; font-weight: 700;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.on { opacity: 1; transform: none; }

/* stub pages */
.stub { min-height: 70vh; display: flex; align-items: center; padding-top: 64px; }
.stub .inner { max-width: 640px; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); }
  .cam:nth-child(n+3) { display: none; }
  .hero-grid { grid-template-rows: 1fr 1fr; }
  .two-col, .demo-box, .scenes { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
}
