/* ============================================================
   Brain Jotter — landing page
   Aesthetic: dark "neural knowledge vault" — navy canvas, a single
   amber accent, the logo's brain-network motif as a recurring system.
   Type: Fraunces (display serif) · Manrope (body) · JetBrains Mono (labels)
   ============================================================ */

:root {
  /* brand palette (from the app's theme.ts) */
  --bg: #0b0f19;
  --bg-2: #0d121e;
  --surface: #151b2b;
  --card: #1e2538;
  --card-2: #232c42;
  --border: #2a3347;
  --border-strong: #3a4660;
  --text: #f0f2f5;
  --text-2: #8b95a8;
  --text-3: #5c677d;
  --amber: #ffa000;
  --amber-2: #f5a623;
  --amber-hi: #ffb84d;
  --amber-ink: #0b0f19;
  --success: #22c55e;

  --maxw: 1120px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

/* atmospheric base: amber aurora top-left, cool depth bottom, faint grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 78% -8%, rgba(255, 160, 0, 0.16), transparent 55%),
    radial-gradient(90% 60% at 8% 4%, rgba(59, 130, 246, 0.08), transparent 50%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(138, 149, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 149, 168, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  opacity: 0.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px 1px rgba(255, 160, 0, 0.7);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--text);
  margin: 0;
}
.accent { color: var(--amber-2); font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  --pad-y: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad-y) 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  color: var(--amber-ink);
  box-shadow: 0 10px 30px -10px rgba(255, 160, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(255, 160, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--amber-2); color: var(--amber-2); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 6px 12px;
  border-radius: 999px;
}
.chip b { color: var(--text); font-weight: 500; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 15, 25, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(11, 15, 25, 0.82); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.brand span { font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--text-2);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 74px 0 40px; }
#constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
  mask-image: radial-gradient(80% 70% at 70% 30%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(80% 70% at 70% 30%, #000 20%, transparent 80%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-size: clamp(42px, 6vw, 68px);
  margin: 20px 0 0;
}
.hero-sub {
  margin: 22px 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-2);
  max-width: 30em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.trust {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.trust b { color: var(--text-2); font-weight: 600; }
.trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }

/* phone */
.hero-visual { display: flex; justify-content: center; position: relative; }
.phone-glow {
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(255,160,0,0.35), transparent 62%);
  filter: blur(30px);
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: 288px;
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(160deg, #2b3450, #10151f);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  animation: float 7s ease-in-out infinite;
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  z-index: 3;
}
.phone img {
  width: 100%;
  border-radius: 32px;
  display: block;
  background: var(--bg);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }

/* ---------- privacy strip ---------- */
.strip { margin: 30px 0; }
.strip-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30,37,56,0.6), rgba(21,27,43,0.3));
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.strip-inner .lock { flex: none; color: var(--amber-2); }
.strip-inner p { margin: 0; font-size: clamp(16px, 2vw, 20px); font-family: var(--font-display); font-weight: 400; line-height: 1.4; }
.strip-inner b { color: var(--amber-2); font-weight: 600; font-style: italic; }

/* ---------- sections ---------- */
section { position: relative; padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin-top: 16px; }
.section-head p { color: var(--text-2); margin: 16px 0 0; font-size: 17px; }
.center { text-align: center; margin-inline: auto; }

/* ---------- features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30,37,56,0.55), rgba(21,27,43,0.35));
  padding: 26px 24px 28px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 20% 0%, rgba(255,160,0,0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.feature:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.feature:hover::after { opacity: 1; }
.feature .ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,160,0,0.1);
  border: 1px solid rgba(255,160,0,0.22);
  color: var(--amber-2);
  margin-bottom: 18px;
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--font-body); font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; }
.feature p { margin: 9px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

/* ---------- screenshots ---------- */
.shots { position: relative; }
.shots-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 26px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shots-track::-webkit-scrollbar { display: none; }
.shot {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: 240px;
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(160deg, #2b3450, #10151f);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.35s var(--ease);
}
.shot img { width: 100%; border-radius: 26px; background: var(--bg); }
.shot figcaption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-top: 14px;
  text-transform: uppercase;
}
.shot:hover { transform: translateY(-6px); }
.shots-hint { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 4px; }

/* ---------- AI privacy split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30,37,56,0.6), rgba(21,27,43,0.3));
  padding: 30px;
}
.ai-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.ai-list li { display: flex; gap: 14px; align-items: flex-start; }
.ai-list .node {
  flex: none; margin-top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.4);
  color: var(--success);
}
.ai-list .node svg { width: 12px; height: 12px; }
.ai-list b { color: var(--text); font-weight: 700; }
.ai-list span { color: var(--text-2); font-size: 15px; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ---------- install ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 720px; }
.steps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 30px 66px;
  border-left: 2px solid var(--border);
  margin-left: 22px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -23px; top: -4px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--amber-ink);
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 0 0 6px var(--bg), 0 8px 20px -8px rgba(255,160,0,0.6);
}
.steps h3 { font-family: var(--font-body); font-weight: 700; font-size: 18px; }
.steps p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.install-note {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text-2);
  font-size: 14px;
  max-width: 720px;
}
.install-note svg { flex: none; color: var(--amber-2); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(21,27,43,0.4);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  flex: none; width: 22px; height: 22px;
  position: relative;
  transition: transform 0.3s var(--ease);
  color: var(--amber-2);
}
.faq summary .plus::before, .faq summary .plus::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
}
.faq summary .plus::before { top: 10px; left: 3px; width: 16px; height: 2px; }
.faq summary .plus::after { left: 10px; top: 3px; width: 2px; height: 16px; transition: transform 0.3s var(--ease); }
.faq details[open] summary .plus::after { transform: rotate(90deg); }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); font-size: 15px; line-height: 1.65; }

/* ---------- final CTA ---------- */
.final {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 62px 32px;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(255,160,0,0.14), transparent 60%),
    linear-gradient(180deg, rgba(30,37,56,0.5), rgba(21,27,43,0.2));
  position: relative;
  overflow: hidden;
}
.final h2 { font-size: clamp(30px, 5vw, 50px); }
.final p { color: var(--text-2); margin: 16px auto 30px; max-width: 34em; }
.final .hero-meta { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 54px 0 40px; margin-top: 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { max-width: 300px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--text-3); font-size: 14px; margin: 0; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.foot-col a { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 10px; transition: color 0.2s var(--ease); }
.foot-col a:hover { color: var(--amber-2); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { max-width: none; }
  .hero-visual { order: -1; }
  .phone { width: 250px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text);
    cursor: pointer;
  }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(11,15,25,0.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 16px 24px 22px;
  }
  .nav.open .nav-links a { padding: 10px 0; width: 100%; font-size: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  section { padding: 64px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .strip-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .foot-cols { gap: 40px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
