/* ============================================================
   The Speaking Solution — styles.css
   Palette sampled from the logo + a reddish-brown accent.
   ============================================================ */

:root {
  --cream-bg:   #FAF6F0;  /* page background */
  --cream:      #E0C9AA;  /* light surface */
  --cream-soft: #F3E9DA;  /* tinted section background */
  --camel:      #BB9678;  /* secondary */
  --brown:      #795C44;  /* deep brown — headings, footer */
  --brown-dark: #3D2E22;  /* primary body text */
  --rust:       #9A4636;  /* accent — buttons, links, numbers */
  --rust-dark:  #7E3829;  /* accent hover */
  --line:       #E7DBCB;  /* hairlines */
  --white:      #FFFFFF;

  --maxw: 1100px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(61, 46, 34, 0.25);
  --shadow-sm: 0 4px 14px -8px rgba(61, 46, 34, 0.30);

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--brown-dark);
  background: var(--cream-bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--brown);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); letter-spacing: -0.3px; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 5vw, 2.5rem);
}
.container.narrow { max-width: 760px; }

.center { text-align: center; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--rust);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: var(--white); }

:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--camel);
  margin: 0 0 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 44px;
}
.btn-primary {
  background: var(--rust);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--rust-dark); color: var(--white); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--camel);
}
.btn-ghost:hover { background: var(--cream-soft); color: var(--brown); transform: translateY(-2px); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  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.6rem; color: var(--brown); }
.brand:hover { color: var(--brown); }
.brand-logo { width: 40px; height: 40px; object-fit: contain; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--brown);
}

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  color: var(--brown-dark);
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}
.primary-nav a:hover { color: var(--rust); background: var(--cream-soft); }
.primary-nav a.active { color: var(--rust); }
.primary-nav .nav-cta {
  background: var(--rust);
  color: var(--white);
  margin-left: 0.4rem;
}
.primary-nav .nav-cta:hover { background: var(--rust-dark); color: var(--white); }
.primary-nav .nav-cta.active { color: var(--white); }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brown);
  margin-inline: auto;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(187, 150, 120, 0.30), transparent 60%),
    linear-gradient(180deg, var(--cream-soft), var(--cream-bg));
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero-copy .lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--brown-dark);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-art { display: flex; justify-content: center; }
.hero-logo {
  width: min(320px, 80%);
  filter: drop-shadow(0 20px 40px rgba(61, 46, 34, 0.22));
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--cream-soft); }
.section-sub {
  color: var(--brown);
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.mission-text { font-size: 1.1rem; }
.mission-text:last-child { margin-bottom: 0; }

/* ---------- Impact / stats ---------- */
.stats-grid {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-prefix {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--rust);
  line-height: 1;
}
.stat-number {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  color: var(--rust);
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--rust);
}
.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-weight: 600;
  color: var(--brown);
  letter-spacing: 0.01em;
}

/* ---------- Cards (programs + team) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.program-body { padding: 1.4rem 1.5rem 1.6rem; }
.program-body p { margin-bottom: 0; }

/* real program card images */
.program-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

/* image placeholders */
.img-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, var(--cream) 0 14px, var(--cream-soft) 14px 28px);
  color: var(--brown);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.img-placeholder span {
  background: rgba(255, 255, 255, 0.75);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

/* ---------- Team ---------- */
.team-heading { margin-top: 3.5rem; }
.team-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.team-card {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.team-card h4 { font-family: var(--font-serif); color: var(--brown); margin: 0.9rem 0 0.2rem; font-size: 1.15rem; }
.team-card .role { color: var(--camel); font-weight: 600; margin: 0; font-size: 0.95rem; }
.avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 35%, var(--cream), var(--camel));
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto 1.8rem;
  display: grid;
  gap: 1rem;
  max-width: 420px;
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
}
.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--camel);
}
.contact-list a, .contact-list span:not(.contact-label) { font-size: 1.1rem; font-weight: 500; }
.contact-list span:not(.contact-label) { color: var(--brown-dark); }

.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; }
.social {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--camel);
  border-radius: 999px;
  color: var(--brown);
  font-weight: 600;
  font-size: 0.95rem;
}
.social:hover { background: var(--rust); color: var(--white); border-color: var(--rust); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--brown);
  color: #F2E7D8;
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-logo { width: 36px; height: 36px; background: var(--cream-bg); border-radius: 8px; padding: 3px; }
.site-footer .brand-name { color: #F8F0E5; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; }
.footer-nav a { color: #EAD9C3; font-weight: 500; }
.footer-nav a:hover { color: var(--white); }
.footer-note { color: #D9C6AE; font-size: 0.9rem; margin: 0; max-width: 60ch; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero-logo { width: min(220px, 60%); }

  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.open { max-height: 380px; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem clamp(1.2rem, 5vw, 2.5rem) 1rem;
  }
  .primary-nav li { width: 100%; }
  .primary-nav a { padding: 0.85rem 0.5rem; border-radius: 10px; }
  .primary-nav .nav-cta { margin: 0.5rem 0 0; text-align: center; }
}

/* ============================================================
   DELIGHT — reveals, motion, micro-interactions
   ============================================================ */

/* Scroll reveal system (activated by JS adding .js-reveal to <html>) */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* hero photo */
.hero-photo {
  width: min(480px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1.2rem;
  box-shadow: 0 24px 60px rgba(61, 46, 34, 0.28);
}

/* about section photo grid */
.about-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Button press tactile feedback */
.btn:active {
  transform: scale(0.97) !important;
  transition-duration: 0.06s !important;
}

/* Smoother card hover (cubic ease-out instead of linear) */
.program-card,
.team-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Social link scale on hover */
.social { transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.social:hover { transform: scale(1.05); }

/* Stat number glow when counting completes — the "applause moment" */
@keyframes statGlow {
  0%   { text-shadow: none; }
  35%  { text-shadow: 0 0 22px rgba(154, 70, 54, 0.5); }
  100% { text-shadow: none; }
}
.stat-number.counted { animation: statGlow 1.3s ease-out forwards; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
