/* Veil Cam — official site
   "Midnight Vault" design system, mirrored from the app's Theme.swift. */

:root {
  --bg: #0B0F17;
  --surface: #151B26;
  --surface-2: #1D2533;
  --stroke: #263042;

  --accent: #2EE6C5;
  --violet: #9D7BFF;
  --image: #8B7CFF;
  --amber: #FFB547;
  --pink: #FF7E9D;
  --periwinkle: #7C8AE0;
  --danger: #FF5C7A;

  --text: #F2F5FA;
  --text-2: #8A94A6;
  --text-3: #566074;

  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1120px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient glow fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(620px 420px at 78% -5%, rgba(46, 230, 197, 0.16), transparent 70%),
    radial-gradient(560px 460px at 12% 8%, rgba(157, 123, 255, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }

.serif { font-family: var(--serif); font-optical-sizing: auto; }
.italic { font-style: italic; }
.accent { color: var(--accent); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.lead { color: var(--text-2); font-size: clamp(16px, 1.3vw, 19px); }

/* ---------------- Header ---------------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(11, 15, 23, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
header.nav.scrolled { border-bottom-color: var(--stroke); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.brand .logo { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; transition: color 0.18s; }
.nav-links a:hover { color: var(--text); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 13px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #042019; box-shadow: 0 10px 30px -8px rgba(46, 230, 197, 0.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(46, 230, 197, 0.65); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--stroke); }
.btn-ghost:hover { border-color: var(--text-3); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 11px; }

/* App Store badge-ish button */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: #0B0F17;
  padding: 11px 20px 11px 18px; border-radius: 14px; font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(242, 245, 250, 0.4);
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(242, 245, 250, 0.5); }
.store-btn svg { width: 26px; height: 26px; }
.store-btn .store-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn .store-txt small { font-size: 11px; font-weight: 500; opacity: 0.7; }
.store-btn .store-txt span { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------------- Hero ---------------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); margin: 18px 0 22px; }
.hero h1 .accent { display: inline; }
.hero .lead { max-width: 30ch; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 20px; display: flex; align-items: center; gap: 9px; color: var(--text-3); font-size: 13.5px; }
.hero-note svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------------- Phone mockup ---------------- */
.phone-stage { display: flex; justify-content: center; perspective: 1600px; }
.phone {
  width: 300px; aspect-ratio: 300 / 620; border-radius: 48px;
  background: linear-gradient(180deg, #1a2130, #0d121b);
  padding: 11px; position: relative;
  box-shadow: 0 50px 90px -30px rgba(0,0,0,0.8), 0 0 0 2px rgba(255,255,255,0.04) inset, 0 0 0 1px var(--stroke);
  transform: rotateY(-13deg) rotateX(4deg) rotate(1deg);
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.phone:hover { transform: rotateY(-6deg) rotateX(2deg); }
.phone-screen {
  width: 100%; height: 100%; border-radius: 38px; background: var(--bg);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
}
.notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #05080d; border-radius: 16px; z-index: 5;
}
.scr-pad { padding: 44px 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.scr-title { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; }
.scr-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: var(--text-2); text-transform: uppercase; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--tint, var(--stroke)); padding: 16px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 7px; overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120px 120px at 20% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%);
}
.tile svg { width: 30px; height: 30px; color: var(--tint); position: relative; }
.tile .t-name { font-size: 12.5px; font-weight: 600; position: relative; }
.tile .t-sub { font-size: 9.5px; color: var(--text-2); position: relative; line-height: 1.3; }
.tile-wide { grid-column: span 2; flex-direction: row; justify-content: center; gap: 12px; padding: 14px; }
.tile-wide svg { width: 26px; height: 26px; }

/* ---------------- Sections ---------------- */
section { padding: clamp(60px, 9vw, 118px) 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(30px, 4.4vw, 50px); margin: 14px 0 16px; }
.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Feature cards (glass tiles) */
.modes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.card {
  position: relative; background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--radius-lg); padding: 28px; overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card.glow { border-color: color-mix(in srgb, var(--tint) 34%, transparent); }
.card.glow::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(240px 190px at 0% 0%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 72%);
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--tint, #000) 40%, #000); }
.card .badge {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 26%, transparent); margin-bottom: 18px; position: relative;
}
.card .badge svg { width: 26px; height: 26px; color: var(--tint); }
.card h3 { font-size: 20px; margin-bottom: 9px; position: relative; }
.card p { color: var(--text-2); font-size: 15px; position: relative; }

/* Split / privacy feature rows */
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feat {
  display: flex; gap: 16px; padding: 24px; background: var(--surface);
  border: 1px solid var(--stroke); border-radius: var(--radius-lg);
}
.feat .badge {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint, var(--accent)) 26%, transparent);
}
.feat .badge svg { width: 23px; height: 23px; color: var(--tint, var(--accent)); }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { color: var(--text-2); font-size: 14.5px; }

/* Privacy banner */
.privacy-banner {
  background: linear-gradient(135deg, rgba(46,230,197,0.08), rgba(157,123,255,0.06));
  border: 1px solid var(--stroke); border-radius: 26px; padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.privacy-banner .shield { width: 60px; height: 60px; color: var(--accent); margin: 0 auto 20px; }
.privacy-banner h2 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 16px; }
.privacy-banner p { color: var(--text-2); max-width: 54ch; margin: 0 auto 10px; font-size: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-lg);
  padding: 28px; position: relative;
}
.step .num {
  font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--accent);
  line-height: 1; margin-bottom: 14px; display: block;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 14.5px; }

/* Disguise icons strip */
.icon-strip { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 10px; }
.disguise {
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: 92px;
}
.disguise .glyph {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  border: 1px solid var(--stroke); background: var(--surface);
}
.disguise .glyph svg { width: 34px; height: 34px; }
.disguise span { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
details.qa {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: 16px;
  padding: 2px 22px; margin-bottom: 12px; transition: border-color 0.2s;
}
details.qa[open] { border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
details.qa summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 18px 0; font-weight: 600; font-size: 16.5px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary .chev { flex: none; width: 20px; height: 20px; color: var(--text-2); transition: transform 0.2s; }
details.qa[open] summary .chev { transform: rotate(90deg); color: var(--accent); }
details.qa .answer { padding: 0 0 20px; color: var(--text-2); font-size: 15px; }

/* CTA band */
.cta-band {
  text-align: center; background: var(--surface); border: 1px solid var(--stroke);
  border-radius: 28px; padding: clamp(40px, 6vw, 72px);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 300px at 50% -20%, rgba(46,230,197,0.16), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(30px, 4.6vw, 54px); margin-bottom: 18px; position: relative; }
.cta-band p { color: var(--text-2); max-width: 46ch; margin: 0 auto 30px; position: relative; }
.cta-band .hero-cta { justify-content: center; position: relative; }

/* ---------------- Footer ---------------- */
footer {
  border-top: 1px solid var(--stroke); padding: 54px 0 46px; margin-top: 40px;
}
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-3); font-size: 14px; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; font-weight: 700; }
.footer-col a { display: block; color: var(--text-2); font-size: 14.5px; margin-bottom: 10px; transition: color 0.18s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--stroke);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-3); font-size: 13.5px;
}

/* ---------------- Legal / content pages ---------------- */
.doc { padding: clamp(50px, 7vw, 90px) 0 60px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-family: var(--serif); font-size: clamp(34px, 5vw, 52px); margin-bottom: 10px; }
.doc .updated { color: var(--text-3); font-size: 14px; margin-bottom: 40px; }
.doc h2 { font-size: 23px; margin: 40px 0 12px; }
.doc h3 { font-size: 18px; margin: 26px 0 10px; }
.doc p, .doc li { color: var(--text-2); font-size: 15.5px; margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.callout {
  background: var(--surface); border: 1px solid var(--stroke); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 18px 22px; margin: 22px 0;
}
.callout p { margin: 0; color: var(--text); }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Mobile ---------------- */
.menu-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-note { justify-content: center; }
  .phone-stage { order: -1; margin-bottom: 20px; }
  .phone { transform: none; }
  .modes-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section-head { margin-left: auto; margin-right: auto; text-align: center; }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(11,15,23,0.98); border-bottom: 1px solid var(--stroke);
    padding: 8px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--stroke); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .menu-toggle { display: block; }
  .modes-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-cols { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone { transition: none; }
}
