/* styles.css — landing site for PrivacySecure for WhatsApp Web.
   Mirrors the extension UI tokens (theme.css) so the web and in-browser
   experiences feel like one product. */

:root {
  --bg: #0c0c12;
  --surface: #13131f;
  --surface2: #1a1a2e;
  --border: #2a2a40;
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --danger: #ff4f6b;
  --warn: #ffb547;
  --text: #e8e8f0;
  --muted: #7070a0;
  --glow: rgba(108, 99, 255, 0.22);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);

  --body-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(108, 99, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(0, 212, 170, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

button, .btn {
  font: inherit; color: inherit; cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  transition: background 120ms, border-color 120ms, transform 120ms;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500;
}
button:hover, .btn:hover { background: var(--border); text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0c0c12;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 28px var(--glow);
}
.btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost { background: transparent; }

/* Layout */

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  max-width: 1040px; margin: 0 auto;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.topbar .brand img { width: 28px; height: 28px; filter: drop-shadow(0 0 10px var(--glow)); }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--muted); font-size: 14px; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */

.hero {
  padding: 60px 24px 40px;
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  perspective: 1200px;
}
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
}

.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 56ch;
}
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .meta {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.hero .meta span::before { content: '• '; color: var(--border); }
.hero .meta span:first-child::before { content: ''; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(108, 99, 255, 0.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 170, 0.22), transparent 55%);
  pointer-events: none;
}
.hero-visual img {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 52%; height: auto;
  filter: drop-shadow(0 0 40px var(--glow));
}

/* Feature grid */

.features {
  padding: 60px 24px;
  max-width: 1040px;
  margin: 0 auto;
}
.section-title {
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.section-sub { color: var(--muted); margin-bottom: 34px; max-width: 60ch; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 140ms, border-color 140ms;
}
.feature:hover { transform: translateY(-2px); border-color: rgba(108, 99, 255, 0.5); }
.feature h3 {
  font-size: 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.feature .pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--glow);
}
.feature p { color: var(--muted); font-size: 14px; }

/* Install card */

.install {
  padding: 40px 24px 80px;
  max-width: 820px;
  margin: 0 auto;
}
.install .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.install ol { padding-left: 22px; }
.install ol li { margin-bottom: 14px; color: var(--text); }
.install ol li code, .install ol li kbd {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}

/* Referral page */

.refer-hero {
  padding: 80px 24px 40px;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.refer-hero .eyebrow {
  color: var(--accent2);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.refer-hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.1;
  margin-bottom: 16px;
}
.refer-hero .code-box {
  margin: 32px auto;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.refer-hero .code-box .code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.refer-hero .code-box button { padding: 8px 14px; font-size: 13px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 24px;
}
@media (max-width: 680px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.step .n {
  display: inline-flex; justify-content: center; align-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0c0c12; font-weight: 700; font-size: 14px;
  margin-bottom: 12px;
}
.step h4 { font-size: 15px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 40px 24px;
}
.footer .inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.footer .brand-line {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 14px;
}
.footer .muted { color: var(--muted); font-size: 12.5px; }

/* ── Shared 3D design system ──────────────────────────────────────────────
   Reusable across every marketing/product page. Pair with site.js's
   auto-init (tilt tracking + parallax) — just add the classes/attributes
   below, no page needs its own copy of the JS or these rules. */

.perspective-3d { perspective: 1200px; }

/* Mouse-tracked tilt card. Add data-tilt to any element; site.js handles
   the rest. Put data-tilt-depth="1|2|3" on children to push them forward
   in Z-space so the tilt reads as real depth, not just a rotated flat card. */
/* Known repeated card classes across every marketing page auto-opt-in to
   the tilt system via site.js's selector (no per-instance data-tilt markup
   needed) — feat-item, info-card, util-card, feature. Their grid parents
   get perspective automatically too. */
.feat-grid, .section-row, .util-grid, .feature-grid { perspective: 1200px; }
.install { perspective: 1200px; }

[data-tilt], .feat-item, .info-card, .util-card, .feature, .hero-visual {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 120ms ease-out, box-shadow 200ms, border-color 200ms;
  will-change: transform;
  overflow: hidden;
}
[data-tilt-depth="1"] { transform: translateZ(16px); }
[data-tilt-depth="2"] { transform: translateZ(28px); }
[data-tilt-depth="3"] { transform: translateZ(42px); }

/* Cursor-following glare highlight — site.js sets --mx/--my on mousemove. */
[data-tilt]::after, .feat-item::after, .info-card::after, .util-card::after, .feature::after, .hero-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.14), transparent 55%);
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
  border-radius: inherit;
}
[data-tilt]:hover::after, .feat-item:hover::after, .info-card:hover::after, .util-card:hover::after, .feature:hover::after, .hero-visual:hover::after { opacity: 1; }

/* Glass-panel surface — a deeper, frosted alternative to the flat
   var(--surface) card used everywhere pre-3D-redesign. */
.glass-panel {
  background: linear-gradient(155deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Floating decorative depth-field — drop a few .depth-orb children inside
   a .depth-field container (position:absolute is up to the caller). Each
   orb drifts on its own cycle and gets a subtle mouse-parallax offset from
   site.js based on its data-parallax strength (0–1, larger = moves more). */
.depth-field { position: relative; transform-style: preserve-3d; }
.depth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  animation: depth-orb-float 7s ease-in-out infinite;
  transition: margin 200ms ease-out;
}
@keyframes depth-orb-float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) {
  .depth-orb { animation: none; }
}

/* Toast */

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 9999;
  box-shadow: var(--shadow);
}
