/* =============================================================================
   HighlightMe — Landing page (index.html)
   Section-specific styles. Loaded after styles.css, which provides the tokens
   and shared components this file builds on.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 1.4rem;
}
.eyebrow .rule { width: 34px; height: 1px; background: var(--hairline-2); }

h1 {
  font-size: var(--step-hero);
  line-height: .98; letter-spacing: -.03em; font-weight: 800;
  margin: 0 0 1.3rem; max-width: 15ch; text-wrap: balance;
}
h1 .hl { color: var(--accent); white-space: nowrap; }

.lede {
  font-size: var(--step-1); color: var(--ink-2);
  max-width: 46ch; margin: 0 0 2rem; line-height: 1.5;
}

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.cta-note {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--muted); margin-top: 1rem;
}

/* -----------------------------------------------------------------------------
   Rolling-buffer viewport (the animated hero canvas + its HUD overlay)
   The canvas is drawn by js/rolling-buffer.js.
   -------------------------------------------------------------------------- */
.buffer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%),
    var(--ground-2);
  overflow: hidden;
}
.buffer canvas { display: block; width: 100%; height: 230px; }
@media (max-width: 640px) { .buffer canvas { height: 180px; } }

.buffer .osd {
  position: absolute; top: 12px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); pointer-events: none;
}
.buffer .osd .rec { color: var(--live); display: inline-flex; align-items: center; gap: .45rem; }
.buffer .osd .rec b { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; }
.tc { font-variant-numeric: tabular-nums; }

.buffer .tags { position: absolute; bottom: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; }
.buffer .tags span {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
}
.tag-discard { color: var(--muted); opacity: .7; }
.tag-keep { color: var(--accent); }

/* -----------------------------------------------------------------------------
   Section scaffolding (shared by the sections below)
   -------------------------------------------------------------------------- */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 40ch; }
.kicker {
  font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: .9rem;
}
h2 { font-size: var(--step-3); line-height: 1.05; letter-spacing: -.02em; margin: 0; font-weight: 800; text-wrap: balance; }
.sec-head p { color: var(--ink-2); margin: 1rem 0 0; }

/* -----------------------------------------------------------------------------
   How it works — numbered steps (order carries meaning here)
   -------------------------------------------------------------------------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--hairline);
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); padding: 1.8rem 1.6rem 2rem; }
.step .num { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--accent); }
.step h3 { font-size: var(--step-1); margin: 1.4rem 0 .5rem; letter-spacing: -.01em; }
.step p { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* -----------------------------------------------------------------------------
   Triggers — feature cards
   -------------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.7rem 1.5rem;
  transition: transform .18s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--hairline-2); }
.card .ico { width: 42px; height: 42px; color: var(--accent); margin-bottom: 1.1rem; }
.card .ico svg { width: 100%; height: 100%; display: block; }
.card h3 { font-size: var(--step-1); margin: 0 0 .5rem; letter-spacing: -.01em; }
.card p { color: var(--ink-2); margin: 0; font-size: .96rem; }

/* -----------------------------------------------------------------------------
   Spec strip
   -------------------------------------------------------------------------- */
.specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hairline);
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 760px) { .specs { grid-template-columns: repeat(2, 1fr); } }
.spec { background: var(--surface); padding: 1.4rem 1.4rem 1.5rem; }
.spec dt { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: .5rem 0 0; font-size: 1.05rem; color: var(--ink); font-weight: 600; }

/* -----------------------------------------------------------------------------
   Privacy panel (the summary block on the landing page)
   -------------------------------------------------------------------------- */
.privacy {
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 50%),
    var(--surface);
  border: 1px solid var(--hairline-2); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.4rem);
}
.privacy h2 { max-width: 20ch; }
.privacy ul { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .9rem; max-width: 60ch; }
.privacy li { display: flex; gap: .8rem; color: var(--ink-2); }
.privacy li svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--live); margin-top: 2px; }
.privacy .foot { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* -----------------------------------------------------------------------------
   Final call to action
   -------------------------------------------------------------------------- */
.final { text-align: center; }
.final h2 { max-width: 18ch; margin-inline: auto; }
.final .cta-row { justify-content: center; margin-top: 2rem; }
