/* ==========================================================================
   DataPulse — getdatapulse.tech
   Financial-editorial: warm paper, ledger green, hairline rules,
   spreadsheet motifs. Fraunces (display) / Schibsted Grotesk (body) /
   Spline Sans Mono (cell references & figures).
   ========================================================================== */

:root {
  --paper: #FBF8F2;
  --paper-2: #F4EFE5;
  --card: #FFFFFF;
  --ink: #16211B;
  --ink-soft: #4E5A52;
  --ink-faint: #7B857E;
  --green: #0E5B43;
  --green-deep: #0A4634;
  --green-tint: #E3EDE7;
  --red: #C03A20;
  --red-tint: #F9E7E2;
  --amber: #A97B12;
  --amber-tint: #F6EDD8;
  --line: rgba(22, 33, 27, 0.14);
  --line-soft: rgba(22, 33, 27, 0.08);
  --radius: 14px;
  --display: "Fraunces", Georgia, serif;
  --body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Sans Mono", "SF Mono", Consolas, monospace;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green); color: #fff; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 560; line-height: 1.12; letter-spacing: -0.01em; }

.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--green);
}

.cellref {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 70, 52, 0.35), 0 8px 24px -12px rgba(10, 70, 52, 0.5);
}
.btn-primary:hover {
  background: var(--green-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(10, 70, 52, 0.35), 0 12px 28px -12px rgba(10, 70, 52, 0.55);
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 9px 18px; font-size: 14px; }

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  /* faint ledger grid */
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
}
.hero::after {
  /* fade the grid toward the bottom so it doesn't fight the content */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 92%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 92px 0 100px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 58px);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}
.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-faint);
}
.hero-note strong { color: var(--ink-soft); font-weight: 600; }

/* ---------- Hero visual: sheet → pulse → email ---------- */

.hero-visual {
  position: relative;
  min-height: 380px;
}

.sheet-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -24px rgba(22, 33, 27, 0.25);
  overflow: hidden;
  width: min(400px, 100%);
}
.sheet-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}
.sheet-titlebar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-tint); border: 1px solid var(--line); }
.sheet-grid {
  display: grid;
  grid-template-columns: 34px repeat(3, 1fr);
  font-family: var(--mono);
  font-size: 12.5px;
}
.sheet-grid > div {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-grid .hd {
  background: var(--paper-2);
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}
.sheet-grid .num { text-align: right; color: var(--ink-soft); }
.sheet-grid .lbl { color: var(--ink); font-family: var(--body); font-size: 13px; }
.sheet-grid .err {
  background: var(--red-tint);
  color: var(--red);
  font-weight: 600;
  position: relative;
  animation: errPulse 2.4s ease-in-out infinite;
}
@keyframes errPulse {
  0%, 100% { box-shadow: inset 0 0 0 1.5px var(--red); }
  50% { box-shadow: inset 0 0 0 1.5px rgba(192, 58, 32, 0.35); }
}
.sheet-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 10px;
  background: var(--paper-2);
  font-size: 12px;
}
.sheet-tabs span {
  padding: 4px 12px;
  border-radius: 6px 6px 0 0;
  color: var(--ink-faint);
}
.sheet-tabs .on { background: var(--card); color: var(--ink); font-weight: 600; border: 1px solid var(--line-soft); border-bottom: none; }

/* the pulse line connecting sheet to email */
.pulse-line {
  position: absolute;
  left: 180px;
  top: 205px;
  width: 190px;
  height: 90px;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.pulse-line path {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.4s 0.7s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.email-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(340px, 92%);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 28px 56px -20px rgba(22, 33, 27, 0.55);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s 1.6s ease forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.email-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(251, 248, 242, 0.55);
  margin-bottom: 10px;
}
.email-subject {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.email-body {
  font-size: 13px;
  color: rgba(251, 248, 242, 0.72);
  line-height: 1.55;
}
.email-body code {
  font-family: var(--mono);
  font-size: 12px;
  color: #F1B8AA;
}
.email-tag {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9FD5BE;
  border: 1px solid rgba(159, 213, 190, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
}

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

section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 18px; }

.alt { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.step {
  background: var(--card);
  padding: 34px 30px 38px;
}
.step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: block;
}
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }
.step p code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--red-tint);
  color: var(--red);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ---------- Error chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.chip {
  font-family: var(--mono);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--red);
  font-weight: 500;
}
.chip.special { color: var(--amber); background: var(--amber-tint); border-color: transparent; }

/* ---------- Feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
  margin-top: 8px;
}
.feature { border-top: 1px solid var(--line); padding-top: 22px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px; }
.feature h3 .cellref { font-size: 11.5px; }
.feature p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- Privacy band ---------- */

.privacy-band {
  background: var(--green-deep);
  color: var(--paper);
  border: none;
}
.privacy-band .kicker { color: #9FD5BE; }
.privacy-band .kicker::before { background: #9FD5BE; }
.privacy-band h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  max-width: 21em;
  margin-bottom: 20px;
}
.privacy-band h2 em { font-style: italic; color: #9FD5BE; }
.privacy-band p { color: rgba(251, 248, 242, 0.78); max-width: 44em; font-size: 17.5px; }
.privacy-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 44px;
}
.privacy-col {
  border-top: 1px solid rgba(251, 248, 242, 0.25);
  padding-top: 20px;
}
.privacy-col h3 { font-size: 17px; margin-bottom: 10px; color: var(--paper); font-family: var(--body); font-weight: 700; }
.privacy-col ul { list-style: none; }
.privacy-col li {
  font-size: 15px;
  color: rgba(251, 248, 242, 0.75);
  padding: 5px 0 5px 24px;
  position: relative;
}
.privacy-col li::before {
  position: absolute;
  left: 0;
  font-family: var(--mono);
}
.privacy-col.yes li::before { content: "→"; color: #9FD5BE; }
.privacy-col.no li::before { content: "✕"; color: #E89B87; }
.privacy-band .link-light { color: #9FD5BE; }
.privacy-band .link-light:hover { color: #C4E7D6; }

/* ---------- Pricing ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--green);
  box-shadow: 0 20px 40px -24px rgba(10, 70, 52, 0.4);
  position: relative;
}
.price-flag {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
}
.price-name { font-family: var(--body); font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.price-amount { font-family: var(--display); font-size: 46px; font-weight: 560; letter-spacing: -0.02em; line-height: 1; }
.price-amount sup { font-size: 22px; top: -0.7em; }
.price-per { color: var(--ink-faint); font-size: 14px; margin: 8px 0 20px; }
.price-card ul { list-style: none; margin-bottom: 26px; flex: 1; }
.price-card li {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 5px 0 5px 22px;
  position: relative;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.price-note {
  margin-top: 36px;
  padding: 22px 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 15px;
  background: var(--card);
}

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 20px;
  color: var(--green);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 4px 24px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 62ch;
}
.faq details code { font-family: var(--mono); font-size: 13.5px; color: var(--red); }

/* ---------- Get started ---------- */

.get-started { text-align: center; }
.get-started .inner {
  max-width: 620px;
  margin: 0 auto;
}
.get-started h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 16px; }
.get-started p { color: var(--ink-soft); font-size: 17.5px; margin-bottom: 30px; }

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

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 44px 0 52px;
  background: var(--paper);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer .brand-name { font-size: 18px; }
.footer-tag { font-size: 13.5px; color: var(--ink-faint); margin-top: 8px; max-width: 30em; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { width: 100%; margin-top: 28px; font-size: 13px; color: var(--ink-faint); }

/* ---------- Legal / document pages ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.doc h1 { font-size: clamp(34px, 4.4vw, 46px); margin-bottom: 12px; }
.doc .doc-date { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); margin-bottom: 44px; display: block; }
.doc h2 { font-size: 24px; margin: 44px 0 14px; }
.doc h3 { font-size: 18px; margin: 28px 0 10px; font-family: var(--body); font-weight: 700; }
.doc p, .doc li { color: var(--ink-soft); font-size: 16px; }
.doc p { margin-bottom: 14px; }
.doc ul, .doc ol { margin: 0 0 14px 22px; }
.doc li { margin-bottom: 6px; }
.doc blockquote {
  border-left: 3px solid var(--green);
  background: var(--green-tint);
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-size: 16.5px;
  color: var(--ink);
}
.doc code { font-family: var(--mono); font-size: 14px; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* hero load stagger */
.hero .fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.65s ease forwards;
}
.hero .fade-up:nth-child(1) { animation-delay: 0.05s; }
.hero .fade-up:nth-child(2) { animation-delay: 0.15s; }
.hero .fade-up:nth-child(3) { animation-delay: 0.25s; }
.hero .fade-up:nth-child(4) { animation-delay: 0.35s; }
.hero .fade-up:nth-child(5) { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero .fade-up, .email-card, .reveal { opacity: 1; transform: none; }
  .pulse-line path { stroke-dashoffset: 0; }
}

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

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0 72px; gap: 48px; }
  .hero-visual { min-height: 0; padding-bottom: 40px; }
  .pulse-line { display: none; }
  .email-card { position: relative; margin: -28px 0 0 auto; animation-delay: 0.9s; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 28px; }
  .privacy-cols { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 440px; }
  section { padding: 72px 0; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) { display: none; }
}
