/* =========================================================
   Trust Relay — Warm Editorial Prototype
   ========================================================= */

:root {
  /* ---- Warm editorial palette ---- */
  --cream:        #F5EFE3;
  --cream-deep:   #ECE3CF;
  --cream-soft:   #FAF6EC;
  --paper-line:   #B5A682;  /* darkened — passes 3:1 non-text contrast for borders */
  --paper-line-soft: #D8CDB5;

  --ink:          #1A1410;
  --ink-soft:     #3A322B;
  --ink-muted:    #6F6258;
  --ink-faint:    #766858;  /* darkened 2026-05-21 — was #9A8F82 (failed WCAG AA on cream) */

  --oxblood:      #6E2530;
  --oxblood-deep: #4E1820;
  --oxblood-soft: #8B3A45;
  --gold:         #A48450;

  /* ---- Type ---- */
  --serif: 'EB Garamond', 'Iowan Old Style', 'Georgia', serif;
  --sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Rhythm ---- */
  --pad-x: clamp(24px, 5vw, 64px);
  --section-y: clamp(56px, 8vw, 104px);
  --max: 1240px;
  --read: 64ch;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }

::selection { background: var(--oxblood); color: var(--cream-soft); }

.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--ink); color: var(--cream-soft);
  padding: 8px 16px; z-index: 100;
  font-size: 14px;
}
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* =========================================================
   Typography
   ========================================================= */

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oxblood);
  display: inline-block;
}
.eyebrow-on-dark { color: var(--cream-soft); opacity: 0.85; }

.section-eyebrow-h {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 0;
  align-self: start;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--oxblood);
}

h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { max-width: var(--read); }

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 52ch;
}

.section-lede {
  font-size: 18px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 56ch;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 227, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--paper-line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  line-height: 1;
  color: var(--ink);
}
.wordmark-shield {
  width: auto;
  height: 40px;
  display: block;
  flex-shrink: 0;
}
.wordmark-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.wordmark-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.wordmark-sub {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  line-height: 1;
  color: var(--ink);
}
.footer-logo img {
  height: 56px;
  width: auto;
  display: block;
}
.footer-logo .wordmark-name {
  font-size: 28px;
}
.footer-logo .wordmark-sub {
  font-size: 11px;
  letter-spacing: 0.24em;
  margin-top: 6px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.primary-nav a {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  transition: color .2s ease;
}
.primary-nav a:hover { color: var(--oxblood); }
.primary-nav a:not(.nav-cta-link)::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--oxblood);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.primary-nav a:not(.nav-cta-link):hover::after { transform: scaleX(1); }

.nav-cta-link {
  color: var(--oxblood) !important;
  font-weight: 500;
  border-bottom: 1px solid var(--oxblood);
  padding-bottom: 2px;
}
.nav-cta-link span { display: inline-block; transition: transform .2s ease; margin-left: 2px; }
.nav-cta-link:hover span { transform: translateX(3px); }

/* Hamburger toggle for the mobile nav. Hidden on desktop. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--paper-line);
  background: var(--cream);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-toggle:hover { border-color: var(--ink-soft); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after  { top:  6px; }
/* Animate to an X when the menu is open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: 0 32px 64px -32px rgba(26, 20, 16, 0.35);
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero-copy h1 { margin-top: 4px; }
.hero-copy .lede { margin-top: -4px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  max-width: none;
  margin-top: 8px;
}

.link-cta {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--oxblood);
  letter-spacing: -0.005em;
  border-bottom: 1.5px solid var(--oxblood);
  padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
}
.link-cta span { display: inline-block; margin-left: 4px; transition: transform .2s ease; }
.link-cta:hover { color: var(--oxblood-deep); border-bottom-color: var(--oxblood-deep); }
.link-cta:hover span { transform: translateX(4px); }
.link-cta-light {
  color: var(--cream-soft);
  border-bottom-color: var(--cream-soft);
}
.link-cta-light:hover { color: var(--cream); border-bottom-color: var(--cream); }

.link-quiet {
  font-size: 15px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
}
.link-quiet:hover { color: var(--ink); border-bottom-color: var(--ink-soft); }

.hero-meta {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  font-weight: 500;
  padding-top: 24px;
  border-top: 1px solid var(--paper-line-soft);
  width: 100%;
}

/* =========================================================
   Pull-quote section
   ========================================================= */

.quote-section {
  padding: var(--section-y) 0;
  background: var(--cream-soft);
  border-top: 1px solid var(--paper-line-soft);
  border-bottom: 1px solid var(--paper-line-soft);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.pull-quote {
  position: relative;
  padding-left: clamp(40px, 5vw, 64px);
}
.quote-mark {
  position: absolute;
  top: -58px; left: -14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(88px, 10vw, 132px);
  color: var(--oxblood);
  opacity: 0.16;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.pull-quote blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.012em;
  max-width: 24ch;
}
.pull-quote figcaption {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-line);
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  max-width: 38ch;
  line-height: 1.5;
}

.quote-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(26, 20, 16, 0.28);
}
.quote-image img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.06) saturate(0.92);
}

/* =========================================================
   Stats / problem (typographic)
   ========================================================= */

.stats-section { padding: var(--section-y) 0; }

.stats-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.stats-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.012em;
  max-width: 28ch;
  margin-bottom: 64px;
}
.stats-lead--tight { margin-bottom: 32px; }
.stats-lead em {
  font-style: italic;
  color: var(--oxblood);
}
/* Homepage "The Problem" — a real serif heading, not the tiny eyebrow label. */
.stats-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Editorial aphorism between the leads and the stats row on the
   homepage. Italic, regular weight — reads as a beat, not a
   competing headline. Bolder or larger and it shouts louder than
   the stat numbers below it. */
.stats-hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.008em;
  color: var(--oxblood);
  margin: 8px 0 40px;
  max-width: 40ch;
  text-align: left;
}
.stats-hero-quote em {
  font-weight: 500;
  color: var(--oxblood-deep);
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: stretch;
  padding-top: 36px;
  border-top: 1px solid var(--paper-line);
}

.stat { display: flex; flex-direction: column; gap: 18px; }
.stat-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.stat-pct {
  font-size: 0.55em;
  color: var(--oxblood);
  font-style: italic;
  font-weight: 400;
  margin-left: 4px;
  vertical-align: super;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 32ch;
}

/* Compact stat number used on the homepage problem section, where two
   numbers sit side-by-side under the editorial quote. Roughly half the
   size of the default .stat-num used on /security. */
.stat-num--compact {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* Source citation under a stat, set in serif italic at small size. */
.stat-citation {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-top: -10px;
}

.stat-divider { width: 1px; background: var(--paper-line); }

/* =========================================================
   Steps — editorial numbered list
   ========================================================= */

.steps-section { padding: var(--section-y) 0; background: var(--cream-soft); border-top: 1px solid var(--paper-line-soft); border-bottom: 1px solid var(--paper-line-soft); }

.steps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.steps-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.steps-head h2 em { font-style: italic; color: var(--oxblood); }

.step-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--paper-line);
  max-width: 880px;
}
.step-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(36px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--paper-line);
  align-items: start;
}
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 6vw, 80px);
  line-height: 1;
  color: var(--oxblood);
  opacity: 0.85;
  letter-spacing: -0.03em;
}
.step-body { display: flex; flex-direction: column; gap: 14px; }
/* Optional Guided Setup note below the three steps. */
.steps-addon { margin-top: 28px; }
.step-body h3 { color: var(--ink); }
.step-body p {
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 58ch;
}

/* =========================================================
   Trust signals — typographic block
   ========================================================= */

.trust-section { padding: var(--section-y) 0; }

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
.trust-grid h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  max-width: 14ch;
}
.trust-more {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-muted);
}

.trust-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3.5vw, 48px) clamp(40px, 5vw, 72px);
}
.trust-list li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  padding-top: 18px;
  border-top: 1px solid var(--paper-line);
}
.trust-label {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

/* =========================================================
   Closing section — full-bleed photographic
   ========================================================= */

.closing-section {
  position: relative;
  isolation: isolate;
  padding: clamp(72px, 10vw, 128px) 0;
  color: var(--cream-soft);
  overflow: hidden;
}
.closing-image {
  position: absolute; inset: 0;
  z-index: -1;
}
.closing-image::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 20, 16, 0.55) 0%, rgba(26, 20, 16, 0.78) 100%);
}
.closing-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(0.96);
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  max-width: 760px;
}
.closing-section h2 {
  color: var(--cream-soft);
  font-size: clamp(34px, 4.5vw, 60px);
}
.closing-section h2 em {
  color: var(--cream);
  font-style: italic;
  opacity: 0.92;
}
.closing-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: rgba(245, 239, 227, 0.82);
  line-height: 1.6;
  max-width: 52ch;
}
.closing-actions { margin-top: 8px; }
.closing-meta {
  font-size: 13px;
  color: rgba(245, 239, 227, 0.6);
  letter-spacing: 0.02em;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 239, 227, 0.18);
  width: 100%;
  max-width: 760px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: clamp(56px, 7vw, 88px) 0 32px;
  background: var(--cream);
  border-top: 1px solid var(--paper-line);
}

.footer-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--paper-line-soft);
}

.footer-tag {
  margin-top: 20px;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 32ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--oxblood); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-bottom a {
  color: var(--oxblood);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom a:hover { text-decoration: none; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 880px) {
  body { font-size: 17px; }

  /* Mobile nav: show the hamburger; nav becomes a drop-down panel
     that slides out from the top below the header when .is-open. */
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--paper-line);
    box-shadow: 0 16px 32px -16px rgba(26, 20, 16, 0.18);
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .25s ease, visibility 0s .25s;
  }
  .primary-nav.is-open {
    max-height: 80vh;
    visibility: visible;
    transition: max-height .3s ease, visibility 0s 0s;
  }
  .primary-nav a {
    font-size: 17px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--paper-line-soft);
  }
  .primary-nav a:last-child { border-bottom: none; }
  /* Drop the underline-on-hover animation on mobile (the items are
     already row-style) */
  .primary-nav a:not(.nav-cta-link)::after { display: none; }
  .nav-cta-link { border-bottom: 1px solid var(--paper-line-soft); padding-bottom: 16px; }

  /* Prevent body scroll while the mobile menu is open */
  body.nav-open { overflow: hidden; }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { aspect-ratio: 4 / 3; }

  .quote-grid { grid-template-columns: 1fr; gap: 40px; }
  .quote-image { aspect-ratio: 4 / 3; max-width: 480px; }

  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-row { grid-template-columns: 1fr; gap: 40px; }
  .stat-divider { display: none; }

  .step-item { grid-template-columns: 1fr; gap: 12px; }
  .step-num { font-size: 56px; }

  .trust-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust-list { grid-template-columns: 1fr; gap: 28px; }

  .footer-row { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 480px) {
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reversed mark in homepage closing section */
.closing-mark {
  margin-bottom: 28px;
}
.closing-mark img {
  height: 64px;
  width: auto;
  display: block;
}
