/* ==========================================================================
   Peaceful Pathways — site styles
   Sections: 1 Fonts · 2 Tokens & base · 3 Typography · 4 Layout · 5 Header &
   navigation · 6 Components · 7 Footer · 8 Accessibility helpers ·
   9 Responsive · 10 Reduced motion
   Visual identity (colors, type, spacing) is unchanged from Build 2 except
   where noted with "A11Y:" comments.
   ========================================================================== */

/* 1. Fonts — self-hosted, SIL Open Font License (see fonts/FONT-LICENSES.txt).
   Latin subset only; add a latin-ext file if a future language needs it. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dm-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokens & base */
:root {
  --ivory: #faf7f0;
  --white: #fffdf9;
  --sage: #637b6c;
  --deep: #30483e;
  --rose: #f2e6e0;
  --sand: #e9e3d7;
  --ink: #343c37;
  --muted: #5a655e;      /* A11Y: was #657069 (4.21:1 on rose); now 4.97:1 */
  --accent: #8a5d49;     /* A11Y: eyebrow text; was #9b6d58 (3.6–4.2:1); now >= 4.59:1 on every section background */
}
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; } /* A11Y: keeps focused/anchored items clear of the sticky header */
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 16px/1.7 'DM Sans', Arial, sans-serif;
}

/* 3. Typography */
h1, h2, h3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--deep);
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
h3 { font-size: 1.28rem; }
p { max-width: 70ch; }
a { color: var(--deep); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  font-size: .73rem;
  font-weight: 700;
}
.lead { font-size: 1.16rem; color: #55645a; }
.small { font-size: .8rem; color: var(--muted); }
.lang { font-size: .8rem; color: var(--muted); }

/* 4. Layout */
.container { width: min(1140px, 90%); margin: auto; }
section { padding: 76px 0; }
.soft { background: #eaf0e9; }
.rose { background: var(--rose); }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }
.hero {
  padding: 100px 0 95px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 65px;
  align-items: center;
}
.hero-art {
  min-height: 370px;
  border-radius: 190px 190px 12px 12px;
  background: linear-gradient(145deg, #d8e3d6, #f6e7d7 60%, #f5f1e6);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 35px;
  border: 1px solid #d5d8c9;
}
.hero-art span { font: italic 2.2rem Georgia, serif; color: var(--deep); }
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 35px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  align-items: center;
}
.article { max-width: 800px; margin: auto; }
.article p { max-width: none; }
.article h2 { font-size: 1.7rem; margin-top: 40px; }
.article .intro { font-size: 1.2rem; }

/* 5. Header & navigation */
.nav {
  background: rgba(250, 247, 240, .97);
  border-bottom: 1px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.logo {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: .08em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 0 12px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
  padding: 11px 5px;             /* A11Y: ~45px tall touch target (was ~23px) */
}
.nav-links a:hover,
.nav-links a:focus-visible { text-decoration: underline; }
.nav-links a[aria-current="page"] {   /* A11Y: visible "you are here" cue that does not rely on color */
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* 6. Components */
.btn {
  display: inline-block;
  background: var(--deep);
  color: white;
  padding: 13px 21px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  margin: 7px 9px 7px 0;
}
.btn.alt { background: transparent; border: 1px solid var(--deep); color: var(--deep); }
.btn:hover,
.btn:focus-visible { filter: brightness(1.15); }
.card {
  background: var(--white);
  border: 1px solid #e6dfd3;
  padding: 29px;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card p { flex: 1; }
.card a { font-weight: 700; }
.pill {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #8d6655;
  font-weight: 700;
}
/* Card/feature headings use <h2> or <h3> for correct outline but keep the Build 2 look. */
h2.card-title,
h3.card-title { font-size: 1.28rem; margin: 1em 0; }
.feature { background: var(--white); border-radius: 12px; padding: 38px; }
.callout { background: var(--rose); border-radius: 10px; padding: 30px; margin: 35px 0; }
.note { border-left: 3px solid var(--sage); padding: 15px 22px; background: #eef1eb; margin: 28px 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 22px; }

/* 7. Footer */
.footer { background: var(--deep); color: #f1f4ef; padding: 48px 0; }
.footer a { color: white; }
.footer-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.25;
  color: white;
  margin: .83em 0;
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 35px; }
.footer .small { color: #c8d5cb; }

/* 8. Accessibility helpers */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 2px; }
.footer :focus-visible,
.skip-link:focus-visible { outline-color: #fff; }
.skip-link:focus-visible { outline-offset: -6px; }
main:focus { outline: none; }

/* 9. Responsive */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* no orphaned half-width card */
  .hero { gap: 40px; }
  .split { gap: 35px; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 0; }
  .nav { position: static; }      /* A11Y/mobile: header no longer eats screen height while scrolling */
  .nav-inner { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 0 8px; }
  .nav-links { gap: 0 14px; width: 100%; }
}
@media (max-width: 760px) {
  .hero, .split, .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 60px 0; }
  .hero-art { min-height: 240px; }
  .grid { grid-template-columns: 1fr; }
  section { padding: 55px 0; }
}
@media (max-width: 560px) {
  .nav-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
  .nav-links a { display: flex; align-items: center; min-height: 44px; padding: 6px 4px; }
}

/* 10. Reduced motion — smooth scrolling only for people who have not opted out */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
