/* =====================================================================
   GARRISON HEALTH — Marketing site
   Brand system carried from the product mockup:
   navy + brass, IBM Plex Sans / Serif / Mono, institutional precision.
   ===================================================================== */

:root {
  --bg: #f6f4ee;
  --bg-warm: #f1eee5;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --border: #e2ddd1;
  --border-strong: #c9c2af;

  --text: #1a1a1a;
  --text-2: #54534d;
  --text-3: #8a897f;

  --navy: #0e2a3f;
  --navy-2: #1c3e58;
  --navy-deep: #061a29;

  --brass: #a87c2e;
  --brass-soft: #d4a861;
  --brass-bright: #e6c074;

  --green: #2d6a4f;
  --red: #9d2235;

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --serif: 'IBM Plex Serif', Georgia, serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }

/* ============ SHARED ============ */
.eyebrow, .section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brass);
  font-weight: 500;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 160px) var(--gutter);
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-eyebrow { display: block; margin-bottom: 18px; }
.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  color: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--brass); color: var(--navy); border-color: var(--brass); font-weight: 600; }
.btn-primary:hover { background: var(--brass-bright); border-color: var(--brass-bright); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-1px); }
.btn-block { width: 100%; padding: 16px; font-size: 16px; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(246, 244, 238, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px;
  background: var(--brass);
  color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  border: 1.5px solid var(--brass-soft);
  flex-shrink: 0;
}
.brand-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--text-2); transition: color 0.15s var(--ease); }
.nav-links a:hover { color: var(--navy); }
.nav-links .nav-cta {
  color: var(--navy);
  font-weight: 500;
  padding: 9px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}
.nav-links .nav-cta:hover { border-color: var(--brass); background: var(--brass); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: clamp(130px, 18vh, 200px) var(--gutter) clamp(60px, 8vw, 100px);
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(14,42,63,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,42,63,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 75%);
  z-index: -1;
}
.hero-inner { max-width: 860px; margin: 0 auto; }
.hero .eyebrow { display: block; margin-bottom: 24px; }
.hero-title {
  font-size: clamp(40px, 7vw, 82px);
  color: var(--navy);
  margin-bottom: 26px;
  letter-spacing: -0.03em;
}
.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.hero-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--brass);
}

/* Hero device */
.hero-device { position: relative; max-width: 1000px; margin: clamp(50px, 8vw, 90px) auto 0; }
.device-chrome {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(14,42,63,0.4), 0 8px 24px -12px rgba(14,42,63,0.2);
  position: relative;
  z-index: 2;
}
.device-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-2);
}
.device-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.device-dot:nth-child(1) { background: #e06c5a; }
.device-dot:nth-child(2) { background: #e3b341; }
.device-dot:nth-child(3) { background: #6ec896; }
.device-url {
  margin-left: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.device-screen { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.device-poster, .device-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.device-video { opacity: 0; transition: opacity 0.4s var(--ease); }
.device-video.is-playing { opacity: 1; }
.device-glow {
  position: absolute;
  inset: 8% 12% -10%;
  background: radial-gradient(ellipse at center, rgba(168,124,46,0.22), transparent 70%);
  filter: blur(40px);
  z-index: 1;
}

/* placeholder state for empty asset slots */
.device-screen::after {
  content: "Drop hero-poster.png / hero-dashboard.mp4";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--bg-warm) 12px, var(--bg-warm) 24px);
  z-index: 0;
}

/* ============ STAT BAND ============ */
.stat-band {
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(36px, 5vw, 60px) clamp(20px, 3vw, 40px);
  border-right: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  color: var(--brass-soft);
  line-height: 1;
  margin-bottom: 14px;
  font-feature-settings: 'tnum' 1;
}
.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.45;
  max-width: 220px;
  margin: 0 auto;
  display: block;
}

/* ============ PROBLEM ============ */
.problem-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.problem-item { background: var(--surface); padding: clamp(28px, 4vw, 44px); }
.problem-index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brass);
  font-weight: 600;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}
.problem-item h3 { font-size: 21px; color: var(--navy); margin-bottom: 12px; line-height: 1.25; }
.problem-item p { font-size: 16px; color: var(--text-2); line-height: 1.6; }

/* ============ SCROLLYTELLING ============ */
.scrolly { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(30px, 5vw, 80px); }
.scrolly-alt { grid-template-columns: 0.85fr 1fr; }
.scrolly-alt .scrolly-sticky { order: 2; }
.scrolly-alt .scrolly-steps { order: 1; }

.scrolly-sticky { position: relative; }
.scrolly-device { position: sticky; top: 12vh; padding: 12vh 0; }
.scrub-canvas { width: 100%; height: auto; background: var(--surface-2); }
.scrub-fallback { width: 100%; }
.scrolly-device .device-screen::after {
  content: "Frame sequence loads here";
}
.scrolly-device .device-screen { aspect-ratio: 16/10; }

.scrolly-steps { display: flex; flex-direction: column; }
.scrolly-copy { padding: 14vh 0 4vh; }
.scrolly-step {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vh 0;
  opacity: 0.35;
  transition: opacity 0.4s var(--ease);
}
.scrolly-step.active { opacity: 1; }
.scrolly-step h3 { font-size: clamp(22px, 2.8vw, 30px); color: var(--navy); margin-bottom: 14px; }
.scrolly-step p { font-size: 17px; color: var(--text-2); max-width: 460px; }

/* ============ FEATURES ============ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 34px);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.feature-card:hover { border-color: var(--brass-soft); transform: translateY(-3px); }
.feature-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.feature-card p { font-size: 15.5px; color: var(--text-2); line-height: 1.6; }

/* ============ SECURITY ============ */
.security { background: var(--navy-deep); color: #fff; max-width: none; }
.security-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.security .section-title { color: #fff; }
.security .section-eyebrow { color: var(--brass-soft); }
.security-lead { font-size: 19px; color: rgba(255,255,255,0.78); margin: 22px 0 32px; line-height: 1.55; }
.security-list { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.security-list li { font-size: 15.5px; color: rgba(255,255,255,0.66); line-height: 1.55; padding-left: 20px; border-left: 2px solid var(--brass); }
.security-point { display: block; color: #fff; font-weight: 500; font-size: 16px; margin-bottom: 4px; }

/* Security diagram */
.security-diagram { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.enclave {
  width: 100%;
  max-width: 280px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  text-align: center;
  background: rgba(255,255,255,0.04);
}
.enclave-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.8); }
.enclave-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 44px; justify-content: center; }
.arrow-line { width: 1px; height: 22px; background: linear-gradient(var(--brass-soft), transparent); position: relative; }
.enclave-arrow .arrow-line::after { content: '▾'; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); color: var(--brass-soft); font-size: 10px; }
.enclave-arrow-in .arrow-line { background: linear-gradient(transparent, var(--brass-soft)); }
.enclave-arrow-in .arrow-line::after { content: '▴'; top: -6px; bottom: auto; }
.arrow-note { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass-soft); }
.enclave-box {
  width: 100%;
  max-width: 320px;
  border: 1.5px solid var(--brass);
  border-radius: var(--r-md);
  padding: 18px;
  background: rgba(168,124,46,0.06);
}
.enclave-box-title { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass-soft); margin-bottom: 14px; text-align: center; }
.enclave-stack { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.enclave-svc { font-family: var(--mono); font-size: 12px; padding: 8px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-sm); color: rgba(255,255,255,0.8); text-align: center; }
.enclave-svc-accent { background: rgba(168,124,46,0.18); border-color: var(--brass); color: #fff; }
.enclave-audit { font-family: var(--mono); font-size: 11px; text-align: center; padding: 8px; border: 1px dashed rgba(255,255,255,0.25); border-radius: var(--r-sm); color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============ DEMO ============ */
.demo { max-width: none; background: var(--bg-warm); }
.demo-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.demo-lead { font-size: 19px; color: var(--text-2); margin: 22px 0 36px; line-height: 1.55; }
.demo-points { display: flex; flex-direction: column; gap: 26px; }
.demo-points dt { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
.demo-points dd { font-size: 15.5px; color: var(--text-2); }

.demo-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 42px);
  box-shadow: 0 20px 50px -30px rgba(14,42,63,0.25);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 7px; }
.field .optional { color: var(--text-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(168,124,46,0.15);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 80px; }
.field-error { display: block; font-size: 13px; color: var(--red); margin-top: 6px; min-height: 0; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.form-note { margin-top: 16px; font-size: 15px; font-weight: 500; min-height: 22px; }
.form-note.success { color: var(--green); }
.form-note.error { color: var(--red); }
.form-fineprint { margin-top: 14px; font-size: 13px; color: var(--text-3); line-height: 1.5; }

/* ============ FOOTER ============ */
.footer { background: var(--navy); color: rgba(255,255,255,0.7); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 70px) var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px 60px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { color: #fff; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 15px; }
.footer-tag { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--brass-soft); margin-top: 2px; }
.footer-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-meta a { font-size: 14px; transition: color 0.15s var(--ease); }
.footer-meta a:hover { color: #fff; }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13px; color: rgba(255,255,255,0.5); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav-links.open a { padding: 14px var(--gutter); border-top: 1px solid var(--border); }
  .nav-links.open .nav-cta { border: none; border-radius: 0; background: none; color: var(--brass); }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.1); }

  .problem-list { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }

  .scrolly, .scrolly-alt { grid-template-columns: 1fr; }
  .scrolly-alt .scrolly-sticky { order: 0; }
  .scrolly-alt .scrolly-steps { order: 0; }
  .scrolly-device { position: relative; top: 0; padding: 20px 0 40px; }
  .scrolly-step { min-height: 0; padding: 18px 0; opacity: 1; }
  .scrolly-copy { padding: 30px 0 10px; }

  .security-inner, .demo-inner { grid-template-columns: 1fr; }
  .security-diagram { order: -1; margin-bottom: 20px; }

  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .stat:last-child { border-bottom: none; }
  .hero-actions .btn { width: 100%; }
}
