/* ───────────────────────────────────────────────────────────────────────────
   credcounts.online — "Night Ride"

   A park after dark: a deep indigo sky, one warm bulb-amber light, and a single
   coaster-track line (from the logo) that threads the pages as the structure.
   Boldness is spent on the hero track; everything else — above all the legal
   text — stays quiet and readable. Dark is the home key; a considered light
   theme ships for people whose system asks for it.
   ──────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

:root {
  --night:     #0b1020;   /* true deep-indigo sky, not a grey-black */
  --sky-top:   #0e1530;   /* the glow where the sky meets the park lights */
  --surface:   #121a37;
  --raise:     #182247;
  --line:      #27315a;
  --line-soft: #1a2244;
  --text:      #eaecf4;
  --muted:     #99a2c2;
  --faint:     #646d92;
  --lamp:      #ffc24b;   /* the one light: warm incandescent amber */
  --lamp-soft: #ffd27a;
  --glow:      rgba(255, 194, 75, 0.30);
  --btn-bg:    #ffc24b;
  --btn-ink:   #211603;

  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --radius: 14px;
  --radius-s: 9px;
}

@media (prefers-color-scheme: light) {
  :root {
    --night:     #f6f7fc;
    --sky-top:   #ffffff;
    --surface:   #ffffff;
    --raise:     #f0f2f9;
    --line:      #dde1ee;
    --line-soft: #e9ecf6;
    --text:      #0b1020;
    --muted:     #4c567a;
    --faint:     #7b85a1;
    --lamp:      #a65f00;   /* a readable amber for links/marks on paper */
    --lamp-soft: #c97d12;
    --glow:      rgba(166, 95, 0, 0.14);
    --btn-bg:    #b2680a;
    --btn-ink:   #ffffff;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  background-image: radial-gradient(1100px 420px at 72% -150px, var(--sky-top), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 22px 88px; }

/* ── Brand bar ─────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 26px 0 18px;
}
.mark { flex: none; color: var(--lamp); display: block; filter: drop-shadow(0 0 10px var(--glow)); }
.name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
nav { margin-left: auto; display: flex; gap: 22px; font-size: 14.5px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); }
nav a:hover, nav a:focus-visible { color: var(--lamp); }

/* The track rule — the connective hairline under the header and between
   sections. A lit filament with one small lift-hill crest near its end. */
.rule {
  height: 10px;
  border: 0;
  margin: 0 0 8px;
  background:
    radial-gradient(60px 10px at 78% 2px, var(--glow), transparent 70%),
    linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
  background-repeat: no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='10' preserveAspectRatio='none' viewBox='0 0 1000 10'%3E%3Cpath d='M0 8 H740 l18 -6 l18 6 H1000' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='10' preserveAspectRatio='none' viewBox='0 0 1000 10'%3E%3Cpath d='M0 8 H740 l18 -6 l18 6 H1000' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* ── Type ──────────────────────────────────────────────────────────────── */
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 34px 0 14px;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 44px 0 12px;
}
h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.005em;
  margin: 26px 0 4px;
}
p, li { max-width: var(--measure); }
.lede {
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 8px;
}
.prose p, .prose li { color: var(--text); }
.prose h2 + p, .prose h3 + p { margin-top: 4px; }
.updated { color: var(--faint); font-size: 0.86rem; margin: 2px 0 0; }

a { color: var(--lamp); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--lamp-soft); }

strong { font-weight: 700; }

/* ── Hero (home) ───────────────────────────────────────────────────────── */
.hero { padding-top: 20px; }
.hero h1 { margin-top: 10px; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin: 22px 0 6px;
  color: var(--muted);
  font-size: 0.98rem;
}
.facts b {
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

/* The coaster-profile track: the one place boldness is spent. Drawn once on
   load, then still. */
.climb { margin: 32px 0 10px; }
.climb svg { width: 100%; height: auto; display: block; overflow: visible; }
.climb .glow  { stroke: var(--glow); stroke-width: 9; fill: none; stroke-linecap: round; }
.climb .track { stroke: var(--lamp); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.climb .tie   { stroke: var(--line); stroke-width: 2; }
.climb .car   { fill: var(--lamp); filter: drop-shadow(0 0 7px var(--glow)); }

@media (prefers-reduced-motion: no-preference) {
  .climb .track { stroke-dasharray: 1700; stroke-dashoffset: 1700; animation: draw 2.1s .25s cubic-bezier(.2,.7,.25,1) forwards; }
  .climb .car   { opacity: 0; animation: arrive .5s 2.2s ease forwards; }
  .climb .tie   { opacity: 0; animation: fade .9s 1.2s ease forwards; }
}
@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }
@keyframes fade   { to { opacity: 1; } }

/* ── Feature list — track ties as bullets, not a card grid ─────────────── */
.ticks { list-style: none; padding: 0; margin: 12px 0 0; }
.ticks li {
  position: relative;
  padding: 13px 0 13px 36px;
  border-top: 1px solid var(--line-soft);
  max-width: none;
}
.ticks li:last-child { border-bottom: 1px solid var(--line-soft); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 16px;
  width: 20px; height: 20px;
  background: var(--lamp);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13 l5 5 L20 5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13 l5 5 L20 5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ── Call to act (home) ────────────────────────────────────────────────── */
.cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -14px var(--glow);
}
.btn:hover { background: var(--lamp-soft); color: var(--btn-ink); }
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

/* ── Tables (privacy) ──────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
td { max-width: none; }

/* ── Form (support) ────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin: 24px 0;
}
label { display: block; font-size: 0.9rem; font-weight: 600; margin: 18px 0 7px; }
.panel label:first-of-type { margin-top: 0; }
.hint { font-weight: 400; color: var(--faint); font-size: 0.82rem; }
input, textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.4;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 160px; resize: vertical; }
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
  border-color: transparent;
}
a:focus-visible, nav a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 3px;
}

/* The honeypot: off-screen rather than display:none, which some bots skip. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.note { padding: 12px 15px; border-radius: var(--radius-s); font-size: 0.92rem; margin-top: 18px; max-width: none; }
.note.ok  { background: color-mix(in srgb, #34c77b 14%, transparent); border: 1px solid #34c77b; color: var(--text); }
.note.bad { background: color-mix(in srgb, #ff6b5e 15%, transparent); border: 1px solid #ff6b5e; color: var(--text); }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.86rem; }
footer p { max-width: none; margin: 0 0 10px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--lamp); }

/* ── Narrow screens ────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  header { gap: 9px; padding: 20px 0 16px; }
  nav { gap: 16px; font-size: 14px; }
  .lede { max-width: none; }
  .facts { gap: 8px 26px; }
  .panel { padding: 20px; }
}
