/* ==========================================================================
   The Humans of Oklahoma Project — Shared Stylesheet
   Palette: "Clinical Empathy"
   Used by: index.html, contact.html (and future interior pages)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* --- Color palette & shared tokens ------------------------------------- */
:root {
  --navy: #0F172A;      /* main text & headings */
  --primary: #2563EB;   /* primary accent & buttons */
  --amber: #D97706;     /* warm accent & hover states */
  --ice: #F8FAFC;       /* page background */
  --card-bg: #FFFFFF;   /* card containers */
  --border: #E2E8F0;    /* card border */
  --slate: #475569;     /* muted secondary text (derived, cool-toned) */
  --max-width: 1160px;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ice);
  color: var(--navy);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

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

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* --- Global header & navigation (identical on every page) --------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
}

/* Brand title is intentionally plain text, not a link */
.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--slate);
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--amber);
}

.nav-links a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--primary);
}

/* Mobile nav toggle (checkbox hack, no JavaScript required) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--navy);
  height: 2px;
  width: 24px;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--amber);
  color: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--amber);
  color: var(--amber);
}

/* --- Hero (homepage) ------------------------------------------------------ */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--primary) 100%);
  color: #f5f2ec;
  text-align: center;
  padding: 6rem 1.5rem 5.5rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  max-width: 820px;
  margin: 0 auto 1.25rem;
}

.hero p {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  color: #d7dcea;
  font-size: 1.15rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Page hero (interior pages, e.g. Contact) ----------------------------- */
.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  padding: 4.5rem 1.5rem;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: #d7dcea;
  font-size: 1.1rem;
}

/* --- Sections -------------------------------------------------------------- */
section {
  padding: 5rem 1.5rem;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.section-heading p {
  color: var(--slate);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

/* --- Mission statement card ------------------------------------------------ */
.mission {
  background: var(--ice);
}

.mission-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  box-shadow: 0 20px 40px -28px rgba(15, 23, 42, 0.18);
}

.mission-card p {
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.8;
}

/* --- Long-form content card (About Us) --------------------------------------- */
.content {
  background: var(--ice);
}

.content-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 20px 40px -28px rgba(15, 23, 42, 0.18);
}

.content-card h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 1.75rem;
}

.content-card p {
  color: var(--slate);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.pillar-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pillar-list li {
  color: var(--slate);
  font-size: 1.05rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--primary);
}

.pillar-list strong {
  color: var(--navy);
  font-family: "Playfair Display", serif;
}

/* --- Intro / overview text block (Patient Support) ---------------------------- */
.intro-section {
  background: #fff;
}

.intro-section .container {
  max-width: 760px;
  text-align: center;
}

.intro-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1.25rem;
}

.intro-section p {
  color: var(--slate);
  font-size: 1.05rem;
}

/* --- Video / bio media grid (Caregiver Stories, Senior Legacy) ---------------- */
.media {
  background: var(--ice);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.media-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #0b1220, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.media-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.media-body h3 {
  font-size: 1.1rem;
}

.media-body p {
  color: var(--slate);
  font-size: 0.95rem;
}

/* --- Volunteer / Get Involved CTA box ------------------------------------------ */
.cta-box-wrap {
  background: #fff;
}

.cta-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-box h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-box p {
  color: #dbe6fd;
  max-width: 560px;
}

.btn-invert {
  background: #fff;
  color: var(--primary);
}

.btn-invert:hover {
  background: var(--amber);
  color: #fff;
}

/* --- Three Pillars grid ----------------------------------------------------- */
.pillars {
  background: #fff;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.pillar-card {
  background: var(--ice);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pillar-card h3 {
  font-size: 1.3rem;
}

.pillar-card p {
  color: var(--slate);
  flex-grow: 1;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* --- Featured content grid --------------------------------------------------- */
.featured {
  background: var(--ice);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.featured-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.placeholder-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.placeholder-box svg {
  width: 42px;
  height: 42px;
  opacity: 0.6;
}

.featured-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tag {
  align-self: flex-start;
  background: rgba(217, 119, 6, 0.15);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.featured-body h3 {
  font-size: 1.15rem;
}

.featured-body p {
  color: var(--slate);
  font-size: 0.95rem;
}

/* --- Founder & team section --------------------------------------------------- */
.founder {
  background: #fff;
}

.founder .container {
  max-width: 760px;
  text-align: center;
}

.founder h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1.25rem;
}

.founder p {
  color: var(--slate);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

/* --- Contact form ---------------------------------------------------------------- */
.contact-section {
  background: var(--ice);
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: 0 20px 40px -28px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}

.form-field .optional {
  font-weight: 400;
  color: var(--slate);
  font-size: 0.85rem;
}

.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--ice);
  color: var(--navy);
  resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.contact-form .btn-primary {
  align-self: flex-start;
  border: none;
}

.contact-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #d64545;
}

.field-error {
  color: #d64545;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.form-status {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-status-success {
  color: #1f8a4c;
}

.form-status-error {
  color: #d64545;
}

/* --- Footer (identical on every page) --------------------------------------------- */
footer {
  background: var(--navy);
  color: #dfe3ee;
  padding: 4rem 1.5rem 2rem;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  color: #b7bedb;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-col h4 {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #9aa3c4;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  text-decoration: none;
  color: #dfe3ee;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--amber);
}

.social-icons {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.25rem;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icons a:hover {
  background: var(--amber);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: #9aa3c4;
}

.footer-bottom a {
  color: #b7bedb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: var(--amber);
}

.compliance-note {
  font-size: 0.78rem;
  color: #838cae;
  line-height: 1.6;
  max-width: 900px;
}

.under-construction {
  font-weight: 700;
  color: #ff8c00;
  text-align: center;
}

/* --- Responsive breakpoints ------------------------------------------------------- */
@media (max-width: 900px) {
  .pillar-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 760px) {
  .nav-toggle-label {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ice);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: 400px;
  }

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

  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: none;
  }

  .nav-toggle:checked ~ .nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked ~ .nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }
}
