/* ==========================================================================
   AMLShift — stylesheet
   Palette: deep navy ink on warm off-white, single deep-teal accent.
   Headings: Source Serif 4 (self-hosted, variable 600–700).
   Body: system sans stack.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-600-700.woff2") format("woff2");
}

:root {
  --ink: #1a2433;          /* primary text — deep navy-charcoal */
  --navy: #142337;         /* dark band background */
  --navy-deep: #0f1b2b;    /* footer */
  --paper: #f7f4ed;        /* warm off-white page background */
  --paper-raised: #fffdf8; /* card surfaces */
  --paper-tint: #f0ebe0;   /* alternate band */
  --teal: #1d6a64;         /* the one accent */
  --teal-dark: #15524d;
  --muted: #46505f;        /* secondary text on paper */
  --faint: #5d6675;        /* tertiary text on paper (still AA) */
  --line: #ddd5c5;         /* hairlines on paper */
  --line-dark: #2c3d52;    /* hairlines on navy */
  --on-navy: #e9e4d8;      /* body text on navy */
  --on-navy-dim: #aeb9c6;  /* secondary text on navy */

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1100px;
  --radius: 3px;
}

/* --- Reset (lite) --------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

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

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

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

main:focus { outline: none; }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

.lede { font-size: 1.1875rem; color: var(--muted); }

/* --- Layout ----------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.375rem;
}

.section { padding-block: 5.5rem; }

.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.375rem); }

[id] { scroll-margin-top: 5.5rem; }

/* --- Skip link --------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

.btn-small { font-size: 0.9rem; padding: 0.55rem 1rem; }

.ghost-link {
  display: inline-block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.ghost-link:hover { color: var(--teal-dark); border-color: var(--teal); }

/* --- Header / nav ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 237, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
}
.brand svg { width: 30px; height: 30px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav-links a:hover { color: var(--teal); }

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.375rem 1.5rem;
    box-shadow: 0 16px 32px -20px rgba(20, 35, 55, 0.35);
  }
  .nav-menu.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }
  .nav-cta { display: block; margin-top: 1.25rem; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 6rem 6.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-inner { position: relative; max-width: 44rem; }

.hero h1 {
  font-size: clamp(2.375rem, 5.6vw, 3.625rem);
  margin-bottom: 1.4rem;
}

.hero .lede { max-width: 38rem; margin-bottom: 2.25rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.hero-note {
  margin-top: 1.4rem;
  font-size: 0.875rem;
  color: var(--faint);
}

.hero-motif {
  position: absolute;
  right: -3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 430px;
  pointer-events: none;
}

@media (max-width: 1080px) { .hero-motif { display: none; } }
@media (max-width: 700px) { .hero { padding-block: 3.75rem 4.25rem; } }

/* --- Stats band -------------------------------------------------------------------- */

.stats {
  background: var(--navy);
  color: var(--on-navy);
  padding-block: 3.5rem 2.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.stat .stat-figure {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  color: #fff;
  line-height: 1.1;
}

.stat .stat-label {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--on-navy-dim);
  max-width: 14rem;
}

.stats-source {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.8125rem;
  color: var(--on-navy-dim);
}

@media (max-width: 920px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

/* --- Problem ------------------------------------------------------------------------- */

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: start;
}

.problem-grid h2 { font-size: clamp(1.75rem, 3.4vw, 2.375rem); }

.problem-body { font-size: 1.125rem; color: var(--muted); }
.problem-body strong { color: var(--ink); }

@media (max-width: 880px) {
  .problem-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* --- Services (What we manage) ---------------------------------------------------------- */

.services { background: var(--paper-tint); border-block: 1px solid var(--line); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.375rem;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.625rem;
}

.card svg {
  width: 30px;
  height: 30px;
  color: var(--teal);
  margin-bottom: 1.1rem;
}

.card h3 { font-size: 1.1875rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

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

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.75rem;
}

.step { border-top: 2px solid var(--teal); padding-top: 1.5rem; }

.step-number {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--teal);
  letter-spacing: 0.08em;
}

.step h3 { font-size: 1.3125rem; margin: 0.6rem 0 0.7rem; }
.step p { font-size: 0.9688rem; color: var(--muted); }

@media (max-width: 880px) { .steps { grid-template-columns: 1fr; gap: 2.25rem; } }

/* --- About ------------------------------------------------------------------------------------ */

.about { background: var(--paper-tint); border-block: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: start;
}

.about-grid h2 { font-size: clamp(1.75rem, 3.4vw, 2.375rem); }

.about-place {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  color: var(--faint);
}
.about-place svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

.about-body { font-size: 1.0938rem; color: var(--muted); }

.small-print {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8438rem;
  line-height: 1.6;
  color: var(--faint);
}

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

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

.faq-list { max-width: 50rem; border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  list-style: none;
  padding: 1.375rem 0.25rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1563rem;
  line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--teal-dark); }

.faq-marker {
  flex: none;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--teal);
  transform: translateY(2px);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-marker { transform: translateY(2px) rotate(45deg); }

.faq-item p {
  padding: 0 0.25rem 1.5rem;
  max-width: 44rem;
  color: var(--muted);
}

/* --- Final CTA ----------------------------------------------------------------------------------- */

.final-cta {
  background: var(--navy);
  color: var(--on-navy);
  text-align: center;
  padding-block: 5.5rem;
}

.final-cta h2 {
  color: #fff;
  font-size: clamp(1.875rem, 3.8vw, 2.625rem);
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.final-cta .sub-line { margin-top: 1.5rem; font-size: 0.9688rem; color: var(--on-navy-dim); }
.final-cta .sub-line a { color: var(--on-navy); }
.final-cta .sub-line a:hover { color: #fff; }

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

.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-dim);
  padding-block: 2.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.site-footer .footer-strap { color: var(--on-navy); max-width: 46rem; }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: #fff; }

.footer-meta {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

/* --- Privacy page ------------------------------------------------------------------------------------ */

.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.375rem; margin: 2.25rem 0 0.6rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.25rem; margin: 0.5rem 0 0; }
.prose li { margin-bottom: 0.35rem; }
.prose .updated { margin-top: 2.5rem; font-size: 0.875rem; color: var(--faint); }

/* --- Scroll reveal (motion-safe, JS-gated) --------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

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