/*
 * Eleos CASA — recruitment landing page
 *
 * Design system inspired by the CASA national identity and grandprairiecasa.org.
 * Lenses applied:
 *  - Visual hierarchy: one primary CTA per section, generous scale on H1/H2
 *  - F-pattern scanning: eyebrow → headline → subhead → CTA in the hero
 *  - Trust & accessibility (WCAG POUR): contrast >= 4.5:1, visible focus rings,
 *    skip link, semantic landmarks
 *  - Fitts's law: 48px+ tap targets, block CTA on mobile signup
 *  - Mobile-first: base styles assume 390px; breakpoints expand upward
 *  - Plain language: typography supports long-form clarity, not decoration
 */

/* -------- Tokens -------- */
:root {
  /* Palette: deep navy (trust), warm sky (hope), gold (warmth) */
  --c-navy-900: #0e2540;
  --c-navy-800: #1a3a5f;
  --c-navy-700: #244b75;
  --c-sky-500: #5a8bb8;
  --c-sky-200: #d9e6f2;
  --c-sky-100: #ecf2f8;
  --c-gold-500: #d4a44b;
  --c-gold-400: #e0b86b;
  --c-cream-50: #faf8f3;
  --c-cream-100: #f5f1e8;
  --c-ink-900: #1f2937;
  --c-ink-700: #374151;
  --c-ink-500: #6b7280;
  --c-ink-300: #d1d5db;
  --c-white: #ffffff;

  /* Fluid type scale (mobile-first, expands with viewport) */
  --fs-eyebrow: 0.8125rem;
  --fs-body: 1rem;
  --fs-lead: 1.0625rem;
  --fs-h3: clamp(1.125rem, 0.9rem + 1vw, 1.375rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 2vw, 2.5rem);
  --fs-h1: clamp(2rem, 1.3rem + 4.2vw, 3.75rem);
  --fs-stat: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3.5rem;
  --sp-9: 5rem;
  --sp-10: 7rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(14, 37, 64, 0.06), 0 1px 3px rgba(14, 37, 64, 0.08);
  --shadow-md: 0 4px 12px rgba(14, 37, 64, 0.08), 0 2px 4px rgba(14, 37, 64, 0.06);
  --shadow-lg: 0 18px 40px rgba(14, 37, 64, 0.14), 0 6px 16px rgba(14, 37, 64, 0.08);

  --container-max: 1180px;

  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink-900);
  background: var(--c-cream-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--c-navy-800);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--c-navy-900);
}

:focus-visible {
  outline: 3px solid var(--c-gold-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--c-navy-900);
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--sp-4);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--sp-7);
  }
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-3);
  inset-block-start: -100px;
  z-index: 100;
  background: var(--c-navy-900);
  color: var(--c-white);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  inset-block-start: var(--sp-3);
}

/* -------- Header / brand / nav -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid rgba(26, 58, 95, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--c-navy-900);
}

.brand__mark {
  flex-shrink: 0;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand__primary {
  color: var(--c-navy-900);
}

.brand__secondary {
  color: var(--c-gold-500);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.brand--footer .brand__primary,
.brand--footer .brand__secondary {
  color: var(--c-white);
}

.brand--footer .brand__secondary {
  color: var(--c-gold-400);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.site-nav a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--c-ink-700);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  color: var(--c-navy-900);
  background: rgba(26, 58, 95, 0.05);
}

.site-nav__cta {
  background: var(--c-navy-800);
  color: var(--c-white) !important;
  padding-inline: var(--sp-4) !important;
}

.site-nav__cta:hover {
  background: var(--c-navy-900);
}

@media (max-width: 560px) {
  .site-nav a:not(.site-nav__cta) {
    display: none;
  }
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  padding: 0.875rem 1.25rem;
  min-height: 48px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

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

.btn:active {
  transform: translateY(0);
}

.btn--lg {
  font-size: 1rem;
  padding: 1rem 1.5rem;
  min-height: 56px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--c-gold-500);
  color: var(--c-navy-900);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--c-gold-400);
  color: var(--c-navy-900);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--c-white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--c-white);
}

/* -------- Eyebrow / accents -------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--c-gold-400);
  margin: 0 0 var(--sp-3);
}

.eyebrow--dark {
  color: var(--c-sky-500);
}

.eyebrow--light {
  color: var(--c-gold-400);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  color: var(--c-navy-800);
  text-decoration: none;
  border-bottom: 2px solid var(--c-gold-500);
  padding-bottom: 2px;
}

.link-arrow:hover {
  color: var(--c-navy-900);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

.link-arrow svg {
  transition: transform 0.15s;
}

/* -------- Hero -------- */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--c-white);
  overflow: hidden;
  min-height: clamp(560px, 80vh, 760px);
  display: flex;
  align-items: center;
  padding-block: var(--sp-9) var(--sp-9);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/*
 * Photo layer: CSS-only stylized scene (no external image dep).
 * Layered radial + linear gradients evoke warm sunlight over a community
 * setting. Designed to read as a real photograph at thumbnail scale.
 */
.hero__bg-photo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 75% 30%,
      rgba(224, 184, 107, 0.55),
      transparent 70%
    ),
    radial-gradient(
      ellipse 80% 60% at 20% 80%,
      rgba(90, 139, 184, 0.5),
      transparent 70%
    ),
    linear-gradient(135deg, #244b75 0%, #1a3a5f 45%, #0e2540 100%);
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(14, 37, 64, 0.25) 0%,
      rgba(14, 37, 64, 0.55) 60%,
      rgba(14, 37, 64, 0.75) 100%
    );
}

.hero__inner {
  max-width: 760px;
}

.hero .eyebrow {
  color: var(--c-gold-400);
}

.hero__title {
  font-size: var(--fs-h1);
  color: var(--c-white);
  margin-bottom: var(--sp-5);
}

.hero__title-accent {
  color: var(--c-gold-400);
}

.hero__sub {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.92);
  max-width: 60ch;
  margin-bottom: var(--sp-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6) var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero__trust li {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.hero__trust strong {
  display: block;
  color: var(--c-gold-400);
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 2px;
}

/* -------- Section primitives -------- */
.section {
  padding-block: var(--sp-9);
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--sp-10);
  }
}

.section--alt {
  background: var(--c-white);
}

.section__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-8);
}

.section__title {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-4);
}

.section__title--center {
  text-align: center;
}

.section__title--light {
  color: var(--c-white);
}

.section__sub {
  font-size: var(--fs-lead);
  color: var(--c-ink-700);
  max-width: 60ch;
}

.section__head .section__sub {
  margin-inline: auto;
}

.section__sub--light {
  color: rgba(255, 255, 255, 0.85);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--c-ink-700);
}

/* -------- Grid: What is CASA two-col -------- */
.grid {
  display: grid;
  gap: var(--sp-7);
}

.grid--two {
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .grid--two {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-9);
  }
}

.media-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--c-sky-200), var(--c-cream-100));
  aspect-ratio: 4 / 3;
}

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

/* -------- Impact grid (Why volunteer) -------- */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5);
  }
}

@media (min-width: 1024px) {
  .impact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.impact-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26, 58, 95, 0.06);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.impact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.impact-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--c-sky-100);
  color: var(--c-navy-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
}

.impact-card__stat {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-stat);
  color: var(--c-navy-800);
  line-height: 1;
  margin: 0 0 var(--sp-3);
}

.impact-card__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-2);
}

.impact-card__body {
  color: var(--c-ink-700);
  font-size: 0.9375rem;
  margin: 0;
}

/* -------- Quote / testimonial -------- */
.quote {
  background: var(--c-cream-100);
  padding-block: var(--sp-9);
}

.quote__figure {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.quote__mark {
  color: var(--c-gold-500);
  margin: 0 auto var(--sp-4);
}

.quote__body {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1rem + 1.5vw, 1.875rem);
  line-height: 1.4;
  color: var(--c-navy-900);
  margin: 0 0 var(--sp-5);
  letter-spacing: -0.01em;
}

.quote__attribution {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  color: var(--c-ink-700);
  font-size: 0.9375rem;
}

.quote__name {
  font-weight: 600;
  color: var(--c-navy-900);
}

.quote__role {
  color: var(--c-ink-500);
}

/* -------- Signup section -------- */
.section--signup {
  background:
    radial-gradient(
      ellipse 50% 50% at 80% 20%,
      rgba(212, 164, 75, 0.18),
      transparent 70%
    ),
    linear-gradient(160deg, var(--c-navy-800) 0%, var(--c-navy-900) 100%);
  color: var(--c-white);
}

.grid--signup {
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: start;
}

@media (min-width: 960px) {
  .grid--signup {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--sp-9);
  }
}

.signup-intro p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.85);
}

.signup-promise {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.signup-promise li {
  position: relative;
  padding-left: 1.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
}

.signup-promise li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--c-gold-500)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2.5 6.5l2.2 2.2 5-5.4' fill='none' stroke='%230e2540' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    no-repeat center / 12px 12px;
}

.signup-form {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
  color: var(--c-ink-900);
}

@media (min-width: 768px) {
  .signup-form {
    padding: var(--sp-7);
  }
}

.signup-form__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--c-cream-100);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
}

.field-row .field {
  margin-bottom: var(--sp-4);
}

.field label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-ink-900);
  margin-bottom: var(--sp-2);
}

.field input {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0.875rem 1rem;
  min-height: 52px;
  border: 1.5px solid var(--c-ink-300);
  border-radius: var(--radius-md);
  background: var(--c-white);
  color: var(--c-ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: var(--c-ink-500);
}

.field input:hover {
  border-color: var(--c-sky-500);
}

.field input:focus {
  outline: none;
  border-color: var(--c-navy-800);
  box-shadow: 0 0 0 3px rgba(90, 139, 184, 0.25);
}

.field input[aria-invalid="true"] {
  border-color: #b54224;
  box-shadow: 0 0 0 3px rgba(181, 66, 36, 0.18);
}

.field__hint {
  font-size: 0.8125rem;
  color: var(--c-ink-500);
  margin: var(--sp-2) 0 0;
}

.field__error {
  font-size: 0.8125rem;
  color: #b54224;
  margin: var(--sp-2) 0 0;
  font-weight: 500;
}

.signup-form .btn--primary {
  margin-top: var(--sp-3);
}

.form-status {
  margin: var(--sp-4) 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 1.5em;
}

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

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

/* -------- QR section -------- */
.qr-section {
  padding-block: var(--sp-9);
  background: var(--c-white);
}

.qr-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 768px) {
  .qr-section__inner {
    grid-template-columns: 1.4fr 1fr;
  }
}

.qr-section__code {
  display: flex;
  justify-content: center;
}

.qr-placeholder {
  background: var(--c-cream-100);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(26, 58, 95, 0.2);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.qr-placeholder__label {
  font-size: 0.8125rem;
  color: var(--c-ink-500);
  margin: 0;
  font-weight: 500;
}

/* When the backend injects the real <img>, hide the placeholder. */
#qr-code:has(img) .qr-placeholder {
  display: none;
}

#qr-code img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  background: var(--c-white);
  padding: var(--sp-3);
  box-shadow: var(--shadow-sm);
}

/* -------- Footer -------- */
.site-footer {
  background: var(--c-navy-900);
  color: rgba(255, 255, 255, 0.78);
  padding-block: var(--sp-8) 0;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--sp-7);
  }
}

.site-footer__brand .brand {
  margin-bottom: var(--sp-4);
}

.site-footer__mission {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  max-width: 36ch;
  margin: 0;
}

.site-footer__col h4 {
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 var(--sp-3);
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.site-footer__col a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-footer__col a:hover {
  color: var(--c-gold-400);
}

.site-footer__base {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--sp-5);
}

.site-footer__base-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
}

.site-footer__base-inner a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer__base-inner a:hover {
  color: var(--c-gold-400);
}

.site-footer__legal {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
}

/* -------- Print friendliness (QR scanning sheets) -------- */
@media print {
  .site-header,
  .site-nav,
  .site-footer,
  .hero__actions,
  .signup-form {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .hero,
  .section,
  .qr-section {
    padding-block: var(--sp-5);
  }
}
