/* ============================================================
   Litmus Verified · Public site main CSS
   Phase 3.1 shell foundation: tokens, base, nav, footer.
   Per brief Sections 9, 12, 13.
   ============================================================ */


/* ============================================================
   Section 1. Design tokens
   Color palette, typography stacks, spacing, layout widths.
   Per brief Section 13 (locked tokens).
   ============================================================ */

:root {
  /* Color palette */
  --color-bg: #0b1a30;
  --color-bg-panel: #112644;
  --color-bg-elevated: #07121f;
  --color-border: #243c5e;
  --color-border-strong: #33507a;

  --color-fg: #f2f5fa;
  --color-fg-muted: #9fb3d2;
  --color-fg-soft: #6f86a8;
  --color-fg-dim: #56708f;

  --color-orange: #e85d20;
  --color-orange-deep: #e85d20;
  --color-on-orange: #2a1206;
  --color-green: #6fd99a;
  --color-red: #ff3333;

  --color-findings-bg: #0e1119;
  --color-questions-bg: #0e1119;

  /* Typography */
  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'Cabin', 'Segoe UI', sans-serif;
  --font-mono: 'Share Tech Mono', 'Consolas', monospace;

  /* Spacing (8px baseline grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;

  /* Layout */
  --container-max: 1280px;
  --container-content: 1100px;
  --container-narrow: 800px;
}


/* ============================================================
   Section 2. Reset and base
   ============================================================ */

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-fg-muted);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-fg);
  margin: 0 0 var(--space-2) 0;
  letter-spacing: 1px;
  line-height: 1.1;
}

p {
  margin: 0 0 var(--space-2) 0;
}

a {
  color: var(--color-orange);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--color-fg);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
}


/* ============================================================
   Section 3. Accessibility helpers
   ============================================================ */

.skip-link {
  position: absolute;
  top: -200px;
  left: 0;
  background: var(--color-orange);
  color: var(--color-bg);
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-fg);
  outline-offset: 2px;
}

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


/* ============================================================
   Section 4. Layout
   ============================================================ */

.site-main {
  min-height: calc(100vh - 240px);
}


/* ============================================================
   Section 5. Header and nav
   Per brief Section 12.
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

/* Understated identity slogan strip at the top of the header. */
.site-slogan {
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-fg-soft);
  padding: 6px var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  position: relative;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-fg);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.brand-mark:hover {
  color: var(--color-orange);
}

.brand-mark-glyph {
  color: var(--color-orange);
  font-size: 20px;
  font-weight: 700;
}

.primary-nav {
  display: flex;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-link {
  color: var(--color-fg-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.nav-link:hover {
  color: var(--color-fg);
}

.nav-link--active {
  color: var(--color-orange);
  border-bottom-color: var(--color-orange);
}

/* Client Portal link: green to signal authenticated-area entry. */
.nav-link--portal {
  color: var(--color-green);
}

.nav-link--portal:hover {
  color: var(--color-green);
  border-bottom-color: var(--color-green);
}

.nav-cta {
  background: var(--color-orange);
  color: var(--color-bg);
  padding: var(--space-1) var(--space-3);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease;
}

.nav-cta:hover {
  background: var(--color-fg);
  color: var(--color-bg);
}

/* Mobile menu toggle (CSS-only checkbox hack) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-fg);
  transition: transform 200ms ease, opacity 200ms ease;
  border-radius: 1px;
}


/* ============================================================
   Section 6. Footer
   Per brief Sections 9.2 and 9.3.
   ============================================================ */

.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0 var(--space-4) 0;
  margin-top: var(--space-12);
}

.site-footer-inner {
  max-width: var(--container-content);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.footer-notices {
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-3);
  font-size: 13px;
}

.footer-links a {
  color: var(--color-fg-soft);
}

.footer-links a:hover {
  color: var(--color-orange);
}

/* Client Portal footer link: green, matching the header treatment. */
.footer-links a.footer-link--portal {
  color: var(--color-green);
}

.footer-links a.footer-link--portal:hover {
  color: var(--color-green);
  filter: brightness(1.15);
}

.footer-divider {
  color: var(--color-fg-dim);
  user-select: none;
}

.footer-copyright {
  text-align: center;
  color: var(--color-fg-dim);
  font-size: 12px;
  margin: 0;
  letter-spacing: 0.5px;
}


/* ============================================================
   Section 7. Shell preview (temporary placeholder)
   Used by _shell_preview.html. Remove or replace when the real
   page templates land in future sessions.
   ============================================================ */

.shell-preview {
  padding: var(--space-12) var(--space-3);
}

.shell-preview-inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
}

.shell-preview-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--color-orange);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.shell-preview-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  color: var(--color-fg);
  margin-bottom: var(--space-3);
}

.shell-preview-route {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-fg-soft);
  margin-bottom: var(--space-3);
}

.shell-preview-route code {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 2px;
}

.shell-preview-body {
  font-size: 15px;
  color: var(--color-fg-soft);
  line-height: 1.7;
  margin-bottom: var(--space-2);
}


/* ============================================================
   Section 8. Responsive
   Mobile breakpoint: 900px per brief.
   ============================================================ */

@media (max-width: 900px) {

  /* Show hamburger, hide horizontal nav by default */
  .nav-toggle-label {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    display: none;
  }

  /* Open menu when checkbox checked */
  .nav-toggle:checked ~ .primary-nav {
    display: flex;
  }

  /* Hamburger to X animation when open */
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    padding: var(--space-2) 0;
    gap: 0;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link, .nav-cta {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-link--active {
    border-bottom-color: var(--color-orange);
  }

  .nav-cta {
    text-align: center;
  }

  /* Footer links stack on mobile */
  .footer-links {
    flex-direction: column;
    gap: var(--space-1);
  }

  .footer-divider {
    display: none;
  }
}

/* ============================================================
   MOBILE PASS · 2026-06-07 — tap-target sizing (>=44px)
   Per Apple HIG 44px / Google 48px. Applies to standalone
   navigation + control links. Inline text links inside prose
   are intentionally left at text size (the guideline targets
   standalone controls, not in-sentence links).
   ============================================================ */
@media (max-width: 760px) {
  /* Footer nav links: generous vertical padding for thumb taps */
  .footer-links a {
    display: inline-block;
    padding: 11px 6px;
    min-height: 44px;
    line-height: 22px;
  }

  /* Hamburger label: ensure a full 44x44 tap area */
  .nav-toggle-label {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Brand/logo link: comfortable tap height */
  .brand-mark {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
