/* ==========================================================================
   Senior Signal — Global Stylesheet
   Design priority order: Trust > Readability > Simplicity > Accessibility >
   Conversion > Visual polish > Animation  (see Brand Bible §34.2)
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------------------------------------- */
:root {
  /* Color: Primary */
  --color-navy: #173F6B;      /* headings, nav, footer, emphasis */
  --color-navy-dark: #102C4C; /* hover state for navy elements */
  --color-blue: #4F83B6;      /* links, icons, secondary accents */
  --color-gold: #D3A64B;      /* primary CTA accent — used sparingly */
  --color-gold-dark: #BD9140; /* gold hover state */

  /* Color: Neutrals */
  --color-bg: #FAF9F6;        /* primary page background */
  --color-bg-alt: #F1F4F6;    /* alternating sections / cards */
  --color-white: #FFFFFF;
  --color-text: #2D3742;      /* body text */
  --color-text-muted: #62707C;/* secondary / muted text */
  --color-border: #DDE3E8;

  /* Color: Reserved — real scam examples / urgent safety notices only */
  --color-red: #A6362C;
  --color-red-bg: #FBEEEC;

  /* Typography */
  --font-heading: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Atkinson Hyperlegible', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale: mobile → desktop (see §11.2) */
  --text-h1: clamp(2.375rem, 5.4vw, 4rem);       /* 38px – 64px */
  --text-h2: clamp(1.875rem, 3.6vw, 2.75rem);    /* 30px – 44px */
  --text-h3: clamp(1.5rem, 2.4vw, 2rem);         /* 24px – 32px */
  --text-body: clamp(1.125rem, 1vw, 1.25rem);    /* 18px – 20px */
  --text-small: 1rem;                            /* 16px */
  --text-button: clamp(1.125rem, 1vw, 1.25rem);  /* 18px – 20px */

  /* Spacing scale — bumped in V1.1 for more breathing room sitewide */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 2.75rem;
  --space-xl: 4.5rem;
  --space-2xl: 7rem;

  /* Layout */
  --content-max-width: 1120px;
  --text-max-width: 700px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --header-height: 84px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;
}

/* -------------------------------------------------------------------------
   2. Reset & Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  font-weight: 700;
}

h1 { font-size: var(--text-h1); line-height: 1.15; }
h2 { font-size: var(--text-h2); line-height: 1.2; }
h3 { font-size: var(--text-h3); line-height: 1.25; }

p {
  margin: 0 0 var(--space-sm);
  max-width: var(--text-max-width);
}

p.no-max { max-width: none; }

a {
  color: var(--color-blue);
  text-underline-offset: 3px;
}

a:hover { text-decoration: underline; }

/* Visible focus state — required for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

ul, ol { padding-left: 1.25em; }
li { margin-bottom: var(--space-xs); }

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  max-width: var(--text-max-width);
  margin-bottom: var(--space-lg);
}

.section-header.center {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Wider centered header for short, wide headlines that would otherwise
   wrap awkwardly inside the standard 640px centered column. */
.section-header.center-wide {
  max-width: 900px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.text-muted { color: var(--color-text-muted); }

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* -------------------------------------------------------------------------
   3. Buttons (CTA System — §14)
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-size: var(--text-button);
  font-weight: 700;
  text-decoration: none !important;
  border-radius: var(--radius-pill);
  padding: 0.9em 1.9em;
  min-height: 48px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  line-height: 1.2;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary: warm gold background, deep navy text */
.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-navy);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background-color: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
}

/* Secondary: light background, navy border + text */
.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-secondary:hover {
  background-color: var(--color-bg-alt);
}

.btn-block { width: 100%; }

@media (max-width: 640px) {
  .btn { width: 100%; }
  .btn.btn-inline { width: auto; }
}

/* -------------------------------------------------------------------------
   4. Header & Navigation (§13.1)
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  /* Full-bleed header: give the nav the whole viewport width to work
     with (rather than the standard 1120px content container) so all
     six links plus the CTA fit on one line without wrapping. */
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: var(--space-lg);
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo a {
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex: 1;
  justify-content: space-between;
  margin-left: var(--space-xl);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

/* Distinct nav typeface — Source Sans 3, uppercase and letter-spaced —
   so links read clearly as navigation rather than body or heading text. */
.main-nav a {
  display: inline-block;
  color: var(--color-navy);
  font-family: 'Source Sans 3', var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-blue);
  text-decoration: underline;
}

.nav-cta {
  flex-shrink: 0;
  padding: 0.9em 2.2em;
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-sm);
  padding: 0.5em 0.7em;
  min-height: 48px;
  min-width: 48px;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--color-navy);
  border-radius: 2px;
  position: relative;
  transition: background var(--transition-fast);
}

.nav-toggle-icon::before { content: ""; position: absolute; top: -7px; }
.nav-toggle-icon::after { content: ""; position: absolute; top: 7px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin-left: 0;
    padding: var(--space-lg) var(--space-md);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
  }

  .main-nav.is-open { transform: translateX(0); }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
    flex-wrap: wrap;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a {
    display: block;
    padding: var(--space-md) var(--space-xs);
    font-size: 1.2rem;
    white-space: normal;
  }

  .nav-cta {
    width: 100%;
    margin-top: var(--space-lg);
  }
}

/* -------------------------------------------------------------------------
   5. Footer (§13.2)
   ------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-navy);
  color: var(--color-bg);
  padding: var(--space-xl) 0 var(--space-lg);
}

.site-footer a {
  color: var(--color-bg);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.footer-brand {
  max-width: 340px;
}

.footer-brand img {
  height: 34px;
  margin-bottom: var(--space-sm);
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: #C9D5E0;
  max-width: 320px;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-contact p {
  margin: 0 0 var(--space-xs);
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: #9FB4C8;
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #9FB4C8;
}

.footer-legal-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   6. Cards
   ------------------------------------------------------------------------- */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: 0 12px 28px rgba(23, 63, 107, 0.08);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  color: var(--color-blue);
}

.step-card {
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}

@media (min-width: 900px) {
  .steps-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center; /* centers the arrows on the vertical midpoint of the step cards */
    gap: var(--space-md);
  }
  .step-arrow { display: flex; }
}

/* -------------------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------------------- */
.hero {
  padding: var(--space-2xl) 0;
}

.hero .container {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-eyebrow {
  color: var(--color-blue);
  font-weight: 700;
}

.hero h1 {
  max-width: 16ch;
}

.hero-lead {
  font-size: 1.25rem;
  max-width: 46ch;
}

.hero-promise {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
  border-left: 4px solid var(--color-gold);
  padding-left: var(--space-sm);
  margin: var(--space-md) 0;
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.hero-media {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-md);
  min-height: 220px;
}

/* -------------------------------------------------------------------------
   8. Pricing card
   ------------------------------------------------------------------------- */
.pricing-card {
  background: var(--color-white);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  max-width: 520px;
  margin: 0 auto;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
  flex-wrap: wrap;
}

.price-regular {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: 1.25rem;
}

.price-founding {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--color-navy);
}

.price-period {
  color: var(--color-text-muted);
}

.pricing-badge {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.checklist li {
  display: flex;
  gap: 0.6em;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
}

.checklist svg {
  flex-shrink: 0;
  color: var(--color-blue);
  margin-top: 0.2em;
}

/* -------------------------------------------------------------------------
   9. Forms
   ------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.form-field label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.8em 0.9em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  min-height: 48px;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-blue);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
}

.form-checkbox input {
  width: 22px;
  height: 22px;
  margin-top: 0.2em;
  flex-shrink: 0;
}

.form-hint {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  max-width: 560px;
}

.newsletter-form .form-field {
  flex: 1 1 220px;
}

/* -------------------------------------------------------------------------
   10. Callout / Safety Notice
   ------------------------------------------------------------------------- */
.safety-notice {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-navy);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
}

.safety-notice.urgent {
  background: var(--color-red-bg);
  border-left-color: var(--color-red);
}

.safety-notice h2,
.safety-notice h3 {
  margin-bottom: var(--space-xs);
}

/* -------------------------------------------------------------------------
   11. Scam Library
   ------------------------------------------------------------------------- */
.search-bar {
  display: flex;
  gap: var(--space-xs);
  max-width: 620px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  font-size: 1.1rem;
  padding: 0.9em 1.1em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
  min-height: 48px;
}

.search-bar input:focus { border-color: var(--color-blue); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.category-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-decoration: none;
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.category-card:hover {
  box-shadow: 0 12px 28px rgba(23, 63, 107, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-md);
}

.article-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-decoration: none;
}

.article-card:hover { text-decoration: none; box-shadow: 0 12px 28px rgba(23, 63, 107, 0.08); }

.article-card h3 { color: var(--color-navy); margin-bottom: var(--space-xs); }
.article-card p { color: var(--color-text-muted); margin-bottom: 0; }

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.example-message {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  max-width: 480px;
}

.example-message .sender {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.related-scams ul { list-style: none; padding: 0; }
.related-scams a { font-weight: 600; }

/* Article body — generous rhythm so long scam-library articles never feel
   like a wall of text (V1.1 spacing pass). */
.article-body h2 {
  margin-top: var(--space-2xl);
}

.article-body h1 + .hero-lead {
  margin-top: var(--space-sm);
}

.article-body > p,
.article-body > ul {
  margin-bottom: var(--space-md);
}

.article-body .example-message,
.article-body .safety-notice {
  margin: var(--space-lg) 0;
}

/* Visually distinct end-of-article CTA (gold border, same treatment as the
   pricing card) so every article ends with a clear invitation to join. */
.article-cta {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--color-white);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.article-cta h2 {
  margin-top: 0;
}

.article-cta p {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .pricing-card,
  .article-cta {
    padding: var(--space-lg);
  }

  .safety-notice {
    padding: var(--space-md);
  }

  .example-message {
    padding: var(--space-sm) var(--space-md);
  }
}

/* -------------------------------------------------------------------------
   12. Trust points / icon list
   ------------------------------------------------------------------------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.trust-item {
  text-align: left;
}

.trust-item svg {
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.trust-item h3 {
  font-size: 1.15rem;
}

/* -------------------------------------------------------------------------
   13. Utility classes
   ------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* Skip-to-content offset for sticky header anchor targets */
[id] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}
