/* Nekudot homepage - the landing site that sits beside the usage book.
   A quiet "atelier under a constellation": deep ink, an expressive serif, and
   the app's own palette (blue connecting threads, gold points). Self-contained;
   does not share the book's docs.css. */

:root {
  --ink: #141417; /* deepest backdrop */
  --ink-2: #1a1b1f; /* base background */
  --panel: #212327; /* cards / raised surfaces */
  --panel-2: #282b30;
  --line: #34373c; /* hairline borders */
  --line-soft: #2a2d31;

  --paper: #ece9e2; /* warm off-white - headings */
  --text: #d4d6db; /* body */
  --muted: #9aa0a8;
  --faint: #6b7178;

  --blue: #6b94ff; /* the connecting thread */
  --blue-deep: #2563eb;
  --gold: #ffcc33; /* the point that glows (from the app's invisible brush) */
  --gold-soft: #e7b34b;

  --maxw: 1080px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink-2);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* A faint mesh of warm + cool light, so the ink isn't a flat field. */
  background-image:
    radial-gradient(60% 50% at 18% 0%, rgba(43, 60, 120, 0.22), transparent 70%),
    radial-gradient(50% 50% at 92% 8%, rgba(120, 96, 36, 0.14), transparent 70%);
  background-attachment: fixed;
}

/* Paper-grain overlay - very subtle tooth so surfaces feel printed, not plastic. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: #9db6ff; }

/* ---- Top navigation ------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 16px clamp(18px, 5vw, 44px);
  background: rgba(20, 20, 23, 0.72);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px) saturate(1.1);
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--paper);
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 40;
}
.brand .dot {
  color: var(--gold);
  position: relative;
}
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.nav-links a:hover { color: var(--paper); }
.nav-links a.current { color: var(--paper); border-bottom-color: var(--gold); }
.nav .spacer { flex: 1; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  color: #16171a;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
.cta:hover {
  color: #16171a;
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 8px 26px -10px rgba(255, 204, 51, 0.5);
}

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 9vw, 96px) clamp(20px, 7vw, 80px) clamp(48px, 8vw, 90px);
  overflow: hidden;
}
/* The live connecting-dots web, behind the words. */
#web {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero::after {
  /* Gentle vignette so the text always sits on calm ground. */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(75% 65% at 30% 55%, transparent 30%, rgba(20, 20, 23, 0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow .heb {
  font-size: 16px;
  letter-spacing: 0;
  color: var(--gold-soft);
  text-transform: none;
}
.eyebrow .rule { width: 30px; height: 1px; background: var(--line); }

.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--paper);
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 110;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 110;
}
.hero .lead {
  font-size: clamp(17px, 2.3vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
  font-size: 14.5px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--paper); background: rgba(107, 148, 255, 0.07); }

/* Load-in: staggered reveal of hero pieces. */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.28s; }
.d4 { animation-delay: 0.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- Generic page sections ------------------------------------------------ */
main { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 8vw, 96px) clamp(20px, 6vw, 40px); }
.prose { max-width: 720px; }

.section-label {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}
h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin: 0 0 18px;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 60;
}
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: var(--paper);
  margin: 0 0 6px;
  font-variation-settings: "SOFT" 30, "opsz" 30;
}
.big-text p { font-size: clamp(19px, 2.6vw, 24px); line-height: 1.55; color: var(--text); }
p { margin: 0 0 18px; }
p.muted { color: var(--muted); }
strong { color: var(--paper); font-weight: 600; }
em { color: var(--gold-soft); font-style: italic; }

/* A divider used between major blocks. */
.divider {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

/* The three "what & why" blooms - an editorial, asymmetric trio. */
.blooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; margin-top: 30px; }
.bloom { background: var(--ink); padding: 28px 26px 30px; transition: background 0.25s; }
.bloom:hover { background: var(--panel); }
.bloom .glyph {
  width: 38px; height: 38px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line); color: var(--gold);
  background: radial-gradient(circle at 50% 40%, rgba(255, 204, 51, 0.14), transparent 70%);
}
.bloom .glyph svg { width: 20px; height: 20px; }
.bloom h3 { margin-bottom: 8px; }
.bloom p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* Feature list - quiet, generous, with a leading point. */
.features { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 2px; }
.features li {
  display: grid; grid-template-columns: 16px 1fr; gap: 14px; align-items: start;
  padding: 15px 6px; border-top: 1px solid var(--line-soft);
}
.features li:last-child { border-bottom: 1px solid var(--line-soft); }
.features .pt { width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 204, 51, 0.1); }
.features b { color: var(--paper); font-weight: 600; }
.features span { color: var(--muted); }

/* Cards (learn / cross-links). */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.card {
  display: block; padding: 22px 22px 24px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line-soft);
  transition: transform 0.2s ease, border-color 0.2s, background 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--blue); background: var(--panel-2); }
.card h3 { margin-bottom: 5px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .arrow { color: var(--gold); font-family: var(--body); }

/* Pull quote - the manifesto moment. */
.quote {
  max-width: 820px; margin: clamp(30px, 6vw, 60px) auto; padding: 0 clamp(20px, 6vw, 40px);
  text-align: center;
}
.quote blockquote {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin: 0;
  font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 80;
}
.quote blockquote .hl { color: var(--gold); }
.quote cite { display: block; margin-top: 18px; font-style: normal; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }

/* Inline "try this" tip - echoes the book's voice. */
.tip {
  margin: 28px 0; padding: 16px 20px; border-radius: 0 12px 12px 0;
  background: var(--panel); border-left: 3px solid var(--gold);
}
.tip .label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); }
.tip p { margin: 0; color: var(--muted); }
.kbd {
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; color: var(--text);
}

/* Closing call-to-action band. */
.closer { text-align: center; padding: clamp(56px, 10vw, 110px) 22px; position: relative; }
.closer h2 { margin-bottom: 18px; }
.closer .lead { color: var(--muted); max-width: 480px; margin: 0 auto 30px; font-size: 18px; }

/* About / license specifics. */
.lede-line {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.35;
  color: var(--paper);
  font-weight: 400;
  margin: 0 0 28px;
  font-variation-settings: "SOFT" 50, "opsz" 50;
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; margin: 30px 0; }
.meta-grid div { background: var(--ink); padding: 18px 20px; }
.meta-grid dt { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.meta-grid dd { margin: 0; color: var(--paper); font-weight: 500; overflow-wrap: anywhere; }
.meta-grid dd a { color: var(--blue); }

.signature {
  font-family: var(--display); font-style: italic; font-size: 26px; color: var(--paper);
  font-variation-settings: "SOFT" 90, "WONK" 1, "opsz" 40; margin-top: 6px;
}

/* ---- Footer --------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 40px clamp(20px, 6vw, 44px) 56px;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  font-size: 14px;
  color: var(--faint);
}
footer .brand { font-size: 17px; }
footer .spacer { flex: 1; }
footer a { color: var(--muted); }
footer a:hover { color: var(--paper); }
footer .dot-row { display: inline-flex; gap: 5px; align-items: center; }
footer .dot-row i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); display: inline-block; }
footer .dot-row i.on { background: var(--gold); }

@media (max-width: 760px) {
  .blooms { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* Respect reduced motion: no reveal animation, no drifting web (web.js also
   checks this and renders a single calm frame). */
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
