/* =========================================================
   NecroTube — "Mag-Scanner"
   Layout: centered product stage, then a session timeline
   (text | signal rail | phone) that alternates sides.
   Pure black, signal green from the app UI, red only for REC.
   ========================================================= */
:root {
  --bg: #000000;
  --bg-2: #060807;
  --surface: #0b0e0c;
  --surface-2: #111513;
  --line: rgba(205, 255, 228, 0.08);
  --line-strong: rgba(205, 255, 228, 0.16);
  --ink: #f2f5f3;
  --text: #c6cec9;
  --muted: #7d8882;
  --accent: #1fe58b;
  --accent-deep: #00b862;
  --accent-glow: rgba(31, 229, 139, 0.35);
  --rec: #ff3b30;
  --radius: 16px;
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  --wrap: 1200px;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img.brand-icon { width: 36px; height: 36px; border-radius: 9px; }
.brand img.brand-word { height: 24px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; transition: color .18s, background .18s; }
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { content: ""; display: block; height: 2px; background: var(--accent); margin-top: 2px; border-radius: 2px; box-shadow: 0 0 8px var(--accent-glow); }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d8882' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 28px 7px 10px; font-size: 13px; color: var(--text); cursor: pointer; max-width: 150px;
}
[dir="rtl"] .lang-select { background-position: left 10px center; padding: 7px 10px 7px 28px; }
.nav-links .btn-nav, .btn-nav {
  text-decoration: none; font-weight: 800; font-size: 14px; color: #00170b; background: var(--accent);
  padding: 9px 16px; border-radius: 9px; white-space: nowrap; box-shadow: 0 0 24px -6px var(--accent-glow);
  transition: transform .15s ease-out, background .15s;
}
.nav-links .btn-nav:hover, .btn-nav:hover { background: #4ff0a6; color: #00170b; }
.btn-nav:active { transform: scale(.97); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; width: 42px; height: 40px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; transition: transform .2s, opacity .2s; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .site-header .wrap { gap: 12px; }
  .nav-toggle { display: block; margin-inline-start: auto; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(3, 4, 3, 0.98); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; margin: 0;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .menu-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px; font-size: 16px; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { background: rgba(31,229,139,.08); }
  .lang-select { max-width: none; width: 100%; padding-block: 10px; }
  .btn-nav { text-align: center; padding: 12px; }
}

/* ---------- Shared bits ---------- */
.mono { font-family: var(--mono); }
.scanner {
  display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
}
.scanner i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.section-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.section-title { font-family: var(--display); font-weight: 900; font-stretch: 112%; text-transform: uppercase; font-size: clamp(34px, 5.4vw, 64px); line-height: .94; letter-spacing: -.01em; }
.lead { font-size: clamp(16px, 1.5vw, 18px); color: var(--text); max-width: 58ch; }
.muted { color: var(--muted); }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); flex-shrink: 0; animation: recpulse 2.4s infinite; }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }

/* ---------- Store badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px; min-width: 200px; padding: 11px 22px 11px 16px; border-radius: 14px;
  text-decoration: none; background: #000; border: 1px solid rgba(242,245,243,.3); color: #fff;
  transition: transform .15s ease-out, border-color .18s, box-shadow .18s;
}
.badge:hover { border-color: var(--ink); }
.badge:active { transform: scale(.97); }
.badge svg { width: 28px; height: 28px; flex-shrink: 0; }
.badge .b-text { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.badge small { font-size: 11px; color: #d6dbd8; }
.badge strong { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.badge.primary { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(31,229,139,.2), 0 0 34px -10px var(--accent-glow); }
.badge.primary:hover { box-shadow: 0 0 0 1px rgba(31,229,139,.4), 0 0 44px -8px var(--accent-glow); }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding-top: clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 40% at 50% 78%, rgba(31,229,139,.20), transparent 70%), radial-gradient(40% 30% at 50% 0%, rgba(255,255,255,.05), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .35; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px);
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero h1 { width: 100%; font-family: var(--display); text-transform: uppercase; margin: 22px 0 18px; line-height: .86; letter-spacing: -.02em; }
.hero h1 .l1 { display: block; white-space: nowrap; font-weight: 900; font-stretch: 118%; font-size: clamp(28px, 9vw, 150px); text-shadow: 0 0 60px rgba(31,229,139,.18); }
.hero h1 .l2 { display: block; font-weight: 800; font-stretch: 108%; font-size: clamp(22px, 5vw, 72px); margin-top: .12em; color: var(--ink); }
.hero h1 .l2 em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px var(--accent-glow); }
.hero .lead { margin: 0 auto 30px; color: var(--muted); }
.hero .badges { justify-content: center; }
.hero-note { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.hero-stage { position: relative; margin-top: clamp(20px, 4vw, 40px); }
.hero-stage canvas { position: absolute; left: 0; right: 0; width: 100%; top: 40%; height: 46%; z-index: 0; pointer-events: none; }
.hero-stage img { position: relative; z-index: 1; width: min(94%, 640px); margin-inline: auto; height: auto; filter: drop-shadow(0 40px 80px rgba(0,0,0,.8)); }
.readout {
  position: absolute; z-index: 2; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: start;
  border: 1px solid var(--line-strong); background: rgba(0,0,0,.7); backdrop-filter: blur(6px); border-radius: 10px; padding: 10px 14px; display: grid; gap: 2px;
}
.readout b { color: var(--accent); font-size: 18px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
.readout.r1 { top: 18%; inset-inline-start: max(16px, 6%); }
.readout.r2 { top: 36%; inset-inline-end: max(16px, 6%); }
.readout.r2 .row { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .readout { display: none; } }

/* Words ticker */
.ticker { position: relative; z-index: 4; border-block: 1px solid var(--line-strong); background: #020302; display: flex; align-items: stretch; overflow: hidden; }
.ticker-label { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); background: #020302; border-inline-end: 1px solid var(--line-strong); z-index: 1; }
.ticker-track { display: flex; width: max-content; animation: tick 60s linear infinite; }
[dir="rtl"] .ticker-track { animation-direction: reverse; }
.ticker-track span { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 22px; white-space: nowrap; }
.ticker-track span b { color: var(--accent); font-weight: 500; margin-inline-start: 8px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Session timeline ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.flow-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 80px); }
.flow-head .lead { margin: 18px auto 0; color: var(--muted); }
.steps { position: relative; display: grid; gap: clamp(40px, 5vw, 64px); }
.step { display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); align-items: center; }
.step .copy { grid-column: 1; grid-row: 1; max-width: 480px; justify-self: end; }
.step .rail { grid-column: 2; grid-row: 1; align-self: stretch; position: relative; }
.step .shot { grid-column: 3; grid-row: 1; position: relative; justify-self: start; }
.step:nth-child(even) .copy { grid-column: 3; justify-self: start; }
.step:nth-child(even) .shot { grid-column: 1; justify-self: end; }
.rail::before { content: ""; position: absolute; left: 50%; top: -60%; bottom: -60%; width: 1px; background: linear-gradient(transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent); }
.step:first-child .rail::before { top: 50%; }
.step:last-child .rail::before { bottom: 50%; }
.rail .node { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(31,229,139,.12), 0 0 18px var(--accent); }
.rail time { position: absolute; left: 50%; top: calc(50% + 18px); transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.step .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; display: flex; gap: 10px; align-items: center; }
.step .kicker span { color: var(--muted); }
.step h3 { font-family: var(--display); font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(36px, 5vw, 66px); line-height: .9; letter-spacing: -.015em; margin-bottom: 18px; }
.step p { margin: 0 0 20px; color: var(--text); font-size: 17px; }
.specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.specs li { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--text); padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-2); }
.shot::before { content: ""; position: absolute; inset: 15% 10%; z-index: 0; background: radial-gradient(closest-side, rgba(31,229,139,.22), transparent); filter: blur(10px); }
.shot img { position: relative; z-index: 1; width: min(100%, 400px); height: auto; }
.disclaimer { margin: clamp(56px, 7vw, 90px) auto 0; max-width: 720px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .step .copy, .step:nth-child(even) .copy { grid-column: 1; grid-row: 1; justify-self: stretch; max-width: none; }
  .step .shot, .step:nth-child(even) .shot { grid-column: 1; grid-row: 2; justify-self: center; }
  .step .rail { display: none; }
  .shot img { width: min(88vw, 400px); }
}

/* ---------- Explore / gear panels ---------- */
.panels { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
.panel { position: relative; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; padding: clamp(28px, 4vw, 44px); background: var(--surface); min-height: 400px; display: flex; flex-direction: column; justify-content: flex-end; }
.panel h2 { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: clamp(30px, 3.6vw, 44px); text-transform: uppercase; line-height: .95; margin-bottom: 12px; max-width: 16ch; }
.panel p { color: var(--muted); max-width: 46ch; margin: 0 0 24px; }
.panel .content { position: relative; z-index: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--ink); background: rgba(255,255,255,.03);
  transition: border-color .18s, background .18s, transform .15s;
}
.btn:hover { border-color: var(--accent); background: rgba(31,229,139,.08); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
.panel-atlas .radar { position: absolute; inset: 0; z-index: 0; }
.panel-atlas .radar svg { position: absolute; top: -12%; inset-inline-end: -10%; width: 76%; max-width: 520px; }
.panel-atlas::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, var(--surface) 32%, transparent 85%); }
.sweep { transform-origin: 200px 200px; animation: sweep 6s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.blip { animation: blipfade 6s infinite; }
@keyframes blipfade { 0%, 100% { opacity: .15; } 8% { opacity: 1; } 40% { opacity: .35; } }
.panel-gear { background: radial-gradient(80% 60% at 85% 0%, rgba(31,229,139,.12), transparent 70%), var(--surface); }
.gear-icons { display: flex; gap: 10px; margin-bottom: auto; padding-bottom: 32px; flex-wrap: wrap; }
.gear-icons span { width: 54px; height: 54px; border-radius: 14px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--accent); background: rgba(0,0,0,.35); }
.gear-icons svg { width: 24px; height: 24px; }
@media (max-width: 860px) { .panels { grid-template-columns: minmax(0, 1fr); } .panel { min-height: 340px; } }

/* ---------- Final CTA ---------- */
.final { text-align: center; padding-block: clamp(80px, 11vw, 150px); position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 55% at 50% 100%, rgba(31,229,139,.18), transparent 70%); pointer-events: none; }
.final img.final-icon { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 0 0 1px var(--line-strong), 0 20px 60px -20px var(--accent-glow); }
.final h2 { font-family: var(--display); font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(36px, 6.4vw, 84px); line-height: .92; margin: 0 auto 16px; max-width: 14ch; position: relative; }
.final p { color: var(--muted); margin: 0 auto 34px; position: relative; }
.final .badges { justify-content: center; position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: #000; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; font-weight: 500; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-grid a { text-decoration: none; color: var(--muted); transition: color .15s; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand img { height: 24px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); margin: 0 0 18px; max-width: 34ch; }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: #5c6560; font-size: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.nf .code { font-family: var(--display); font-weight: 900; font-stretch: 120%; font-size: clamp(110px, 20vw, 210px); line-height: .85; color: transparent; -webkit-text-stroke: 1.5px var(--accent); text-shadow: 0 0 40px rgba(31,229,139,.25); }
.nf h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 40px; margin: 12px 0 8px; }
.nf p { color: var(--muted); margin: 0 0 28px; }

/* Official store badges */
.store-badge { display: inline-block; border-radius: 14px; transition: transform .15s ease-out, box-shadow .2s; }
.store-badge img { height: 56px; width: auto; display: block; }
.store-badge:hover { box-shadow: 0 0 0 1px rgba(31,229,139,.55), 0 0 30px -6px var(--accent-glow); }
.store-badge:active { transform: scale(.97); }
@media (max-width: 420px) { .store-badge img { height: 50px; } }

/* App Store "coming soon" state */
.store-badge.is-soon { position: relative; cursor: pointer; }
.store-badge .soon-tag {
  position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; padding: 0 10px;
  background: #000; border: 1px solid var(--accent); color: var(--accent); box-shadow: 0 0 24px -6px var(--accent-glow);
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; line-height: 1.2;
  opacity: 0; transform: scale(.96); transition: opacity .2s, transform .2s; pointer-events: none;
}
.store-badge.show-soon .soon-tag { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .hero h1 .l1 { font-stretch: 100%; }
  .hero h1 .l2 { font-stretch: 100%; }
}
