/* ============================================================
   PrivateWire — landing page styles
   ============================================================ */

:root {
  --bg:        #04060a;
  --bg-2:      #070b12;
  --ink:       #e9eef6;
  --ink-soft:  #9fb0c4;
  --ink-faint: #5d6b80;
  --line:      rgba(150, 180, 220, 0.10);
  --accent:    #4fe3ff;   /* electric cyan */
  --accent-2:  #6f7bff;   /* violet edge   */
  --glow:      rgba(79, 227, 255, 0.55);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f-display: "Hubot Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ---------- WebGL backdrop ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
#scene.is-ready { opacity: 1; }

/* radial darkening so text stays legible over the canvas */
.scene-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 8%, transparent 35%, rgba(4,6,10,0.55) 78%, var(--bg) 100%),
    linear-gradient(180deg, rgba(4,6,10,0.20) 0%, transparent 22%);
}

/* film grain */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

/* ---------- Boot loader ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__bar {
  width: min(240px, 50vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.boot__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.3s linear;
}

/* ---------- Layout chrome ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.4vw, 30px) clamp(20px, 4vw, 56px);
  mix-blend-mode: difference;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark {
  width: 13px; height: 13px;
  border-radius: 3px;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 14px var(--glow);
}
.brand__name,
.foot__brand {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  font-weight: 600;
}
.topbar__status {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ---------- Sections ---------- */
main { position: relative; z-index: 10; }

section { position: relative; padding-inline: clamp(20px, 6vw, 80px); }

/* HERO */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__inner { max-width: 740px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 26px;
}
.title {
  font-family: var(--f-display);
  font-weight: 680;
  font-size: clamp(48px, 11vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
}
.title__line { display: block; overflow: hidden; }
.title__line > span { display: block; will-change: transform; }
.title__line:last-child > span {
  background: linear-gradient(96deg, var(--ink) 30%, var(--accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 48ch;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 20px);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(120, 160, 210, 0.04);
  backdrop-filter: blur(6px);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.pill--ghost { color: var(--ink-faint); }

.scrollcue {
  position: absolute;
  bottom: clamp(24px, 5vh, 48px);
  left: clamp(20px, 6vw, 80px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.scrollcue i {
  width: 38px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.scrollcue i::after {
  content: "";
  position: absolute; inset: 0;
  width: 12px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  animation: trace 2.2s var(--ease) infinite;
}
@keyframes trace {
  0% { transform: translateX(-14px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateX(40px); opacity: 0; }
}

/* BAND / manifesto */
.band {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-block: clamp(120px, 22vh, 260px);
}
.band__kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 28px;
}
.band__statement {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}
.band__statement span { display: block; }
.band__statement span:last-child { color: var(--ink-faint); }
.band__body {
  max-width: 56ch;
  margin: 42px 0 0;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--ink-soft);
}

/* PRINCIPLES */
.principles {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-block: clamp(40px, 8vh, 90px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.card {
  padding: clamp(26px, 2.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(120,160,210,0.05), rgba(120,160,210,0.015));
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.card:hover { border-color: rgba(79,227,255,0.35); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card__no {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.card h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 24px);
  letter-spacing: -0.01em;
  margin: 18px 0 12px;
}
.card p { margin: 0; color: var(--ink-soft); }

/* INVITE */
.invite {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-block: clamp(120px, 24vh, 280px);
}
.invite__inner { max-width: 640px; }
.invite h2 {
  font-family: var(--f-display);
  font-weight: 640;
  font-size: clamp(32px, 6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
}
.invite p {
  margin: 26px 0 40px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 20px);
  max-width: 50ch;
}
.key {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid rgba(79,227,255,0.30);
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: rgba(79,227,255,0.04);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.key i { transition: transform 0.4s var(--ease); }
.key:hover {
  background: rgba(79,227,255,0.12);
  border-color: var(--accent);
  box-shadow: 0 0 30px -6px var(--glow);
}
.key:hover i { transform: translateX(6px); }

/* FOOTER */
.foot {
  position: relative;
  z-index: 10;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 40px clamp(20px, 6vw, 80px) 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}
.foot__meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

/* ---------- Reveal states (driven by GSAP / fallback) ---------- */
.reveal, .reveal-up { will-change: transform, opacity; }
.no-js .reveal, .no-js .reveal-up { opacity: 1 !important; transform: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
  .topbar__status { display: none; }
  .foot { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .dot, .scrollcue i::after { animation: none !important; }
  #scene { transition: none; }
  * { scroll-behavior: auto !important; }
}
