/*
Theme Name: Shasta County Search and Rescue
Theme URI: https://shastasar.org
Author: Shasta County Search and Rescue
Description: A responsive, accessible WordPress theme for Shasta County Search and Rescue.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: shasta-sar
*/

:root {
  --sar-black: #111315;
  --sar-charcoal: #252a2e;
  --sar-gold: #d5ad62;
  --sar-gold-dark: #a77b2f;
  --sar-cream: #f4efe5;
  --sar-white: #fff;
  --sar-green: #234337;
  --sar-muted: #657078;
  --sar-border: #d8d8d4;
  --sar-width: 1180px;
  --sar-radius: 16px;
  --sar-shadow: 0 18px 50px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--sar-charcoal); background: var(--sar-white); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--sar-green); text-underline-offset: 3px; }
a:hover { color: var(--sar-gold-dark); }
.container { width: min(calc(100% - 40px), var(--sar-width)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(17,19,21,.96); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 86px; display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img, .custom-logo { width: 66px; height: 66px; object-fit: contain; }
.brand-name { display: block; font-family: Georgia, serif; font-weight: 700; line-height: 1.05; letter-spacing: .02em; font-size: 1.05rem; }
.brand-location { display: block; margin-top: 5px; color: var(--sar-gold); text-transform: uppercase; letter-spacing: .15em; font-size: .69rem; }
.site-nav ul { display: flex; align-items: center; gap: 25px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: .91rem; }
.site-nav a:hover { color: var(--sar-gold); }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; background: transparent; color: #fff; padding: 10px 12px; font-weight: 700; }

.hero { min-height: 680px; display: grid; align-items: end; color: #fff; background: linear-gradient(100deg, rgba(10,12,13,.94) 0%, rgba(10,12,13,.74) 44%, rgba(10,12,13,.28) 100%), var(--hero-image, linear-gradient(145deg,#263e35,#111315)); background-position: center; background-size: cover; }
.hero-content { padding: 120px 0 90px; max-width: 750px; }
.eyebrow { color: var(--sar-gold); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; }
.hero h1 { margin: 15px 0 20px; font-family: Georgia, serif; font-size: clamp(3rem, 7vw, 6.7rem); line-height: .96; letter-spacing: -.035em; }
.hero p { max-width: 680px; margin: 0 0 32px; color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; }
.button, .wp-element-button { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; padding: 12px 21px; border: 2px solid var(--sar-gold); border-radius: 8px; background: var(--sar-gold); color: var(--sar-black); text-decoration: none; font-weight: 800; transition: .2s ease; }
.button:hover { transform: translateY(-2px); background: #e0bc79; color: var(--sar-black); }
.button-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.button-outline:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.1); }

.section { padding: 90px 0; }
.section-cream { background: var(--sar-cream); }
.section-dark { background: var(--sar-charcoal); color: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-heading h2, .page-title, .entry-title { margin: 8px 0 0; font-family: Georgia, serif; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.025em; }
.section-intro { max-width: 680px; margin: 13px 0 0; color: var(--sar-muted); }
.section-dark .section-intro { color: rgba(255,255,255,.7); }

.mission-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 8vw, 100px); align-items: center; }
.mission-copy p { font-size: 1.08rem; }
.mission-facts { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.fact { padding: 27px; border: 1px solid var(--sar-border); border-radius: var(--sar-radius); background: #fff; }
.fact strong { display: block; color: var(--sar-green); font-family: Georgia,serif; font-size: 1.75rem; }
.fact span { color: var(--sar-muted); font-size: .9rem; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.team-card { position: relative; min-height: 390px; overflow: hidden; border-radius: var(--sar-radius); background: #17201c; box-shadow: var(--sar-shadow); }
.team-card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .45s ease, opacity .45s ease; }
.team-card:hover .team-card-image { transform: scale(1.045); opacity: .58; }
.team-card-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: end; padding: 28px; background: linear-gradient(transparent 25%, rgba(7,10,9,.94)); color: #fff; }
.team-card h3 { margin: 8px 0 8px; font-family: Georgia, serif; font-size: 1.8rem; line-height: 1.1; }
.team-card p { margin: 0 0 17px; color: rgba(255,255,255,.75); font-size: .92rem; }
.team-card a { color: var(--sar-gold); font-weight: 800; text-decoration: none; }
.team-card-placeholder { position: absolute; inset: 0; background: linear-gradient(145deg,#315746,#131b18); }

.cta-band { background: var(--sar-green); color: #fff; }
.cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 35px; align-items: center; padding: 55px 0; }
.cta-inner h2 { margin: 0 0 8px; font-family: Georgia,serif; font-size: clamp(2rem,4vw,3.5rem); line-height: 1.05; }
.cta-inner p { margin: 0; color: rgba(255,255,255,.75); }

.content-wrap { width: min(calc(100% - 40px), 860px); margin-inline: auto; padding: 75px 0 100px; }
.page-header { padding: 82px 0 58px; color: #fff; background: var(--sar-charcoal); }
.entry-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--sar-width); }
.entry-content h2, .entry-content h3 { font-family: Georgia,serif; line-height: 1.15; }
.entry-content h2 { margin-top: 2em; font-size: 2rem; }

.team-hero { min-height: 510px; display: grid; align-items: end; color: #fff; background: linear-gradient(90deg,rgba(10,12,13,.92),rgba(10,12,13,.28)), var(--team-image, linear-gradient(145deg,#315746,#111315)); background-size: cover; background-position: center; }
.team-hero-content { padding: 90px 0 65px; max-width: 720px; }
.team-hero h1 { margin: 10px 0; font-family: Georgia,serif; font-size: clamp(2.8rem,7vw,5.8rem); line-height: 1; }
.team-summary { font-size: 1.2rem; color: rgba(255,255,255,.85); }

.document-grid { display: grid; gap: 13px; }
.document-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--sar-border); border-radius: 12px; background: #fff; }
.document-card h3 { margin: 0 0 3px; font-size: 1.05rem; }
.document-meta { color: var(--sar-muted); font-size: .86rem; }
.login-panel { padding: 35px; border-radius: var(--sar-radius); background: var(--sar-cream); }

.site-footer { background: var(--sar-black); color: rgba(255,255,255,.7); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 50px; padding: 65px 0 45px; }
.site-footer h2, .site-footer h3 { color: #fff; font-family: Georgia,serif; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer ul { margin: 0; padding-left: 1.15rem; }
.site-footer li { margin: .28rem 0; }
.footer-bottom { padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

@media (max-width: 960px) {
  .admin-bar .site-header { top: 46px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; display: none; top: 100%; left: 0; right: 0; padding: 12px 20px 24px; background: var(--sar-black); }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .mission-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 680px) {
  .container, .content-wrap { width: min(calc(100% - 28px), var(--sar-width)); }
  .header-inner { min-height: 72px; }
  .brand img, .custom-logo { width: 53px; height: 53px; }
  .brand-name { font-size: .9rem; }
  .brand-location { font-size: .58rem; }
  .hero { min-height: 610px; background-position: 62% center; }
  .hero-content { padding: 105px 0 65px; }
  .hero h1 { font-size: clamp(3rem,15vw,4.4rem); }
  .button-row { flex-direction: column; align-items: stretch; }
  .section { padding: 65px 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .mission-facts { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { min-height: 350px; }
  .cta-inner { grid-template-columns: 1fr; }
  .document-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

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