/* Black Rivet Tech — marketing site design system.
   Warm editorial paper + deep clinical emerald. Fraunces (display) + Inter (text). */

:root {
  --ink: #14160f;
  --ink-2: #2f342a;
  --muted: #6c7064;
  --paper: #f4f2ea;
  --paper-2: #faf9f3;
  --card: #ffffff;
  --line: #e4e1d5;
  --line-2: #d7d3c5;
  --accent: #1c6e57;
  --accent-ink: #124635;
  --accent-soft: #e7efe9;
  --amber: #b7791f;
  --amber-soft: #f6ecd8;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --shadow: 0 1px 2px rgba(20, 22, 15, 0.04), 0 12px 32px -12px rgba(20, 22, 15, 0.14);
  --shadow-sm: 0 1px 2px rgba(20, 22, 15, 0.05), 0 6px 16px -10px rgba(20, 22, 15, 0.16);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }

/* Subtle dot grid, extremely faint, only near the top */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(20, 22, 15, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 46%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 46%);
  pointer-events: none;
  z-index: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}

a { color: var(--accent-ink); text-decoration: none; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -3px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.22s ease;
}
.nav-link:hover::after { width: 100%; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 84px;
}
.hero-copy { max-width: 34rem; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #cfe0d5;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(28,110,87,0.18); }
h1.title {
  font-size: clamp(38px, 5.6vw, 62px);
  margin-bottom: 20px;
}
h1.title em { font-style: italic; color: var(--accent-ink); }
.lede {
  font-size: 18.5px;
  color: var(--ink-2);
  max-width: 33rem;
  margin: 0 0 30px;
}
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); background: var(--accent-ink); }
.btn-ghost { color: var(--ink); font-weight: 500; }
.btn-ghost:hover { color: var(--accent-ink); }
.btn-ghost .arrow { transition: transform 0.2s ease; }
.btn-ghost:hover .arrow { transform: translateX(3px); }

/* ---------- hero product card ---------- */
.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transform: rotate(0.4deg);
}
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mock-head .m-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.mock-head .m-brand .mark { width: 18px; height: 18px; color: var(--accent); }
.mock-time { font-size: 12px; color: var(--muted); }
.result {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.result .r-name { font-weight: 600; font-size: 14px; }
.result .r-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.flag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.flag.amber { background: var(--amber-soft); color: var(--amber); }
.ai-line {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px; color: var(--accent-ink);
  display: flex; gap: 9px; align-items: flex-start;
  margin-bottom: 12px;
}
.ai-line svg { flex: none; margin-top: 1px; }
.sent {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent-ink);
}
.sent .check {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; color: #fff;
}

/* ---------- features ---------- */
.section { padding: 18px 0; }
.rule { border: none; border-top: 1px solid var(--line); margin: 8px 0 0; }
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  padding: 64px 0 12px;
}
.feature .f-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.feature h3 { font-size: 19px; margin-bottom: 7px; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- statement band ---------- */
.band { padding: 90px 0; text-align: center; }
.band h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  max-width: 24ch; margin: 0 auto;
}
.band .sub { color: var(--muted); margin-top: 16px; font-size: 16px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;
}
.footer .f-brand { display: flex; align-items: center; gap: 10px; }
.footer .f-brand .mark { width: 22px; height: 22px; color: var(--accent); }
.footer .f-brand .name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 15px; }
.footer .f-links { display: flex; align-items: center; gap: 22px; }
.footer .f-links a { font-size: 14px; color: var(--ink-2); }
.footer .f-links a:hover { color: var(--accent-ink); }
.footer .copy { font-size: 13px; color: var(--muted); width: 100%; margin-top: 6px; }

/* ---------- legal pages ---------- */
.legal { max-width: 720px; padding-top: 8px; padding-bottom: 72px; }
.legal .back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); margin: 8px 0 26px; }
.legal .back:hover { color: var(--accent-ink); }
.legal h1 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 6px; }
.legal .eff { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.legal h2 { font-size: 21px; margin: 38px 0 10px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.legal .note { color: var(--muted); font-size: 13px; }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fade { animation: fadeUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.fade.d1 { animation-delay: 0.06s; }
.fade.d2 { animation-delay: 0.12s; }
.fade.d3 { animation-delay: 0.18s; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 60px; }
  .hero-visual { order: 2; }
  .features { grid-template-columns: 1fr; gap: 26px; padding: 48px 0 0; }
  .band { padding: 64px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav-tag { display: none; }
  .band { padding: 52px 0; }
}

/* ---------- early-access form ---------- */
.form-page { max-width: 560px; padding-top: 8px; padding-bottom: 72px; }
.form-page .back { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); margin: 8px 0 26px; }
.form-page .back:hover { color: var(--accent-ink); }
.form-page h1 { font-size: clamp(30px, 4.4vw, 42px); margin-bottom: 10px; }
.form-page .intro { color: var(--ink-2); font-size: 17px; margin: 0 0 30px; }
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28, 110, 87, 0.14);
}
.field input::placeholder, .field textarea::placeholder { color: #9aa093; }
/* honeypot — hidden from real users, catches bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { width: 100%; justify-content: center; margin-top: 4px; font-size: 15.5px; padding: 13px 20px; cursor: pointer; }
.form-submit[disabled] { opacity: 0.6; cursor: default; }
.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.form-msg { font-size: 14.5px; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; display: none; }
.form-msg.show { display: block; }
.form-msg.error { background: #fbe9e7; color: #a3341f; border: 1px solid #f1c4bb; }
/* success takeover */
.success { text-align: center; padding: 20px 8px; }
.success .tick {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px;
}
.success h2 { font-size: 26px; margin-bottom: 8px; }
.success p { color: var(--muted); margin: 0 auto; max-width: 34ch; }

/* =====================================================================
   Landing page — sections, rhythm, and motion
   ===================================================================== */

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(244, 242, 234, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom-color: var(--line);
}
.site-header .nav { padding: 16px 0; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--ink-2); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.22s ease;
}
.nav-links a:hover::after { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

section[id] { scroll-margin-top: 84px; }

/* Section scaffolding + alternating bands */
.sec { padding: 92px 0; }
.band-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 46px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 12px 0 0; }
.sec-head .sub { color: var(--muted); margin-top: 15px; font-size: 17px; line-height: 1.55; }

/* Stat strip */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat .stat-num {
  font-family: 'Fraunces', serif; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(38px, 5.5vw, 56px); color: var(--accent-ink); line-height: 1;
}
.stat .stat-label { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 22ch; margin-inline: auto; }

/* Problem / why — pain points */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pain {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.pain .p-ic { width: 34px; height: 34px; border-radius: 9px; background: #f6ecd8; color: var(--amber); display: grid; place-items: center; margin-bottom: 13px; }
.pain h3 { font-size: 17px; margin-bottom: 6px; }
.pain p { margin: 0; font-size: 14.5px; color: var(--muted); }
.why-close { margin-top: 34px; font-size: 19px; color: var(--ink); max-width: 46ch; }
.why-close strong { color: var(--accent-ink); }

/* How it works — numbered steps with connector */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 21px; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
  z-index: 0;
}
.step { position: relative; z-index: 1; }
.step .step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 19px; margin-bottom: 16px; box-shadow: 0 0 0 6px var(--paper);
}
.band-white .step .step-num { box-shadow: 0 0 0 6px #fff; }
.step h3 { font-size: 18px; margin-bottom: 7px; }
.step p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* Features — 6-up */
.features.six { grid-template-columns: repeat(3, 1fr); gap: 28px 30px; padding: 0; }
.features.six .feature {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.features.six .feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.role { border-top: 2px solid var(--accent); padding-top: 20px; }
.role h3 { font-size: 20px; margin-bottom: 8px; }
.role p { margin: 0; color: var(--muted); font-size: 15px; }

/* Marquee — works alongside */
.marquee { overflow: hidden; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track span { font-family: 'Fraunces', serif; font-size: 22px; color: var(--muted); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 0; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; font-family: 'Fraunces', serif; font-size: 19px;
  font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { flex: none; color: var(--accent); transition: transform 0.25s ease; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.faq-item[open] .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: hidden; }
.faq-body p { margin: 0 0 20px; color: var(--muted); font-size: 16px; max-width: 62ch; }

/* CTA band — emerald */
.cta-band { background: var(--accent-ink); color: #eaf3ee; text-align: center; }
.cta-band .wrap { padding-top: 78px; padding-bottom: 82px; }
.cta-band h2 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); max-width: 20ch; margin: 0 auto; }
.cta-band .sub { color: #bcd6c9; margin: 16px auto 30px; font-size: 17px; max-width: 44ch; }
.cta-band .btn-primary { background: #fff; color: var(--accent-ink); }
.cta-band .btn-primary:hover { background: #eaf3ee; }
.cta-band .cta-alt { display: block; margin-top: 18px; font-size: 14px; color: #bcd6c9; }
.cta-band .cta-alt a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Scroll-reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.07s; }
.reveal.d2 { transition-delay: 0.14s; }
.reveal.d3 { transition-delay: 0.21s; }
.reveal.d4 { transition-delay: 0.28s; }

/* Gentle float on the hero card + pulsing status dot */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0.4deg); } 50% { transform: translateY(-9px) rotate(0.4deg); } }
.mock { animation: float 7s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(28,110,87,0.18); } 50% { box-shadow: 0 0 0 6px rgba(28,110,87,0.06); } }
.chip .dot { animation: pulse 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .mock, .chip .dot, .marquee-track { animation: none !important; }
}

/* Responsive for new sections */
@media (max-width: 900px) {
  .sec { padding: 64px 0; }
  .stats { grid-template-columns: 1fr; gap: 30px; }
  .pains, .roles, .features.six { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .steps::before { display: none; }
  .nav-links { display: none; }
}

