/* Graph My Keywords — design system
   Near-black instrument surface. One chromatic accent, a four-step surface ladder,
   hairline rules. Display type is Geist at 500–600 with negative tracking; data is
   set in Geist Mono with tabular figures. Palette and rhythm follow the Linear
   system (design-md/linear.app), adapted to this product's two accents:

     - Marketing chrome is single-accent lavender, per Linear's rule.
     - The tool's graph, legend and intent chips keep a functional categorical
       palette. Those colours carry meaning (intent, opportunity, topic family),
       so Linear's "one accent" rule does not apply to them — a data palette is
       not decoration. See --data-* below. */

@font-face { font-family: Geist; src: url(/fonts/geist-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/geist-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/geist-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/geist-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* surface ladder — never skip a level */
  --bg: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --surface-4: #191a1b;

  /* hairlines, not shadows, carry separation */
  --line: #23252a;
  --line-strong: #34343a;
  --line-tertiary: #3e3e44;

  /* ink ladder */
  --text: #f7f8f8;
  --muted: #d0d6e0;
  --dim: #8a8f98;
  --faint: #7f838b;         /* >=4.58:1 on every surface in the ladder, not just the canvas */

  /* the single chromatic accent */
  --accent: #5e6ad2;        /* fill. white on it = 4.70:1 */
  --accent-hover: #5561c9;  /* fill hover goes darker, not lighter = 5.33:1 */
  --accent-press: #4f5bc4;  /* = 5.79:1 */
  --accent-hi: #828fff;     /* TEXT and icons only: 6.1-6.6:1 on the surface ladder.
                               Never a fill behind white text. */
  --on-accent: #ffffff;

  /* functional data palette — meaning, not decoration */
  --data-informational: #5e6ad2;
  --data-commercial: #c2831f;
  --data-transactional: #27a644;
  --data-navigational: #8a8f98;
  --ok: #27a644;
  --sev-high: #d98a8a;
  --sev-medium: #d6a06f;
  --sev-low: #8a8f98;
  --pos: #6fd7ae;
  --warn: #d9bc7a;

  --mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: Geist, Inter, system-ui, -apple-system, sans-serif;
  --maxw: 1280px;

  /* radii vary by nesting depth: tighter inside, softer outside */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* one spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 96px;

  /* tinted shadows — carry the canvas hue, never pure black */
  --shadow-1: 0 1px 2px rgba(1, 1, 2, .6);
  --shadow-2: 0 8px 24px -8px rgba(1, 1, 2, .8);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* quint out — decelerates, never overshoots */

  /* z-scale — no arbitrary 9999 */
  --z-base: 1; --z-sticky: 60; --z-overlay: 80; --z-modal: 100;

  /* legacy aliases still read by the tool UI in app.js */
  --panel: var(--surface-2);
  --border: var(--line);
  --accent2: var(--data-transactional);
  --glow: rgba(94, 106, 210, .40);
  --r-legacy: var(--r-lg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-wrap: pretty;
}
a { color: var(--accent-hi); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: #a6b0ff; }
::selection { background: rgba(94, 106, 210, .38); color: #fff; }

/* Numbers are data. Line them up. */
.tnum, table td, .tag, .num { font-variant-numeric: tabular-nums; }

/* Visible focus is not optional. */
:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* Keyboard users need a way past the nav. */
.skip {
  position: absolute; left: var(--s-4); top: -3rem; z-index: var(--z-modal);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: .6rem 1rem; font-size: .875rem; font-weight: 500;
  transition: top .2s var(--ease);
}
.skip:focus { top: var(--s-4); }

/* ---------------------------------------------------------------- header */
header.site {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: .85rem;
  padding-inline: max(1.5rem, calc(50% - var(--maxw) / 2 + 1.5rem));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.022em; color: var(--text); }
.brand svg { width: 26px; height: 26px; flex: none; }
header.site nav { margin-left: auto; display: flex; gap: 1.6rem; font-size: .875rem; }
header.site nav a { color: var(--muted); }
header.site nav a:hover, header.site nav a.on { color: var(--text); }
header.site nav a.lang {
  border: 1px solid var(--line); border-radius: 6px; padding: .1rem .4rem;
  font: 600 .74rem/1.5 var(--mono); letter-spacing: .06em;
}
header.site nav a.lang:hover { border-color: var(--accent); color: var(--accent-hi); }
/* Current page is stated, not guessed at. */
header.site nav a.on { color: var(--text); font-weight: 500; }
@media (max-width: 700px) {
  header.site nav { gap: 1.1rem; font-size: .82rem; }
  header.site { padding: .7rem 1rem; gap: .75rem; }
  header.site nav a.hide-sm { display: none; }
  .brand { font-size: .95rem; }
}
/* The nav gained a link; below this width the remaining items no longer fit
   on one line at the wider gap, so tighten rather than drop another item. */
@media (max-width: 440px) {
  header.site { gap: .5rem; padding: .7rem .8rem; }
  header.site nav { gap: .8rem; font-size: .8rem; }
  .brand svg { width: 20px; height: 20px; }
}
/* The German nav carries longer labels than the English one and pushed the
   language chip off-screen at 390px. Let it wrap rather than overflow. */
header.site { flex-wrap: wrap; }
header.site nav { flex-wrap: wrap; row-gap: .4rem; min-width: 0; }
body { overflow-wrap: break-word; }

/* ------------------------------------------------------------- structure */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem 4rem; }
/* Optical rhythm: bottom slightly heavier than top. */
section { padding: var(--s-8) 0 calc(var(--s-8) + var(--s-5)); }
.eyebrow {
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: .9rem;
}
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); font-weight: 600; letter-spacing: -.042em; line-height: 1.03; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 600; letter-spacing: -.032em; line-height: 1.12; text-wrap: balance; }
h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.018em; line-height: 1.3; }
.lede { color: var(--dim); max-width: 58ch; margin-top: .75rem; font-size: 1.0625rem; line-height: 1.55; }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ----------------------------------------------------------------- hero */
/* The hero used to be a starfield, two radial glows and a rotating orbit ring
   around 250px of empty space. All of it was decoration standing where the
   product should be. The map itself is the argument, so it sits here instead. */
.hero-wrap { position: relative; isolation: isolate; }

#hero {
  display: grid; gap: var(--s-7) var(--s-6);
  grid-template-columns: minmax(0, 1fr);
  padding: var(--s-8) 0 var(--s-7);
  align-items: center;
}
@media (min-width: 1000px) {
  #hero { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: var(--s-6) var(--s-7); }
}
#hero .copy { max-width: 34rem; }
#hero h1 { margin: 0; }
#hero h1 em { font-style: normal; color: var(--accent-hi); }
#hero > .copy > p {
  color: var(--dim); font-size: 1.0625rem; line-height: 1.55;
  max-width: 42ch; margin: var(--s-4) 0 var(--s-5);
}

/* Sentence case, no chip, no tracked caps — it is a label, not a shout. */
#hero .eyebrow {
  display: block; margin-bottom: var(--s-3);
  font: 500 .8125rem/1.3 var(--sans); letter-spacing: .01em;
  color: var(--dim); text-transform: none;
}

.cta { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

/* Facts, set as facts. No pills, no decorative dots. */
.badges {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4);
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) { .badges { grid-template-columns: 1fr 1fr; } }
.badges span {
  display: block; font-size: .8125rem; line-height: 1.4; color: var(--dim);
  background: none; border: 0; border-radius: 0; padding: 0;
}
.badges span strong { display: block; color: var(--text); font-weight: 500; }

/* The product, framed in a dark panel and bleeding right on wide screens. */
.hero-shot { position: relative; min-width: 0; }
.hero-shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface-1);
}
.hero-shot figcaption {
  margin-top: var(--s-3); font-size: .8125rem; color: var(--faint);
}
/* The shot bleeds toward the right edge on wide screens. Gated above
   maxw + 2x the bleed, because below that the negative margin pushes past the
   viewport and puts a horizontal scrollbar on the page. */
@media (min-width: 1500px) {
  .hero-shot { margin-right: calc(-1 * var(--s-8)); }
}

/* --------------------------------------------------------------- buttons */
/* Flat surfaces, 8px corners, no gradient and no glow — the accent does the
   work on its own. A pressed state so the click feels physical. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--r); padding: .6rem 1rem;
  font: 500 .875rem/1.2 var(--sans); letter-spacing: 0;
  cursor: pointer; border: 1px solid var(--line-strong);
  background: var(--surface-1);
  color: var(--text); text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--line-tertiary); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn.primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:active { background: var(--accent-press); transform: scale(.98); }
/* A third weight, so every CTA row is not two buttons shouting at each other. */
.btn.ghost {
  background: none; border-color: transparent; color: var(--dim);
  padding-inline: .5rem;
}
.btn.ghost:hover { background: none; color: var(--text); }

/* ----------------------------------------------------------------- cards */
.card-grid { display: grid; gap: 1rem; margin-top: 2.2rem; }
/* Explicit column counts rather than auto-fit: with five cards, auto-fit put
   four on one row and orphaned the fifth. Three across holds the homepage
   rhythm and gives 3+2 where there are five. */
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cols-3, .cols-2 { grid-template-columns: minmax(0, 1fr); } }
.surface {
  position: relative; overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.surface:hover { border-color: var(--line-strong); background: var(--surface-2); }

.step { padding: var(--s-5) var(--s-5) var(--s-6); }
.step .num {
  display: block; margin-bottom: var(--s-4); padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
  font: 400 .75rem/1.4 var(--mono); font-variant-numeric: tabular-nums;
  letter-spacing: .04em; color: var(--faint);
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .9rem; }

/* --------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1rem; margin-top: 2.2rem; max-width: 760px; }
.plan { padding: 1.7rem 1.6rem; }
.plan.featured { border-color: var(--accent); background: var(--surface-2); }
.plan h3 { color: var(--muted); font-weight: 500; font-size: .93rem; }
.plan .price { font-size: 2.3rem; font-weight: 700; letter-spacing: -.035em; margin: .35rem 0 1.2rem; }
.plan .price small { font-size: .88rem; color: var(--muted); font-weight: 400; letter-spacing: normal; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: .9rem; }
.plan li { display: flex; gap: .55rem; padding: .28rem 0; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--accent2); font-weight: 700; }
.plan .btn { width: 100%; }

/* ------------------------------------------------------------------- faq */
/* Product gallery — what you get, shown rather than described */
.shots { display: grid; gap: 1.4rem; margin-top: 2.2rem; grid-template-columns: repeat(3, 1fr); }
.shots figure { margin: 0; }
.shots.lead { grid-template-columns: 1fr; }
.shots img {
  width: 100%; height: auto; display: block; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface-1);
}
.shots figcaption { color: var(--dim); font-size: .84rem; margin-top: .6rem; line-height: 1.5; }
.shots figcaption b { color: var(--muted); font-weight: 600; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }

.faq { max-width: 800px; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: var(--s-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; gap: .8rem; align-items: baseline;
  padding: 1.05rem .2rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--accent); font-weight: 600; font-family: var(--mono); }
.faq details[open] summary::before { content: "–"; }
.faq p { color: var(--muted); font-size: .93rem; padding: 0 .2rem 1.15rem 1.7rem; max-width: 72ch; }

/* ---------------------------------------------------------------- footer */
footer.site { border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(94, 106, 210,.04)); }
.foot { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.5rem 2.5rem; display: grid; gap: 2rem; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; }
.foot p { color: var(--dim); font-size: .85rem; margin-top: .7rem; max-width: 34ch; }
.foot h4 { font: 500 .74rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: .8rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .88rem; }
.foot ul a { color: var(--muted); }
.foot ul a:hover { color: var(--text); }
.foot-note { border-top: 1px solid var(--line); padding: 1.1rem 1.5rem; text-align: center; color: var(--dim); font-size: .8rem; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }
