/* Habits of Data — marketing/signup site
   Palette: near-black + white primary, blue accent (matches the internal
   back-office app's branding). Light content sections for readability and
   trust; dark hero/footer bookends for the "sleek" brand feel. */

:root {
  --ink-950: #0a0a0d;
  --ink-900: #12131a;
  --ink-800: #1c1e29;
  --paper: #ffffff;
  --paper-dim: #f5f6f9;
  --border: #e2e4ec;
  --text: #1a1b23;
  --text-dim: #565a6e;
  --text-on-dark: #f4f5f9;
  --text-on-dark-dim: #b7bad0;
  --accent: #3552b0;
  --accent-strong: #28418f;
  --accent-tint: #eef1fb;
  --danger: #b3261e;
  --danger-tint: #fbeceb;
  --focus: #7ba0ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 18, 40, 0.06), 0 8px 24px rgba(16, 18, 40, 0.06);
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-word {
  font-family: "Space Mono", "SFMono-Regular", ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

img { max-width: 100%; display: block; }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* Visible focus ring everywhere, no removal without replacement */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  background: var(--ink-950);
  color: var(--text-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-on-dark);
}
.brand img { height: 28px; width: auto; }
.brand-word { font-size: 15px; color: var(--text-on-dark); }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  color: var(--text-on-dark-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a:hover { color: var(--text-on-dark); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 8px;
}
.nav-cta:hover { background: var(--accent-strong); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 100%);
  color: var(--text-on-dark);
  padding: 72px 24px 96px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--focus);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  color: #fff;
  max-width: 900px;
  margin: 0 auto 20px;
}
.hero p.lede {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--text-on-dark-dim);
  max-width: 620px;
  margin: 0 auto 32px;
}
.btn {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Trust section */
.trust {
  padding: 72px 24px;
  background: var(--paper);
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head p { color: var(--text-dim); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.trust-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.trust-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.trust-card h3 { font-size: 15px; margin-bottom: 8px; }
.trust-card p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* Signup section */
.signup {
  background: var(--paper-dim);
  padding: 72px 24px 96px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.form-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px;
}
.form-card h2 { font-size: 22px; margin-bottom: 6px; }
.form-card > p.intro { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.field-group { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}
label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.optional-tag {
  font-weight: 500;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 8px;
}
input:focus, select:focus { border-color: var(--accent); }
select { appearance: auto; }
.field-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 6px 0 0;
}
.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
}
.pw-toggle:hover { color: var(--text); }
.icon-eye-off { display: none; }
.pw-field[data-visible="true"] .icon-eye { display: none; }
.pw-field[data-visible="true"] .icon-eye-off { display: block; }

.credential-block {
  background: var(--accent-tint);
  border: 1px solid #d7dff5;
  border-radius: 10px;
  padding: 18px 18px 6px;
  margin-bottom: 22px;
}
.credential-block .credential-note {
  font-size: 13px;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  cursor: pointer;
}
.checkbox-row input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }

.alert {
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.alert-error {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid #f0c6c3;
}

.form-footnote {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 18px;
  text-align: center;
}

/* Submission target — see the HTML comment above the <iframe> for why */
.intake-status {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 20px;
}
.intake-frame {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  height: 0;
  opacity: 0;
  margin-top: 0;
  transition: height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}
.intake-frame.is-visible {
  height: 600px;
  opacity: 1;
  margin-top: 24px;
}

/* Honeypot — off-screen, never visible/reachable to real visitors */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
.site-footer {
  background: var(--ink-950);
  color: var(--text-on-dark-dim);
  padding: 48px 24px 28px;
  font-size: 13.5px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand img { height: 20px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-on-dark-dim); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-legal {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--ink-800);
  color: #7b7f96;
  line-height: 1.6;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink-950);
  color: var(--text-on-dark);
  padding: 18px 24px;
  z-index: 500;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
}
.cookie-banner[hidden] { display: none; }
.cookie-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
}
.cookie-text { font-size: 13.5px; color: var(--text-on-dark-dim); max-width: 720px; }
.cookie-text a { color: var(--text-on-dark); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-ghost {
  background: transparent;
  color: var(--text-on-dark);
  border: 1.5px solid var(--ink-800);
}
.btn-ghost:hover { background: var(--ink-800); }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }

/* Legal pages */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.legal-page h1 { font-size: 28px; margin-bottom: 6px; }
.legal-page .updated { color: var(--text-dim); font-size: 13.5px; margin-bottom: 36px; }
.legal-page h2 { font-family: "Inter", sans-serif; font-size: 18px; margin-top: 36px; }
.legal-page h3 { font-family: "Inter", sans-serif; font-size: 15px; margin-top: 20px; }
.legal-page p, .legal-page li { color: var(--text-dim); font-size: 15px; }
.legal-page ul { padding-left: 22px; }
.legal-page strong { color: var(--text); }
.legal-note {
  background: var(--accent-tint);
  border: 1px solid #d7dff5;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--accent-strong);
  margin-bottom: 32px;
}

/* Thank-you / status states used on this site's own pages */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
