/* ============================================================
   Paradise RISE — styles.css
   Mobile-first. Targets WCAG 2.0 AA (contrast, focus, motion).
   Brand palette derived from afwd.org.
   ============================================================ */

:root {
  --teal-900: #133e45;   /* deepest; footer / hero base */
  --teal-800: #15505a;   /* gradient mid */
  --teal-700: #1c5b66;   /* text/link teal on white (~5.6:1) */
  --teal-600: #226d7a;   /* AFWD primary brand teal — header, hero, surfaces */
  --cyan-500: #22b8d1;   /* AFWD accent (CTAs, dots, rules) */
  --cyan-600: #1597af;   /* darker cyan for AA text on white */
  --cloud:    #b0e0e9;   /* AFWD cloud blue */
  --ice:      #e4f5fa;   /* AFWD ice (matches afwd.org .st0) */
  --ice-2:    #f3fafc;
  --ink:      #15252a;   /* body text on white ~13:1 */
  --ink-soft: #3d5258;
  --white:    #ffffff;
  --amber:    #b65c00;   /* AA on white for highlight text */
  --danger:   #b00020;
  --ok:       #14692f;
  --focus:    #0a4a8f;   /* high-contrast focus ring */
  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(19,62,69,.08);
  --shadow-lg: 0 8px 28px rgba(19,62,69,.16);
  /* AFWD uses Open Sans for body copy and Roboto for headings/titles. */
  --font: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Roboto", "Segoe UI", "Open Sans", Helvetica, Arial, sans-serif;
}

*, *::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: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings use Roboto to match afwd.org's title typography */
.hero__title, .section__title, .card__title, .stat__num,
.hero__eyebrow, .nav-menu, .fieldset legend, .contact-card .card__title {
  font-family: var(--font-head);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); }
a:hover { color: var(--teal-900); }

/* Visible focus for keyboard users (AA 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }

/* Screen-reader-only utility */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: var(--teal-900); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 8px;
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------------- Utility / language bar ---------------- */
.utility-bar { background: var(--teal-900); color: #eaf6f9; font-size: .9rem; }
.utility-bar a { color: #bfe9f1; }
.utility-bar a:hover { color: #fff; }
.utility-bar__inner {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  align-items: center; justify-content: space-between; padding: 8px 20px;
}
.lep-statement { margin: 0; font-weight: 600; }
.utility-bar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tty { white-space: nowrap; }

.lang-switch { display: flex; align-items: center; gap: 4px; }
.lang-btn {
  background: transparent; color: #eaf6f9; border: 1px solid #3a6f78;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font: inherit; min-height: 34px;
}
.lang-btn:hover { background: #19505a; }
.lang-btn.is-active { background: #fff; color: var(--teal-900); border-color: #fff; font-weight: 700; }
.lang-more select {
  background: #19505a; color: #eaf6f9; border: 1px solid #3a6f78;
  border-radius: 999px; padding: 6px 10px; font: inherit; min-height: 34px;
}
.lang-more select option { color: #15252a; background: #fff; }

/* ---------------- Header ---------------- */
.site-header { background: var(--teal-600); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: inline-flex; align-items: center; }
.brand__logo { width: 200px; height: auto; }
.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.nav-menu a { color: #eaf6f9; text-decoration: none; padding: 8px 12px; border-radius: 6px; display: block; font-weight: 600; }
.nav-menu a:hover { background: #19505a; color: #fff; }
.nav-cta { background: var(--cyan-500); color: var(--teal-900) !important; }
.nav-cta:hover { background: #5fd0e3; }
.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  background: linear-gradient(155deg, var(--teal-600) 0%, var(--teal-800) 55%, var(--teal-900) 100%);
  color: #fff;
  overflow: hidden;
}
/* Soft cloud-blue glow, echoing afwd.org's decorative shapes */
.hero::before {
  content: ""; position: absolute; top: -120px; right: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(34,184,209,.30) 0%, rgba(34,184,209,0) 70%);
  pointer-events: none;
}
/* White wave that carries the hero into the page (AFWD's signature curved sections) */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 56px;
  background: var(--white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64h1440V20C1200 52 960 64 720 52 480 40 240 4 0 24z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64h1440V20C1200 52 960 64 720 52 480 40 240 4 0 24z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero__inner { position: relative; z-index: 1; padding: 60px 20px 96px; text-align: center; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--cloud); margin: 0 0 10px; font-size: .9rem; }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.25rem); line-height: 1.04; margin: 0 0 18px; font-weight: 900; letter-spacing: -.5px; text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.hero__lead { max-width: 720px; margin: 0 auto 30px; font-size: 1.18rem; color: #eaf8fb; }
.hero__lead strong { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero__funding { max-width: 720px; margin: 34px auto 0; font-size: .85rem; color: #cdeaf0; border-top: 1px solid rgba(176,224,233,.32); padding-top: 16px; }
.grant-no { display: inline-block; font-weight: 700; color: #fff; }

/* ---------------- Buttons ---------------- */
.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border-radius: var(--radius); border: 2px solid transparent; padding: 12px 22px; min-height: 48px; line-height: 1.3; text-align: center; transition: background .15s ease, transform .05s ease; }
.btn--lg { font-size: 1.08rem; padding: 14px 28px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--cyan-500); color: var(--teal-900); border-color: var(--cyan-500); }
.btn--primary:hover { background: #18a3bb; color: #06262c; }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------------- Sections ---------------- */
.section { padding: 56px 0; }
.section--alt { background: var(--ice-2); }
.section__title { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; color: var(--teal-900); margin: 0 0 14px; text-align: center; }
.section__title::after { content: ""; display: block; width: 64px; height: 4px; background: var(--cyan-500); border-radius: 2px; margin: 16px auto 0; }
.section__intro { max-width: 760px; margin: 0 auto 32px; text-align: center; color: var(--ink-soft); font-size: 1.08rem; }
.fineprint { font-size: .92rem; color: var(--ink-soft); max-width: 760px; margin: 22px auto 0; text-align: center; }
.fineprint strong { color: var(--amber); }

/* Stats */
.stat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
.stat { background: var(--ice); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat__num { display: block; font-size: 2.6rem; font-weight: 800; color: var(--teal-700); line-height: 1; }
.stat__label { display: block; margin-top: 6px; color: var(--ink-soft); font-weight: 600; }

/* Cards */
.card-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid #d7e8ec; border-left: 5px solid var(--cyan-500); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card__title { margin: 0 0 8px; color: var(--teal-900); font-size: 1.2rem; }
.callout { background: var(--ice); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 18px 22px; margin: 26px auto 0; max-width: 760px; }
.callout p { margin: 0; }

/* Program / service / grids */
.program-grid, .service-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.program, .service { background: #fff; border: 1px solid #d7e8ec; border-radius: var(--radius); padding: 16px 18px; font-weight: 600; color: var(--teal-900); display: flex; align-items: center; gap: 12px; }
.program::before, .service::before { content: ""; flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan-500); }

/* ---------------- Form ---------------- */
.rise-form { background: #fff; border: 1px solid #d7e8ec; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .fieldset legend { font-weight: 700; color: var(--teal-900); }
.field__hint { margin: 0; font-size: .85rem; color: var(--ink-soft); font-weight: 400; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  font: inherit; color: var(--ink); padding: 11px 12px; border: 1.5px solid #9fb6bc;
  border-radius: 8px; background: #fff; width: 100%; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
/* Only flag fields after the user has interacted (avoids scary red borders on load). */
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--danger); }
.field--error input, .field--error select { border-color: var(--danger); }

.fieldset { border: 1px solid #d7e8ec; border-radius: var(--radius); padding: 16px 18px; margin: 20px 0 0; }
.fieldset legend { padding: 0 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--ink); padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--teal-700); }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
.check--consent { margin-top: 20px; background: var(--ice-2); border: 1px solid #d7e8ec; border-radius: 8px; padding: 14px; }

#submit-btn { margin-top: 22px; }
.form-foot { font-size: .85rem; color: var(--ink-soft); margin: 12px 0 0; text-align: center; }
.form-status { padding: 14px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 600; }
.form-status--ok { background: #e7f6ec; border: 1px solid var(--ok); color: var(--ok); }
.form-status--err { background: #fdecef; border: 1px solid var(--danger); color: var(--danger); }
.inline-es, .lep-inline { font-style: italic; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- Partners ---------------- */
.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); align-items: stretch; }
.partner {
  background: #fff; border: 1px solid #dbeaee; border-radius: var(--radius);
  padding: 24px 20px; min-height: 120px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.partner:hover, .partner:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--cloud); }
.partner img { max-height: 64px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.partner__text { font-weight: 700; color: var(--teal-900); font-size: 1.05rem; }

/* ---------------- Lists / notices ---------------- */
.link-list { max-width: 760px; margin: 0 auto 20px; padding-left: 1.1em; }
.link-list li { margin: 8px 0; }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.contact-card { background: #fff; border: 1px solid #d7e8ec; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.contact-card address { font-style: normal; color: var(--ink-soft); line-height: 1.8; }
.contact-line { margin: 6px 0; }
.contact-label { font-weight: 700; color: var(--teal-900); display: inline-block; min-width: 64px; }
.lep-inline { color: var(--teal-700); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--teal-900); color: #d7eef3; padding: 44px 0 28px; font-size: .92rem; }
.site-footer a { color: #9fdcea; text-decoration: underline; }
.site-footer a:hover { color: #fff; }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #2f6670; }
.footer-logo { display: inline-flex; align-items: center; justify-content: center; }
.footer-logo img { height: 58px; width: auto; display: block; }
.footer-logo--plain img { height: 50px; }
/* White rounded chip so colored agency seals stay legible on the dark footer */
.footer-logo--chip { background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.footer-logo--chip img { height: 56px; }
.logo-placeholder { border: 1px dashed #5a8a92; color: #bfe2e9; padding: 16px 20px; border-radius: 8px; font-size: .8rem; }
.footer-statements p { max-width: 920px; margin: 0 0 14px; }
.lep-statement--footer { background: #19505a; border-left: 4px solid var(--cyan-500); padding: 12px 16px; border-radius: 6px; }
.footer-copy { margin-top: 22px; color: #9fc2c9; font-size: .85rem; }

/* ============================================================
   Responsive (tablet / desktop)
   ============================================================ */
@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .program-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 860px) {
  .card-row { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .program-grid { grid-template-columns: repeat(3, 1fr); }
  .service-grid { grid-template-columns: repeat(4, 1fr); }
  .partner-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------------- Mobile nav ---------------- */
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; background: #19505a; border: 1px solid #3a6f78;
    border-radius: 8px; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    content: ""; display: block; width: 22px; height: 2px; background: #fff; position: relative;
  }
  .nav-toggle__bars::before { position: absolute; top: -7px; }
  .nav-toggle__bars::after { position: absolute; top: 7px; }
  .nav-menu {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; background: var(--teal-700); padding: 8px 16px 16px; gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.is-open { display: flex; }
  .main-nav { position: static; }
  .site-header__inner { position: relative; }
  .nav-menu a { padding: 12px; border-bottom: 1px solid #2f6670; }
}

/* High-contrast / forced-colors support */
@media (forced-colors: active) {
  .btn, .card, .partner, .contact-card { border: 1px solid; }
}
