/* ==========================================================================
   Datamint — styles.css
   Palette note: the mint accent (#00C48C) is deliberately never used for body
   text on light backgrounds — it only reaches ~2:1 contrast. Mint carries
   fills, borders, the thread and dot marks; --accent-ink carries accent text.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  --canvas:        #F7F8F7;
  --surface:       #FFFFFF;
  --surface-alt:   #F1F3F1;
  --ink:           #14161A;
  --ink-soft:      #3F454E;
  --muted:         #6B7280;
  --line:          #E2E5E2;
  --line-strong:   #CFD4CF;

  --accent:        #00C48C;   /* fills, borders, marks — never text on light */
  --accent-ink:    #00815C;   /* accent text, 4.6:1 on --canvas */
  --accent-wash:   rgba(0, 196, 140, 0.10);

  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --shell:   1180px;
  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --radius:  18px;

  --ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:   0.5s;
}

[data-theme="dark"] {
  --canvas:        #0E1013;
  --surface:       #161A1E;
  --surface-alt:   #121519;
  --ink:           #F2F4F2;
  --ink-soft:      #C3C9CE;
  --muted:         #8A9299;
  --line:          #242A30;
  --line-strong:   #333B43;

  --accent:        #3DDC97;
  --accent-ink:    #3DDC97;
  --accent-wash:   rgba(61, 220, 151, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas:        #0E1013;
    --surface:       #161A1E;
    --surface-alt:   #121519;
    --ink:           #F2F4F2;
    --ink-soft:      #C3C9CE;
    --muted:         #8A9299;
    --line:          #242A30;
    --line-strong:   #333B43;

    --accent:        #3DDC97;
    --accent-ink:    #3DDC97;
    --accent-wash:   rgba(61, 220, 151, 0.12);
  }
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--canvas);
  font-size: 0.875rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Shared type ────────────────────────────────────────────────────────── */

.label,
.eyebrow,
.step__index,
.row__items li {
  font-family: var(--font-mono);
}

.label {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              color 0.2s var(--ease),
              transform 0.2s var(--ease);
}

.btn--solid { background: var(--ink); color: var(--canvas); }
.btn--solid:hover { background: var(--accent-ink); color: #fff; }

.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-wash); }

.btn--lg { padding: 0.875rem 1.625rem; font-size: 1rem; }
.btn:hover { transform: translateY(-1px); }

/* ── Scroll thread ──────────────────────────────────────────────────────── */

.rail {
  position: fixed;
  left: 2.25rem;
  top: 18vh;
  bottom: 18vh;
  width: 9px;
  z-index: 5;
  display: none;
  pointer-events: none;
}

.rail__track {
  position: relative;
  width: 1px;
  height: 100%;
  margin-inline: auto;
  background: var(--line-strong);
}

.rail__fill {
  position: absolute;
  inset: 0 0 auto 0;
  width: 1px;
  height: 0;
  background: var(--accent);
}

.rail__node {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--canvas);
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.rail__node.is-passed {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-wash);
}

@media (min-width: 1320px) { .rail { display: block; } }

/* ── Header ─────────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.header.is-stuck {
  background: var(--canvas);           /* fallback: opaque, still correct */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .header.is-stuck { background: color-mix(in srgb, var(--canvas) 82%, transparent); }
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  flex: none;
}
.wordmark__node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.wordmark--sm { font-size: 1rem; }

.nav {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.nav a { position: relative; padding-block: 0.25rem; transition: color 0.2s var(--ease); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.28s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.nav + .header__actions { margin-left: 0; }

.theme {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.theme:hover { color: var(--ink); border-color: var(--accent); }
.theme__moon { display: none; }

[data-theme="dark"] .theme__sun  { display: none; }
[data-theme="dark"] .theme__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme__sun  { display: none; }
  :root:not([data-theme="light"]) .theme__moon { display: block; }
}

@media (min-width: 860px) { .nav { display: flex; } }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(4.5rem, 13vh, 9rem);
  padding-bottom: clamp(4.5rem, 12vh, 8.5rem);
}

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero__title {
  font-size: clamp(2.75rem, 9.5vw, 6.25rem);
  max-width: 16ch;
  margin-bottom: 2rem;
}
.hero__title-accent { color: var(--accent-ink); }

.hero__lede {
  font-size: clamp(1.0625rem, 2.1vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Sections ───────────────────────────────────────────────────────────── */

.section {
  padding-block: clamp(4rem, 10vh, 7.5rem);
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--surface-alt); }

.section__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 6vh, 4rem); }

.section__title {
  font-size: clamp(1.875rem, 4.4vw, 3rem);
  max-width: 24ch;
}

/* ── Service rows ───────────────────────────────────────────────────────── */

.rows { border-top: 1px solid var(--line); }

.row {
  display: grid;
  gap: 1.25rem 3rem;
  padding-block: clamp(1.75rem, 4vh, 2.5rem);
  padding-left: 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease), background-color 0.3s var(--ease);
}

.row__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  transition: color 0.25s var(--ease);
}
.row__promise { color: var(--muted); font-size: 1rem; max-width: 30ch; }

.row__items {
  display: grid;
  gap: 0.625rem;
  align-content: start;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.row__items li {
  position: relative;
  padding-left: 1.125rem;
  line-height: 1.5;
}
.row__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}

@media (min-width: 780px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .row__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; }
  .row:hover { padding-left: 1.25rem; background: var(--accent-wash); }
  .row:hover .row__title { color: var(--accent-ink); }
}

/* ── Steps ──────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 2.5rem;
  position: relative;
}

.step { position: relative; padding-top: 1.75rem; }

.step__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
/* the thread turning sideways to link the steps */
.step::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 9px;
  right: -2.5rem;
  height: 1px;
  background: var(--line-strong);
}
.step:last-child::before { display: none; }

.step__index {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

/* The steps are the whole section now that the body copy is gone, so they carry
   more type weight than they did as paragraph headings. */
.step__title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }

@media (max-width: 819px) {
  .step::before { display: none; }
  .step { padding-top: 0; padding-left: 1.75rem; }
  .step__dot { top: 0.5rem; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1.5rem;
    bottom: -2.5rem;
    width: 1px;
    background: var(--line-strong);
  }
}

@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}

/* ── Closing ────────────────────────────────────────────────────────────── */

.closing .shell {
  display: grid;
  gap: clamp(3rem, 8vh, 5rem);
}

.closing__text {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
}

.closing__title {
  font-size: clamp(1.875rem, 5vw, 3.25rem);
  margin-bottom: 1.5rem;
  max-width: 20ch;
}

.closing__email {
  display: inline-block;
  font-size: clamp(1.125rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.125rem;
  transition: opacity 0.2s var(--ease);
}
.closing__email:hover { opacity: 0.7; }

.closing__meta {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 42ch;
}

@media (min-width: 900px) {
  .closing .shell { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer__nav a:hover { color: var(--ink); }
.footer__legal {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── Reveal on scroll ───────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Stagger children within a group. */
.row.reveal:nth-child(2),
.step.reveal:nth-child(2) { transition-delay: 0.08s; }
.row.reveal:nth-child(3),
.step.reveal:nth-child(3) { transition-delay: 0.16s; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* ── Print ──────────────────────────────────────────────────────────────── */

@media print {
  .rail, .header__actions, .nav, .skip { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}
