:root {
  --ink: #12141a;
  --paper: #f7f6f3;
  --accent: #3454d1;
  --accent-soft: #e7ecff;
  --grey: #6b6f76;
  --line: rgba(18, 20, 26, 0.1);
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Faint contemporary grid texture, decorative only */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,0.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,0.6), transparent 70%);
}

/* Line-art accent: a minimal ascending growth line, fintech motif */
.line-art {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: min(42vw, 520px);
  height: auto;
  right: 0;
  top: 0;
  opacity: 0.45;
}

/* Growth node + trace: the node travels along the SAME path as the
   existing trend-line polyline (not a separate element), from its start
   to its end, while a colored overlay polyline (growth-trace) "draws
   itself" along that identical path behind it, shifting red -> amber ->
   green as it extends — a loopable "wealth increasing" motif. Both the
   node's motion and the trace reveal/color are driven by SMIL <animate>/
   <animateMotion> directly on the SVG elements (see index.html) rather
   than CSS, since SMIL's `path=`/`keyPoints` make "follow this exact
   existing path" straightforward and broadly supported. Reduced-motion
   handling is done via a small script that calls pauseAnimations() on
   the SVG root — SMIL doesn't respond to the CSS media query directly. */

.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.site-header {
  padding: clamp(16px, 4vh, 40px) clamp(24px, 6vw, 96px) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: block;
  object-fit: contain;
}

.hero {
  padding: clamp(24px, 6vh, 100px) clamp(24px, 6vw, 96px) clamp(16px, 4vh, 60px);
  max-width: 980px;
}

.keywords-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 24px;
  font-size: 1.15rem;
  color: var(--grey);
  font-weight: 400;
}

.keywords {
  padding: clamp(16px, 3vh, 40px) clamp(24px, 6vw, 96px) clamp(24px, 5vh, 56px);
  border-top: 1px solid var(--line);
  margin-top: clamp(8px, 2vh, 20px);
}

.keywords-eyebrow {
  display: block;
  margin-bottom: 28px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}

.tag-row li {
  border: 1px solid rgba(18, 20, 26, 0.15);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: #fff;
}

.site-footer {
  margin-top: auto;
  padding: 0 clamp(24px, 6vw, 96px) clamp(16px, 3vh, 32px);
}

.site-footer p {
  font-size: 0.78rem;
  color: var(--grey);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Optional, light scroll-reveal enhancement (progressive, no-JS fallback is fully visible) */
.reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  .hero {
    padding: clamp(20px, 5vh, 70px) clamp(24px, 5vw, 64px) clamp(14px, 3vh, 44px);
  }

  h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  }

  .keywords {
    padding: clamp(14px, 2.5vh, 32px) clamp(24px, 5vw, 64px) clamp(20px, 4vh, 44px);
  }
}

@media (max-width: 860px) {
  .line-art {
    width: 60vw;
    opacity: 0.3;
  }
}

@media (max-width: 600px) {
  .line-art {
    display: none;
  }
  .hero {
    padding: 72px 20px 40px;
  }
  .keywords {
    padding: 32px 20px 72px;
  }
}

/* ---- 404 page ---- */

.error-code {
  font-weight: 700;
  font-size: clamp(3.5rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

.back-link:hover {
  opacity: 0.75;
}
