/* Patriot Medical Training — site styles */

:root {
  --bg: #0b1016;
  --bg-alt: #111821;
  --surface: #161f2a;
  --surface-2: #1c2734;
  --line: #263444;
  --text: #e8edf2;
  --muted: #9aa8b6;
  --red: #d7343f;
  --red-dark: #b3242f;
  --blue: #5b8fd6;
  --white: #ffffff;
  --radius: 10px;
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(2rem, 4vw, 2.75rem); text-transform: uppercase; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white); padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 52px; padding: 0.8rem 1.5rem;
  font: 600 1rem/1 var(--font);
  text-decoration: none; letter-spacing: 0.02em;
  border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: #3a4b5e; color: var(--white); background: rgba(255,255,255,0.03); }
.btn-outline:hover { border-color: var(--white); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-text small { display: block; font-family: var(--font); font-size: 0.68rem; font-weight: 600; color: var(--muted); letter-spacing: 0.18em; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.nav a:hover { color: var(--white); }
.nav .btn { color: var(--white); min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.92rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  width: 46px; height: 46px; color: var(--white); cursor: pointer; padding: 0;
}
.nav-toggle svg { width: 24px; height: 24px; margin: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(ellipse 60% 70% at 85% 20%, rgba(215, 52, 63, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 100%, rgba(91, 143, 214, 0.12), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); }

.hero-brand { font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); margin: 0 0 0.75rem; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); text-transform: uppercase; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--red); }
.hero-area { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin: -0.5rem 0 1.25rem; }
.hero-area svg { width: 1.1em; height: 1.1em; color: var(--red); flex-shrink: 0; }
.hero-lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: #c5d0db; max-width: 40rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.hero-card h2 { font-size: 1.15rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.check-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--red); margin-top: 2px; }

/* ---------- Trust strip ---------- */
.trust { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 1.4rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--white); line-height: 1.1; }
.trust-item span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2.75rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Courses ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.25rem; }
.course {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem; transition: border-color 0.15s, transform 0.15s;
}
.course:hover { border-color: #3d5268; transform: translateY(-2px); }
.course::before { content: ""; position: absolute; left: 0; top: 1.6rem; width: 3px; height: 28px; background: var(--red); border-radius: 0 2px 2px 0; }
.course-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.course h3 { margin-bottom: 0.5rem; }
.course p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.price { display: flex; align-items: baseline; gap: 0.4rem; padding-top: 1rem; margin-top: 0.5rem; border-top: 1px solid var(--line); }
.price strong { font-family: var(--font-display); font-size: 2.1rem; color: var(--white); line-height: 1; }
.price span { color: var(--muted); font-size: 0.9rem; }
.price-note strong { font-size: 1.35rem; }
.badge { display: inline-block; margin-top: 0.75rem; padding: 0.3rem 0.65rem; font-size: 0.78rem; font-weight: 600; color: #ffd9dc; background: rgba(215,52,63,0.14); border: 1px solid rgba(215,52,63,0.4); border-radius: 999px; align-self: flex-start; }

.courses-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.75rem; background: var(--surface); border: 1px dashed #3a4b5e; border-radius: var(--radius); }
.courses-cta p { margin: 0; color: var(--muted); }
.courses-cta p strong { color: var(--white); }

/* ---------- On-site ---------- */
.onsite { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: center; }
.org-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.org { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.org svg { width: 24px; height: 24px; color: var(--blue); flex: none; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: flex; gap: 1rem; align-items: flex-start; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--red); min-width: 2rem; line-height: 1.5; }
.steps strong { color: var(--white); }
.steps span { color: var(--muted); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; max-width: 60rem; }
.about-emblem { width: 300px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 0 0 10px rgba(255,255,255,0.02); }
.about-emblem img { display: block; width: 100%; height: auto; aspect-ratio: 272 / 406; object-fit: cover; }
.about blockquote { margin: 0 0 1.5rem; font-size: clamp(1.1rem, 2vw, 1.3rem); color: #d3dbe4; line-height: 1.65; }
.creds { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 0; }
.creds li { padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--muted); background: var(--surface); }

/* ---------- Request form ---------- */
.request-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start; }
.request-aside p { color: var(--muted); }
.request-aside .note { font-size: 0.92rem; padding: 1rem 1.1rem; border-left: 3px solid var(--red); background: var(--surface); border-radius: 0 6px 6px 0; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.form fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.form legend { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); padding: 0 0 0.9rem; width: 100%; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem 1.1rem; }
.field { grid-column: span 3; display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field.third { grid-column: span 2; }
.field label { font-size: 0.9rem; font-weight: 600; color: #cdd6df; }
.field label .req { color: var(--red); margin-left: 2px; }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.field input,
.field select,
.field textarea {
  width: 100%; min-height: 50px; padding: 0.75rem 0.9rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid #304152; border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
  color-scheme: dark;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8b6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 20px; padding-right: 2.5rem; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(91,143,214,0.25); }
.field input::placeholder,
.field textarea::placeholder { color: #66778a; }
.field-label { font-size: 0.9rem; font-weight: 600; color: #cdd6df; }
.field-label .req { color: var(--red); margin-left: 2px; }
.field-label .opt { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.checkbox-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem 1.1rem; }
.checkbox { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.7rem 0.85rem; background: var(--bg); border: 1px solid #304152; border-radius: 6px; cursor: pointer; transition: border-color 0.15s; }
.checkbox:hover { border-color: #3d5268; }
.checkbox:has(input:checked) { border-color: var(--red); }
.field .checkbox input { width: 18px; min-height: 0; height: 18px; padding: 0; margin: 3px 0 0; flex: none; accent-color: var(--red); }
.field .checkbox input:focus { box-shadow: none; }
.field .checkbox input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.checkbox span { font-size: 0.95rem; color: var(--text); line-height: 1.4; }
.checkbox em { display: block; font-style: normal; font-size: 0.82rem; color: var(--muted); }
.estimate { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 6px; padding: 1rem 1.1rem; }
.estimate p { margin: 0; }
.estimate .estimate-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin-bottom: 0.6rem; }
.estimate-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.estimate-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.estimate-lines li span:last-child { color: var(--muted); text-align: right; }
.estimate-lines li.priced span:last-child { color: var(--text); font-weight: 600; }
.estimate .estimate-total { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-weight: 700; color: var(--white); font-size: 1.05rem; }
.estimate .estimate-pending, .estimate .estimate-empty { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.estimate .estimate-empty { margin-top: 0; }
.estimate [hidden] { display: none; }
.estimate-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.form-footer { display: flex; flex-direction: column; gap: 0.9rem; }
.form-footer small { color: var(--muted); font-size: 0.85rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contact-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color 0.15s; }
a.contact-card:hover { border-color: var(--red); }
.contact-card svg { width: 30px; height: 30px; color: var(--red); margin-bottom: 0.6rem; }
.contact-card span { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact-card strong { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--white); word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: #070a0e; border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.9rem; }
.site-footer p { color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; color: var(--text); }
.site-footer a:hover { color: var(--red); }
.footer-contact a { font-weight: 600; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 1.5rem; color: #6f7f8f; font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }

/* ---------- Thank-you page ---------- */
.thanks { min-height: calc(100vh - 72px - 220px); display: grid; place-items: center; padding: 5rem 0; text-align: center; }
.thanks-card { max-width: 40rem; margin: 0 auto; }
.thanks-icon { width: 84px; height: 84px; margin: 0 auto 1.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(215,52,63,0.12); border: 1px solid rgba(215,52,63,0.45); }
.thanks-icon svg { width: 42px; height: 42px; color: var(--red); }
.thanks h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); text-transform: uppercase; }
.thanks p { color: #c5d0db; font-size: 1.15rem; }
.thanks .hero-actions { justify-content: center; margin-top: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .onsite, .request-wrap { grid-template-columns: 1fr; }
  .hero-card { max-width: 34rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--text); }
  .nav .btn { margin-top: 1rem; border-bottom: 0; min-height: 50px; }
}

@media (max-width: 720px) {
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .about-emblem { margin: 0 auto; width: min(100%, 320px); }
  .creds { justify-content: center; }
  .field, .field.third { grid-column: 1 / -1; }
  .field.half-sm { grid-column: span 3; }
  .checkbox-group { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
  .org-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .courses-cta .btn { width: 100%; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
