/* ==========================================================================
   thedatajunkie.com
   ========================================================================== */

:root {
  --bg: #040605;
  --bg-2: #070c09;
  --ink: #f3f6f4;
  --ink-2: rgba(243, 246, 244, .72);
  --ink-3: rgba(243, 246, 244, .46);
  --mint: #6dffb3;
  --mint-2: #22e384;
  --down: #ff6b81;
  --line: rgba(255, 255, 255, .10);
  --glass: rgba(255, 255, 255, .08);
  --radius: 22px;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
canvas, svg { display: block; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--mint); color: #02140a; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 23px;
  line-height: .84;
  letter-spacing: -.05em;
}
.logo span { display: block; }
.cursor {
  display: inline-block;
  width: .4em;
  height: .64em;
  margin-left: .1em;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(109, 255, 179, .6);
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 26px var(--gutter);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding-block: 14px;
  background: rgba(4, 6, 5, .72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.site-header .logo { justify-self: start; }

.nav-pill {
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.nav-pill a {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 17px;
  letter-spacing: -.01em;
  transition: background .25s;
}
.nav-pill a:hover { background: rgba(255, 255, 255, .12); }

.nav-cta {
  justify-self: end;
  font-size: 17px;
  letter-spacing: -.01em;
  position: relative;
}
.nav-cta::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-cta:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 15px 28px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.btn-light { background: #fff; color: #06100a; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 44px -8px rgba(109, 255, 179, .45); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 140px var(--gutter) clamp(56px, 9vh, 110px);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(80% 60% at 50% 40%, #0a1a12, var(--bg));
}
.rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 42% at 50% 74%, rgba(4, 6, 5, .94) 0%, rgba(4, 6, 5, .6) 55%, rgba(4, 6, 5, 0) 100%),
    linear-gradient(to bottom, rgba(4, 6, 5, .8) 0%, rgba(4, 6, 5, 0) 20%, rgba(4, 6, 5, 0) 72%, var(--bg) 100%);
}
.hero h1 {
  font-weight: 500;
  font-size: clamp(60px, 11vw, 176px);
  line-height: .87;
  letter-spacing: -.058em;
  padding-bottom: .14em;
  margin-bottom: -.08em;
  background: linear-gradient(180deg, #ffffff 30%, #c4ffe1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(109, 255, 179, .28));
}
.lede {
  margin: 22px auto 0;   /* auto side margins keep the text block centred under the headline */
  max-width: 36ch;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.18;
  letter-spacing: -.01em;
}
.hero .btn { margin-top: 44px; }

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee-group { display: flex; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-size: clamp(18px, 1.9vw, 26px);
  letter-spacing: -.03em;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee span::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(109, 255, 179, .7);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */

.section { padding: clamp(88px, 12vw, 170px) var(--gutter) clamp(40px, 6vw, 80px); max-width: 1480px; margin: 0 auto; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 88px);
}
.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before { content: ""; width: 18px; height: 1px; background: currentColor; }

h2 {
  font-weight: 500;
  font-size: clamp(44px, 7vw, 108px);
  line-height: .9;
  letter-spacing: -.055em;
}

/* ---------- Services ---------- */

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(44px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}
.service:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.service:nth-of-type(even) .service-text { order: 2; }

.service-num { font-family: var(--mono); font-size: 13px; color: var(--mint); letter-spacing: .02em; }
.service h3 {
  font-weight: 500;
  font-size: clamp(32px, 3.8vw, 56px);
  line-height: .96;
  letter-spacing: -.045em;
  margin: 18px 0 20px;
  max-width: 14ch;
}
.service-text > p { color: var(--ink-2); font-size: 18px; max-width: 38ch; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tags li {
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  color: var(--ink-2);
}

/* ---------- Window visuals ---------- */

.window {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0b130f 0%, #060a08 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow:
    0 50px 120px -50px rgba(34, 227, 132, .35),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
}
.window::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(60% 40% at 80% 0%, rgba(109, 255, 179, .10), transparent 70%);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.file { color: var(--ink-2); margin-left: 6px; }
.live, .tag-sim { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
.live { color: var(--mint); }
.live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.tag-sim { font-size: 11px; color: var(--ink-3); }

.chart-wrap { position: relative; border-bottom: 1px solid var(--line); }
.chart { width: 100%; height: clamp(200px, 22vw, 280px); }
.chart-legend {
  position: absolute;
  top: 12px; left: 16px;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  pointer-events: none;
}
.chart-legend b { font-weight: 500; color: var(--ink-2); }
.k::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.k-fast::before { background: var(--mint); }
.k-slow::before { background: #8ea79c; }

.code {
  --lh: 1.68;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: var(--lh);
  padding: 16px 20px;
  height: calc(var(--lines) * var(--lh) * 1em + 32px);
  overflow: hidden;
  white-space: pre;
  color: #d6e7de;
  counter-reset: ln;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.code .ln { display: inline-block; width: 1.6em; margin-right: 1.2em; text-align: right; color: rgba(255, 255, 255, .18); user-select: none; }
.caret {
  display: inline-block;
  width: .58em; height: 1.15em;
  margin-left: 1px;
  vertical-align: -.2em;
  background: var(--mint);
  animation: blink 1s steps(1) infinite;
}
.tk-c { color: rgba(214, 231, 222, .38); font-style: italic; }
.tk-s { color: #ffd38a; }
.tk-n { color: #ff9fb2; }
.tk-k { color: var(--mint); }
.tk-f { color: #8fd3ff; }
.tk-ns { color: #b9a8ff; }
.tk-d { color: #ffcb6b; }

.terminal {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .35);
  padding: 14px 20px;
  height: calc(7 * 1.7 * 11.5px + 28px);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.terminal-lines div { white-space: nowrap; color: var(--ink-3); animation: rise .35s var(--ease); }
.terminal-lines .t { color: rgba(255, 255, 255, .28); margin-right: 12px; }
.terminal-lines .ev { display: inline-block; width: 7ch; }
.ev-ok { color: var(--mint); }
.ev-sig { color: #8fd3ff; }
.ev-ord { color: #ffd38a; }
.ev-risk { color: #b9a8ff; }
.ev-sys { color: var(--ink-2); }
.pos { color: var(--mint); }
.neg { color: var(--down); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.mc { width: 100%; height: clamp(260px, 28vw, 360px); transition: opacity .6s ease; }
.mc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.mc-stats div { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.mc-stats div + div { border-left: 1px solid var(--line); }
.mc-stats span { font-size: 12px; color: var(--ink-3); }
.mc-stats b { font-weight: 500; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- Process ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.steps li { padding: 32px 28px 8px 0; position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps span { font-family: var(--mono); font-size: 13px; color: var(--mint); }
.steps h4 { font-weight: 500; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.045em; margin: 34px 0 10px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(80px, 10vw, 140px);
  padding: clamp(96px, 12vw, 170px) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(4, 6, 5, .55) 30%, rgba(4, 6, 5, .55) 70%, var(--bg) 100%),
    radial-gradient(50% 60% at 72% 50%, rgba(4, 6, 5, .9), rgba(4, 6, 5, .2));
}
.contact-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.contact-intro h2 { margin: 18px 0 24px; font-size: clamp(56px, 9vw, 150px); }
.contact-intro p { color: var(--ink-2); font-size: 19px; max-width: 30ch; }
.mail-link {
  display: inline-block;
  margin-top: 34px;
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: -.035em;
  border-bottom: 1px solid rgba(109, 255, 179, .5);
  padding-bottom: 4px;
  transition: color .25s, border-color .25s;
}
.mail-link:hover { color: var(--mint); border-color: var(--mint); }

.form-card {
  position: relative;
  border-radius: 28px;
  padding: clamp(24px, 3.4vw, 44px);
  background: rgba(10, 16, 13, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 60px 140px -60px rgba(34, 227, 132, .35);
}

.field { border: 0; margin-bottom: 20px; }
.field label, .field legend {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 17px;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus {
  border-color: var(--mint);
  background: rgba(109, 255, 179, .04);
  box-shadow: 0 0 0 4px rgba(109, 255, 179, .12);
}
.field .invalid { border-color: var(--down); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 15px;
  color: var(--ink-2);
  transition: all .2s;
}
.chip:hover span { border-color: rgba(255, 255, 255, .3); color: var(--ink); }
.chip input:checked + span { background: var(--mint); border-color: var(--mint); color: #03140b; }
.chip input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 3px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.privacy { font-size: 13px; color: var(--ink-3); max-width: 26ch; }
.form-status { margin-top: 16px; font-size: 15px; min-height: 1.4em; }
.form-status.error { color: var(--down); }
.form-status a { text-decoration: underline; }

.form-success { text-align: center; padding: 40px 0; }
.form-success[hidden] { display: none; }
.success-mark {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mint);
  color: #03140b;
  box-shadow: 0 0 40px rgba(109, 255, 179, .5);
}
.form-success h3 { font-weight: 500; font-size: 36px; letter-spacing: -.045em; }
.form-success p { color: var(--ink-2); margin-top: 8px; }

/* ---------- Footer ---------- */

.site-footer { padding: 56px var(--gutter) 40px; border-top: 1px solid var(--line); max-width: 1480px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.logo-sm { font-size: 17px; }
.footer-mail { font-size: 17px; color: var(--ink-2); transition: color .2s; }
.footer-mail:hover { color: var(--mint); }
.disclaimer { margin-top: 40px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); max-width: 92ch; }
.copy { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.steps li.reveal:nth-child(2) { transition-delay: .08s; }
.steps li.reveal:nth-child(3) { transition-delay: .16s; }
.steps li.reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .service, .contact-inner { grid-template-columns: 1fr; }
  .service:nth-of-type(even) { grid-template-columns: 1fr; }
  .service:nth-of-type(even) .service-text { order: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }
}

@media (max-width: 720px) {
  .site-header { grid-template-columns: auto 1fr; padding: 18px var(--gutter); }
  .nav-cta { display: none; }
  .nav-pill { justify-self: end; }
  .nav-pill a { font-size: 15px; padding: 7px 11px; }
  .logo { font-size: 18px; }
  .hero { padding-bottom: 64px; }
  .code { font-size: 11px; padding: 14px 16px; }
  .terminal { font-size: 10.5px; padding: 12px 16px; height: calc(7 * 1.7 * 10.5px + 24px); }
  .mc-stats div { padding: 14px 12px; }
  .mc-stats span { font-size: 11px; }
  .chart-legend { font-size: 10px; gap: 10px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); margin-top: 16px; }
  .steps h4 { margin-top: 18px; }
  .tag-sim { display: none; }
}

@media (max-width: 380px) {
  .nav-pill a { font-size: 14px; padding: 6px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .cursor, .caret, .live::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
