/* ==========================================================================
   Idaho Employment & Training Program — CommunityCX
   Design system for the testing prototype.
   Primary brand blue: #1b8cc3 (per Asana task notes).
   NOTE: The DHW style guide page 12 lists the official DHW Blue as #001489.
   If brand decides to switch, change --brand-* below and that's the only edit.
   ========================================================================== */

:root {
  /* Brand blue + accessible darker steps for text/buttons (WCAG AA on white) */
  --brand-400: #4fa9d4;
  --brand-500: #1b8cc3;   /* primary, decorative / large surfaces */
  --brand-600: #15749f;   /* hover */
  --brand-700: #0f5c84;   /* button + link text, passes AA on white */
  --brand-800: #0b4666;

  /* DHW accent palette (style guide p.12), used sparingly */
  --jade: #007864;
  --marigold: #ff9425;
  --jewel: #4e008e;

  /* Neutrals */
  --ink: #1a2733;
  --ink-soft: #44525e;
  --line: #d9e1e7;
  --bg: #ffffff;
  --bg-soft: #f3f7fa;
  --bg-band: #eef4f8;

  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 2px 4px rgba(16,42,67,.06), 0 8px 24px rgba(16,42,67,.08);
  --font: "Verdana", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-800); }

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

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--brand-800);
  color: #fff; padding: 10px 16px; z-index: 1000; }
.skip:focus { left: 8px; top: 8px; color: #fff; }

/* Visible focus for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--marigold); outline-offset: 2px;
}

/* ---------- Header / nav ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 104px; width: auto; display: block; }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; background: var(--brand-500);
  display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: .98rem; }
.brand-text span { font-size: .72rem; color: var(--ink-soft); }

.nav-toggle { display: none; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 40px; padding: 0; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, top .2s ease, background .2s ease; }
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--brand-700); background: var(--bg-band); }
.nav-portal .arr { display: inline-block; opacity: 0; transform: translateX(-3px);
  transition: opacity .15s ease, transform .15s ease; }
.nav-portal:hover .arr, .nav-portal:focus-visible .arr { opacity: 1; transform: translateX(2px); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
  font-weight: 700; font-size: 1rem; border-radius: 999px; padding: 13px 24px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); color: #fff; }
.btn-outline { background: #fff; color: var(--brand-700); border-color: var(--brand-700); }
.btn-outline:hover { background: var(--bg-band); color: var(--brand-800); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); color: #fff; }
.hero .container { padding: 64px 20px; display: grid; gap: 28px; grid-template-columns: 1.3fr .9fr; align-items: center; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.12rem; color: #eaf4fa; max-width: 40ch; }
.hero .eyebrow { display: inline-block; background: rgba(255,255,255,.18); color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero .btn-outline { background: #fff; border-color: #fff; }
.hero-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 24px; }
.hero-card h2 { color: #fff; font-size: 1.1rem; margin-top: 0; }
.hero-card a { color: #fff; font-weight: 700; }
.hero-card .phone { font-size: 1.5rem; font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); }
.section .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 65ch; }
.section-head { max-width: 65ch; margin-bottom: 36px; }
.eyebrow-dark { color: var(--brand-700); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: .8rem; margin: 0 0 8px; }

/* ---------- Cards grid ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); }
.card .ico { width: 46px; height: 46px; border-radius: 10px; background: var(--bg-band);
  display: grid; place-items: center; margin-bottom: 14px; color: var(--brand-700); }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- About band ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* ---------- Resource links ---------- */
.reslist { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.reslink { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
  text-decoration: none; color: var(--ink); }
.reslink:hover { border-color: var(--brand-500); background: var(--bg-soft); }
.reslink strong { display: block; }
.reslink span { color: var(--ink-soft); font-size: .85rem; }
.reslink .arrow { color: var(--brand-700); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta { background: var(--brand-800); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #d8e7f0; max-width: 52ch; margin-inline: auto; }
.cta .hero-actions { justify-content: center; }
.cta .btn-outline { background: #fff; border-color: #fff; }

/* ---------- FAQ accordion ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq + .faq { margin-top: 12px; }
.faq button { width: 100%; text-align: left; background: #fff; border: 0; padding: 18px 20px;
  font-family: inherit; font-size: 1.02rem; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.faq button:hover { background: var(--bg-soft); }
.faq .sign { color: var(--brand-700); font-size: 1.4rem; flex: none; line-height: 1; }
.faq .panel { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq .panel-inner { padding: 0 0 18px; color: var(--ink-soft); }
.faq[open] .panel, .faq.open .panel { max-height: 600px; }

/* ---------- Forms ---------- */
.form-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field .req { color: #b42318; }
.field .opt { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
.field input, .field textarea { width: 100%; font-family: inherit; font-size: 1rem;
  padding: 12px 14px; border: 1px solid #b6c2cc; border-radius: 8px; }
.field input:focus, .field textarea:focus { border-color: var(--brand-500); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-soft); }
.info-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.info-card h3 { margin-top: 0; }
.info-card .phone { font-size: 1.4rem; font-weight: 700; color: var(--brand-700); }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd8e0; padding: 48px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.site-footer a { color: #cdd8e0; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #2d3b47; margin-top: 32px; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #9fb0bd; font-size: .85rem; }

/* ---------- Flag banner (testing only) ---------- */
.flag { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12;
  font-size: .82rem; text-align: center; padding: 8px 16px; }
.flag strong { color: #7c2d12; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding: 48px 20px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .about, .form-wrap, .footer-grid { grid-template-columns: 1fr; }
  .form-wrap .info-card { order: -1; }
  .reslist { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .brand-logo { height: 68px; }
  .nav { display: none; width: 100%; }
  .nav.open { display: block; position: absolute; left: 0; right: 0; top: 76px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; }
  .header-inner { position: relative; }
  .nav.open ul { flex-direction: column; gap: 2px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
