/* =========================================================================
   VeriTrust Access — Base, layout, navigation, hero
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient page glow — fixed, behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% -5%, rgba(46,123,255,0.16), transparent 60%),
    radial-gradient(700px 500px at 0% 12%, rgba(63,216,255,0.06), transparent 55%),
    radial-gradient(1000px 700px at 50% 120%, rgba(46,123,255,0.10), transparent 60%);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-0); line-height: var(--lh-snug); font-weight: 600; letter-spacing: -0.02em; }

::selection { background: var(--accent); color: #fff; }

/* ---- Shell ---- */
.shell { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }

section { position: relative; }
.section-pad { padding-block: clamp(72px, 9vw, 140px); }

/* ---- Eyebrow / section heading ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.section-head { max-width: 760px; margin-inline: auto; text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { font-size: var(--fs-3xl); margin-bottom: 16px; }
.section-head p { font-size: var(--fs-lg); color: var(--text-2); max-width: 600px; margin-inline: auto; }
.section-head.left { text-align: left; margin-inline: 0; }
.section-head.left .eyebrow::before { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm);
  padding: 13px 22px; border-radius: var(--r-pill);
  white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out), background var(--dur-fast);
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 28px -8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 16px 40px -8px var(--accent-glow); transform: translateY(-2px); }
.btn-primary .arrow { transition: transform var(--dur-mid) var(--ease-out); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text-0);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: var(--line-accent); transform: translateY(-2px); }

.btn-lg { padding: 16px 30px; font-size: var(--fs-base); }
.btn-block { width: 100%; }

/* ---- Top navigation ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background var(--dur-mid), border-color var(--dur-mid), backdrop-filter var(--dur-mid);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7,11,20,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.logo-img { height: 38px; width: auto; display: block; flex: 0 0 auto; max-width: none; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45)); }
.foot-brand .logo-img { height: 42px; filter: none; }
@media (max-width: 560px) { .logo-img { height: 30px; } }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(155deg, var(--accent-bright), var(--accent-deep));
  box-shadow: 0 6px 18px -6px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; color: var(--text-0); letter-spacing: 0.01em; }
.logo-text span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.34em; color: var(--text-2); margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-2);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover { color: var(--text-0); background: rgba(255,255,255,0.04); }
.nav-link .chev { width: 13px; height: 13px; opacity: 0.6; transition: transform var(--dur-fast); }
.nav-link:hover .chev { transform: translateY(1px); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); font-size: var(--fs-micro); font-weight: 600; color: var(--text-1);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.lang-toggle:hover { border-color: var(--line-accent); background: rgba(255,255,255,0.03); }
.lang-toggle svg { width: 15px; height: 15px; opacity: 0.7; }
.lang-toggle .lang-cur { color: var(--accent-bright); }

.link-quiet { padding: 9px 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); border-radius: var(--r-sm); }
.link-quiet:hover { color: var(--text-0); }

.nav-burger { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); place-items: center; }
.nav-burger svg { width: 20px; height: 20px; }

/* =========================================================================
   SECTION 1 — HERO (cinematic, scroll-driven)
   ========================================================================= */
.hero { position: relative; padding-top: var(--nav-h); }
/* tall scroll track that drives the pinned stage */
.hero-track { position: relative; height: 240vh; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; min-height: 660px;
  display: grid; align-items: center;
  overflow: hidden;
}
.hero-grid {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

/* --- Hero copy (left) --- */
.hero-copy { position: relative; z-index: 5; max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03);
  font-size: var(--fs-micro); color: var(--text-1); margin-bottom: 26px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero-badge b { color: var(--text-0); font-weight: 700; }
.hero h1 {
  font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  color: var(--text-0); margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-bright), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: var(--fs-lg); color: var(--text-2); max-width: 480px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.hero-trust .item { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-micro); color: var(--text-2); font-weight: 500; }
.hero-trust svg { width: 17px; height: 17px; color: var(--accent-bright); }

/* --- Hero scene (right): residence + gate + glass phone --- */
.hero-scene {
  position: relative; z-index: 3;
  aspect-ratio: 4 / 5; width: 100%; max-width: 540px; margin-inline: auto;
  border-radius: var(--r-2xl);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #060912;
}
.hero-residence { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-residence::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(6,9,18,0.25), rgba(6,9,18,0.55) 55%, rgba(6,9,18,0.92));
}
.scene-night-tint {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 120%, rgba(46,123,255,0.22), transparent 60%);
  mix-blend-mode: screen;
}

/* Gate: post + pivoting barrier */
.gate { position: absolute; left: 8%; right: 8%; bottom: 22%; z-index: 4; height: 0; }
.gate-post {
  position: absolute; bottom: -2px; left: 0; width: 16px; height: 86px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2a3a55, #0d1626);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(0,0,0,0.5);
}
.gate-post::after { content: ""; position: absolute; top: 6px; left: 3px; right: 3px; height: 10px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); opacity: 0.85; }
.gate-barrier {
  position: absolute; bottom: 64px; left: 14px;
  width: min(78%, 360px); height: 11px; border-radius: 6px;
  transform-origin: left center;
  transform: rotate(calc(var(--gate, 0) * -72deg));
  transition: transform 0.1s linear;
  background: repeating-linear-gradient(90deg, #e8edf7 0 26px, #d23b3b 26px 52px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Glass phone overlay */
.hero-phone {
  position: absolute; z-index: 6;
  left: 50%; top: 50%;
  width: clamp(178px, 46%, 230px);
  transform: translate(-50%, -50%) scale(var(--phone, 1));
  transform-origin: center;
  transition: transform 0.1s linear;
}
.phone-body {
  position: relative; aspect-ratio: 200 / 412; border-radius: 30px;
  padding: 11px;
  background: linear-gradient(165deg, rgba(28,40,64,0.7), rgba(8,12,22,0.55));
  border: 1px solid rgba(160,190,255,0.28);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: 0 30px 70px -18px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.18), 0 0 0 1px rgba(0,0,0,0.4);
}
.phone-screen {
  height: 100%; border-radius: 21px; overflow: hidden;
  background: linear-gradient(180deg, #0a1426, #060b16);
  border: 1px solid rgba(160,190,255,0.1);
  display: flex; flex-direction: column;
  padding: 14px 13px;
  font-size: 11px;
}
.phone-notch { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 58px; height: 6px; border-radius: 3px; background: rgba(0,0,0,0.6); z-index: 2; }
.ph-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ph-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep)); flex: none; }
.ph-row { display: flex; flex-direction: column; gap: 3px; }
.ph-name { color: var(--text-0); font-weight: 700; font-size: 11px; }
.ph-stat { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 9.5px; font-weight: 600; }
.ph-stat svg { width: 11px; height: 11px; }
.ph-card { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 11px; margin-bottom: 11px; }
.ph-label { color: var(--text-2); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; }
.ph-val { color: var(--text-0); font-weight: 700; font-size: 12px; margin-top: 3px; }
.ph-check {
  margin: auto auto 8px; display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent-soft); border: 1.5px solid var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}
.ph-check svg { width: 30px; height: 30px; color: var(--accent-bright); }
.ph-check.flash { animation: checkPulse 1.6s var(--ease-out) infinite; }
@keyframes checkPulse { 0%,100% { box-shadow: 0 0 26px var(--accent-glow); } 50% { box-shadow: 0 0 50px var(--accent-glow); } }
.ph-status { text-align: center; margin-top: auto; }
.ph-status .big { color: var(--text-0); font-weight: 700; font-size: 13px; }
.ph-status .small { color: var(--text-2); font-size: 10px; margin-top: 3px; }

/* Light beam when gate opens */
.gate-beam {
  position: absolute; z-index: 3; left: 50%; bottom: 20%;
  width: 60%; height: 50%; transform: translateX(-50%);
  background: linear-gradient(0deg, var(--accent-glow), transparent 75%);
  filter: blur(26px);
  opacity: var(--beam, 0);
  transition: opacity 0.2s linear;
  pointer-events: none; border-radius: 50%;
}

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px; z-index: 8;
  font-size: var(--fs-micro); color: var(--text-2); letter-spacing: 0.04em;
  opacity: var(--hintOpacity, 1); transition: opacity var(--dur-mid);
}
.scroll-hint .mouse { width: 22px; height: 34px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; border-radius: 2px; background: var(--accent-bright); animation: scrollDot 1.6s var(--ease-in-out) infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 10px); } 100% { opacity: 0; } }

/* responsive hero */
@media (max-width: 900px) {
  .hero-track { height: auto; }
  .hero-stage { position: static; height: auto; min-height: 0; padding-block: 48px 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: none; }
  .hero-scene { max-width: 380px; }
  .scroll-hint { display: none; }
}
