/* ================================================================
   RolePilot Marketing Site — Shared Stylesheet
   Editorial clinical aesthetic. Restrained. Confident.

   Typography pairing: Fraunces (display, optical-sized variable serif)
   + IBM Plex Sans (body, institutional sans). Loaded from Google Fonts.

   Palette:
     --paper      #FAFAF7   warm off-white background
     --ink        #0A1628   deep clinical navy (text, headings)
     --rule       #0A162820 navy at 12% — for hairline rules
     --accent     #0D9488   warm teal (single accent, used sparingly)
     --accent-ink #064E47   deep teal for hover / pressed states
     --cream      #F4EFE6   warm divider band
     --muted      #57534E   secondary text
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..900,0..100&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper:      #FAFAF7;
  --ink:        #0A1628;
  --ink-soft:   #1F2937;
  --rule:       rgba(10, 22, 40, 0.12);
  --rule-strong: rgba(10, 22, 40, 0.24);
  --accent:     #0D9488;
  --accent-ink: #064E47;
  --cream:      #F4EFE6;
  --muted:      #57534E;
  --muted-soft: #78716C;
  --serif:      'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:       'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:       'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --max-w:      1280px;
  --gutter:     clamp(1.5rem, 4vw, 4rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  /* Subtle prescription-pad cross-hatch behind everything.
     Two thin diagonal lines, very low opacity, paper-grained feel. */
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 38px,
      rgba(10, 22, 40, 0.012) 38px,
      rgba(10, 22, 40, 0.012) 39px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 38px,
      rgba(10, 22, 40, 0.008) 38px,
      rgba(10, 22, 40, 0.008) 39px
    );
}

/* ── Type scale (editorial, optical-sized via Fraunces) ───────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.022em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.04;
  font-variation-settings: "opsz" 144, "wght" 360, "SOFT" 30;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  font-variation-settings: "opsz" 72, "wght" 380, "SOFT" 20;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  font-variation-settings: "opsz" 36, "wght" 500;
}

h4 {
  font-size: 1.05rem;
  line-height: 1.3;
  font-variation-settings: "opsz" 24, "wght" 600;
}

p { margin: 0 0 1em; }

p.lead {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 38em;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 160ms ease, color 160ms ease;
}
a:hover { border-color: var(--accent); color: var(--accent-ink); }

a.unstyled { border: none; }
a.unstyled:hover { color: var(--accent-ink); }

strong { font-weight: 600; }

::selection { background: var(--accent); color: var(--paper); }

/* ── Page chrome ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "wght" 500;
  font-size: 1.15rem;
  color: var(--ink);
  border: none;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  position: relative;
  flex: 0 0 auto;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.92rem;
}
.nav-primary a {
  border: none;
  color: var(--muted);
  font-weight: 400;
}
.nav-primary a:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  transition: background 160ms ease;
}
.nav-cta:hover { background: var(--accent-ink); color: var(--paper); }

@media (max-width: 720px) {
  .nav-primary { gap: 1.1rem; font-size: 0.86rem; }
  .nav-primary a:not(.nav-cta) { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-eyebrow::before {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  background: var(--accent);
}
.hero-eyebrow--bright {
  color: #5EEAD4;
}
.hero-eyebrow--bright::before {
  background: #5EEAD4;
}
.hero h1 {
  margin-bottom: 1.4rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-ink);
  font-variation-settings: "opsz" 144, "wght" 320, "SOFT" 60;
}
.hero-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-soft);
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.hero-stack {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "wght" 380;
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1.4rem;
  max-width: 30em;
}
.hero-stack-list {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--muted);
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

/* ECG-inspired horizontal rule */
.rule-ecg {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  border: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 28' preserveAspectRatio='none'><path d='M0 14 L80 14 L100 14 L108 6 L116 22 L124 4 L132 14 L160 14 L260 14 L268 14 L276 8 L284 20 L292 14 L400 14' stroke='%230A1628' stroke-opacity='0.18' stroke-width='1' fill='none'/></svg>");
  background-repeat: repeat-x;
  background-size: 400px 28px;
}

/* ── Stack replacement (the heart of the value prop) ──────────── */
.stack-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-bottom: 1px solid var(--rule);
}
.stack-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) {
  .stack-grid { grid-template-columns: 1fr; }
}
.stack-section .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1rem;
}
.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.stack-list li {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  font-size: 1.02rem;
}
.stack-list .num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted-soft);
  font-feature-settings: "tnum";
  width: 2.5em;
}
.stack-list .what { color: var(--ink-soft); }
.stack-list .what strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 24, "wght" 460;
  font-size: 1.18rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}
.stack-list .what span {
  color: var(--muted);
  font-size: 0.93rem;
}
.stack-list .price {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
  font-feature-settings: "tnum";
  white-space: nowrap;
}
.stack-total {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink);
}
.stack-total .total-amount {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 36, "wght" 500;
  font-size: 1.6rem;
  color: var(--accent-ink);
}

/* ── Differentiators ─────────────────────────────────────────── */
.diff-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}
.diff-section h2 {
  max-width: 22ch;
  margin-bottom: 0.8rem;
}
.diff-section .lead {
  margin-bottom: 3rem;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1rem;
}
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
@media (max-width: 880px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .diff-grid { grid-template-columns: 1fr; }
}
.diff-card {
  background: var(--cream);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.diff-card .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  text-transform: uppercase;
}
.diff-card h3 {
  margin: 0;
  font-variation-settings: "opsz" 36, "wght" 460;
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}
.diff-card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0;
  line-height: 1.55;
}

/* ── Compliance / trust band ─────────────────────────────────── */
.trust-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--rule);
}
.trust-section .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1.5rem;
}
.trust-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  align-items: center;
}
.trust-mark {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "wght" 360;
  font-size: 1.15rem;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.trust-mark::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Waitlist CTA ────────────────────────────────────────────── */
.waitlist-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--ink);
  color: var(--paper);
}
.waitlist-section h2 {
  color: var(--paper);
  max-width: 18ch;
}
.waitlist-section h2 em {
  font-style: italic;
  color: #5EEAD4;
  font-variation-settings: "opsz" 72, "wght" 320, "SOFT" 60;
}
.waitlist-section p.lead {
  color: rgba(250, 250, 247, 0.75);
  margin-bottom: 2.5rem;
}
.waitlist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) {
  .waitlist-grid { grid-template-columns: 1fr; }
}
.waitlist-form {
  display: grid;
  gap: 1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.6);
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(250, 250, 247, 0.05);
  border: 1px solid rgba(250, 250, 247, 0.15);
  border-radius: 6px;
  color: var(--paper);
  transition: border-color 160ms ease, background 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #5EEAD4;
  background: rgba(250, 250, 247, 0.08);
}
.field input::placeholder, .field textarea::placeholder {
  color: rgba(250, 250, 247, 0.35);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1L6 6L11 1' stroke='%23FAFAF7' stroke-opacity='0.5' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  padding-right: 2.5rem;
}
.field select option { background: var(--ink); color: var(--paper); }
.btn-primary {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.95rem 1.5rem;
  background: #5EEAD4;
  color: var(--ink);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.005em;
  transition: background 160ms ease, transform 160ms ease;
  margin-top: 0.5rem;
}
.btn-primary:hover { background: var(--paper); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: rgba(250, 250, 247, 0.2);
  color: rgba(250, 250, 247, 0.5);
  cursor: not-allowed;
}
.form-status {
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
  color: rgba(250, 250, 247, 0.6);
}
.form-status.error { color: #FCA5A5; }
.form-status.success { color: #5EEAD4; }
.waitlist-aside {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "wght" 360;
  font-size: 1.25rem;
  line-height: 1.5;
  color: rgba(250, 250, 247, 0.85);
  font-style: italic;
  border-left: 1px solid rgba(94, 234, 212, 0.4);
  padding-left: 1.5rem;
}
.waitlist-aside .small {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5EEAD4;
  display: block;
  margin-top: 1.2rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  background: var(--paper);
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-weight: 500;
  font-variation-settings: normal;
  margin-bottom: 0.8rem;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-grid a {
  border: none;
  color: var(--ink-soft);
}
.footer-grid a:hover { color: var(--accent-ink); }
.site-footer .brand-block {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "wght" 380;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.site-footer .brand-tag {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 28ch;
}
.footer-meta {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-soft);
  letter-spacing: 0.04em;
}

/* ── Legal pages (privacy, terms) ────────────────────────────── */
.legal-page {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.legal-page .container {
  max-width: 760px;
}
.legal-page .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 2rem;
}
.legal-page h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}
.legal-page h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
}
.legal-page h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}
.legal-page p, .legal-page li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.legal-page ul, .legal-page ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}
.legal-page li { margin-bottom: 0.5rem; }
.legal-page .toc {
  border: 1px solid var(--rule);
  background: var(--cream);
  padding: 1.5rem 2rem;
  border-radius: 4px;
  margin: 2rem 0 3rem;
}
.legal-page .toc h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-weight: 500;
  font-variation-settings: normal;
  margin-bottom: 0.8rem;
}
.legal-page .toc ol {
  list-style: decimal;
  padding-left: 1.4rem;
  margin: 0;
}
.legal-page .toc li {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.legal-page address {
  font-style: normal;
  font-family: var(--sans);
  background: var(--cream);
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  margin: 1rem 0;
}

/* ── Contact page ───────────────────────────────────────────── */
.contact-page {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.contact-page .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1.5rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-card {
  background: var(--cream);
  padding: 2rem;
  border-radius: 4px;
}
.contact-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.contact-card .item {
  margin-bottom: 1rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.contact-card .item strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-soft);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

/* ── Page-load reveal animation ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: reveal 720ms cubic-bezier(0.2, 0.6, 0.25, 1) forwards;
  }
  .reveal-1 { animation-delay: 80ms; }
  .reveal-2 { animation-delay: 200ms; }
  .reveal-3 { animation-delay: 340ms; }
  .reveal-4 { animation-delay: 480ms; }
  .reveal-5 { animation-delay: 620ms; }
  @keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
  }
}
