/* ============================================ */
/* Static pages (Ivy, 2hot4u, privacy).         */
/* Mirrors the tokens of the Angular site in    */
/* src/styles/base.css.                         */
/* ============================================ */
:root {
  --bg: #050507;
  --bg-raised: #0b0b10;
  --bg-card: #0e0e14;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3f8;
  --text-dim: #a9a7b6;
  --text-mute: #6c6a7a;

  --accent: #6e4bff;
  --accent-hover: #7f60ff;
  --accent-soft: #a48bff;
  --accent-glow: rgba(110, 75, 255, 0.45);
  --fg-rgb: 255 255 255;
  --glass: rgba(10, 10, 15, 0.7);
  --footer-end: #08070f;
  --code-text: #d6ccff;
  --grain-opacity: 0.05;

  --font-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme, same palette as the main site (src/styles/base.css) */
[data-theme='light'] {
  --bg: #f7f6fb;
  --bg-raised: #efedf6;
  --bg-card: #ffffff;
  --line: rgba(20, 16, 40, 0.09);
  --line-strong: rgba(20, 16, 40, 0.16);
  --text: #14121c;
  --text-dim: #4d4a5c;
  --text-mute: #7c7990;
  --accent-soft: #5b3ce8;
  --accent-glow: rgba(110, 75, 255, 0.32);
  --fg-rgb: 20 16 40;
  --glass: rgba(247, 246, 251, 0.78);
  --footer-end: #ece9f6;
  --code-text: #4a2fd0;
  --grain-opacity: 0.03;
}

html[data-theme='light'] { color-scheme: light; }

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

html, body { overflow-x: clip; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }

code {
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(110, 75, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(164, 139, 255, 0.22);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.84em;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(1040px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  display: inline-block;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.serif {
  color: var(--accent-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.4s;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(102%);
  transition: transform 0.6s var(--ease-out);
}

.btn:hover::before { transform: translateY(0); }

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 10px 40px -10px var(--accent-glow);
}

.btn--accent::before { background: var(--text); }
.btn--accent:hover { color: var(--bg); }

.btn--ghost { border-color: var(--line-strong); background: rgb(var(--fg-rgb) / 0.03); color: var(--text); }
.btn--ghost::before { background: var(--text); }
.btn--ghost:hover { color: var(--bg); border-color: var(--text); }

.btn--sm { padding: 9px 16px; font-size: 0.85rem; }

/* ============================================ */
/* TOP BAR                                      */
/* ============================================ */
.topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(calc(100% - 32px), 1040px);
  padding: 8px;
  translate: -50% 0;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 0.4s, border-color 0.4s;
}

.topbar.is-scrolled {
  border-color: var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.topbar__mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 0 24px -4px var(--accent-glow);
  transition: transform 0.6s var(--ease-out);
}

.topbar__home:hover .topbar__mark { transform: rotate(-12deg) scale(1.06); }
.topbar__home .accent { color: var(--accent-soft); }

.topbar__nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(var(--fg-rgb) / 0.03);
}

.topbar__nav a {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 0.3s, background-color 0.3s;
}

.topbar__nav a:hover { color: var(--text); background: rgb(var(--fg-rgb) / 0.08); }

/* Theme toggle: sun in dark mode, moon in light mode */
.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: rgb(var(--fg-rgb) / 0.04);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.theme-toggle:hover { background: rgb(var(--fg-rgb) / 0.1); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.theme-toggle svg { position: absolute; transition: transform 0.6s var(--ease-out), opacity 0.4s; }
.theme-toggle__moon { transform: translateY(150%) rotate(-90deg); opacity: 0; }
[data-theme='light'] .theme-toggle__sun { transform: translateY(-150%) rotate(90deg); opacity: 0; }
[data-theme='light'] .theme-toggle__moon { transform: none; opacity: 1; }

@media (max-width: 760px) {
  .topbar__nav { display: none; }
  .topbar .theme-toggle { margin-left: auto; }
  .topbar .btn { margin-left: 8px; }
  .topbar__name { display: none; }
}

/* ============================================ */
/* PAGE HERO                                    */
/* ============================================ */
.hero {
  position: relative;
  padding: 170px 0 80px;
  overflow: clip;
  isolation: isolate;
}

/* Violet light from above + fading grid, the static cousin of the main hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 60% at 50% -12%, rgba(124, 92, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 30% 40% at 50% -5%, rgb(var(--fg-rgb) / 0.18), transparent 70%);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask: radial-gradient(ellipse 60% 70% at 50% 20%, #000, transparent 75%);
  opacity: 0.55;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 28px;
  border-radius: 30%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-strong), 0 24px 70px -18px var(--accent-glow);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(3.6rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero__lead {
  max-width: 600px;
  margin-top: 24px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
}

.hero__lead a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

@media (max-width: 560px) {
  .hero { padding-top: 130px; }
  .hero__actions { width: 100%; flex-direction: column; }
}

/* ============================================ */
/* SECTIONS                                     */
/* ============================================ */
.section { position: relative; padding: clamp(56px, 8vw, 96px) 0; }

.section__head { margin-bottom: 36px; }

.section__head h2 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.section__head p { max-width: 560px; margin-top: 12px; color: var(--text-dim); }

/* Spotlight card: soft violet light follows the pointer (vars set by site.js) */
.card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.4s, transform 0.5s var(--ease-out);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(110, 75, 255, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s;
}

.card:hover { box-shadow: inset 0 0 0 1px rgba(164, 139, 255, 0.35); transform: translateY(-3px); }
.card:hover::after { opacity: 1; }

.card h3 { font-size: 1.15rem; letter-spacing: -0.025em; }
.card p { margin-top: 8px; color: var(--text-dim); font-size: 0.93rem; line-height: 1.6; }

/* At a glance */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.fact strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.feature__num {
  display: block;
  margin-bottom: 26px;
  color: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Setup steps */
.steps { display: grid; gap: 12px; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: start;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}

.steps strong { font-size: 1.08rem; letter-spacing: -0.02em; }
.steps span { color: var(--text-dim); font-size: 0.93rem; }

.cmds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }

.cmds div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-dim);
  font-size: 0.88rem;
}

.cmds code { width: fit-content; font-size: 0.95rem; }

/* Privileged intent */
.intent__head { display: flex; align-items: center; gap: 14px; }

.intent__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.intent__head h3 { font-size: 1.4rem; }
.intent > p { margin-top: 16px; }

.proof {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.proof img { width: 100%; height: auto; }

.proof figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Data handling */
.checks { display: grid; gap: 10px; }

.checks li {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-dim);
}

.checks li::before {
  content: '';
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.2 2.2 4.8-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.note { margin-top: 18px; color: var(--text-mute); font-size: 0.92rem; }

.note a,
.doc a:not(.btn) {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .facts, .features, .cmds { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}

/* ============================================ */
/* DOCUMENT PAGES (privacy)                     */
/* ============================================ */
.doc-hero { padding-bottom: 48px; }
.doc-hero h1 { font-size: clamp(2.8rem, 9vw, 5.6rem); }

.doc {
  max-width: 760px;
  padding-bottom: 80px;
}

.doc__body {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--line);
}

.doc h2 {
  margin: 44px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.04em;
}

.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { margin: 28px 0 10px; font-size: 1.15rem; letter-spacing: -0.02em; }

.doc p,
.doc li { color: var(--text-dim); font-size: 0.98rem; line-height: 1.8; }

.doc p { margin-bottom: 14px; }
.doc strong { color: var(--text); font-weight: 600; }

.doc ul { display: grid; gap: 8px; margin-bottom: 16px; }

.doc ul li { position: relative; padding-left: 22px; }

.doc ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 8px var(--accent-soft);
}

/* ============================================ */
/* FOOTER                                       */
/* ============================================ */
.foot {
  position: relative;
  overflow: clip;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--bg), var(--footer-end));
}

.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 28px;
  padding-bottom: 28px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.foot__bar nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot__bar a { transition: color 0.3s; }
.foot__bar a:hover { color: var(--accent-soft); }

.foot__wordmark {
  margin-bottom: -0.22em;
  font-size: clamp(4rem, 20vw, 16rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  background: linear-gradient(180deg, rgb(var(--fg-rgb) / 0.2), rgb(var(--fg-rgb) / 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================ */
/* MOTION                                       */
/* ============================================ */
/* Elements fade up as they enter (class added by site.js). */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}

.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

.click-spark {
  position: fixed;
  inset: 0;
  z-index: 9998;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

