/* ==========================================================================
   Pillar Care Support Services — Design System
   Built from the brand logo. See project docs for full rationale.
   White is the dominant surface throughout; colour is spent on actions
   (buttons), badges and the footer only — never large background blocks.
   ========================================================================== */

:root {
  /* Brand colours — extracted/derived from the logo */
  --navy:        #16264A; /* headings, footer, nav-dark */
  --blue:        #3257A8; /* primary CTAs + links — participant/family actions */
  --blue-deep:   #24447F; /* primary hover */
  --blue-wash:   #EEF2FA; /* small badges/tags only, never full sections */
  --green:       #0D8049; /* secondary CTAs — coordinator/referral actions */
  --green-deep:  #0A6B3D;
  --green-wash:  #E9F5EE;
  --red:         #EA1427; /* logo + form-error states, plus a light decorative accent (icon rotation) per Mo's request */
  --red-wash:    #FCEAE8;

  /* Neutrals — white-dominant per brand direction */
  --ink:         #16213A;
  --ink-soft:    #4E5A72;
  --ink-faint:   #687183; /* darkened from #7C879C — the lighter shade failed WCAG AA (3.6:1) at the small sizes it's used at (breadcrumbs, hero notes, form hints); this passes at 4.9:1 */
  --paper:       #FFFFFF; /* page background: white */
  --surface:     #FFFFFF; /* card background: white */
  --stone:       #F6F7F9; /* the ONLY off-white, used sparingly (alt row, footer-top) */
  --line:        #E3E7EE; /* hairline borders/dividers do the separating, not colour */

  --shadow: rgba(22, 38, 74, 0.08);
  --focus:  #3257A8;

  --radius: 9px;
  --radius-lg: 14px;

  /* 8px spacing scale */
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 48px; --sp-6: 64px; --sp-7: 96px;

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Fraunces", "Georgia", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--blue); text-decoration-thickness: 1.5px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-block;
  font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); margin-bottom: .6rem;
}
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; padding: .35rem .75rem;
  border-radius: 999px; background: var(--blue-wash); color: var(--blue);
}
.badge.green { background: var(--green-wash); color: var(--green-deep); }
.badge .dot { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  font-family: "Inter", sans-serif; font-weight: 700; font-size: .95rem;
  padding: .85rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  text-decoration: none; line-height: 1; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-refer { background: var(--green); color: #fff; }
.btn-refer:hover { background: var(--green-deep); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline.on-dark { border-color: #fff; color: #fff; }
.btn-outline.on-dark:hover { background: #fff; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--blue); padding-left: .25rem; padding-right: .25rem; }
.btn-ghost:hover { color: var(--blue-deep); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; gap: 1.1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand img { height: 54px; width: auto; }
.brand-word { font-family: "Fraunces"; font-optical-sizing: auto; font-weight: 700; font-size: 1.4rem; color: var(--navy); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 1.3rem; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: .93rem; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: .9rem; }
.phone-link { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--navy); text-decoration: none; font-size: .93rem; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle svg { display: block; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px var(--shadow); padding: .6rem; min-width: 280px;
  display: grid; gap: .1rem; opacity: 0; visibility: hidden; translate: 0 6px;
  transition: opacity .15s ease, translate .15s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; translate: 0 0; }
.dropdown a { padding: .55rem .7rem; border-radius: 8px; font-size: .88rem; font-weight: 600; }
.dropdown a:hover { background: var(--stone); }

/* Switches to the hamburger menu — kept wide enough that the full-size logo/wordmark plus all
   nav links never has to wrap or overflow at in-between desktop/tablet widths. */
@media (max-width: 1160px) {
  .main-nav { position: fixed; top: 73px; left: 0; right: 0; height: calc(100vh - 73px); height: calc(100dvh - 73px);
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 1.5rem; gap: 0; overflow-y: auto; transform: translateX(100%); transition: transform .2s ease; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); white-space: normal; }
  .dropdown { position: static; transform: none; box-shadow: none; border: none; opacity: 1; visibility: visible; translate: 0; padding-left: 1rem; display: none; }
  .has-dropdown.open .dropdown { display: grid; }
  .nav-toggle { display: block; flex: none; }
  .header-actions .btn-lg-label { display: none; }
}

/* Phone-width-only tightening: the hamburger menu is already active by this point (see above),
   so this only needs to fit brand + phone icon + enquiry button + toggle. */
@media (max-width: 640px) {
  .header-row { gap: .6rem; }
  .header-actions { gap: .5rem; }
  .brand img { height: 42px; }
  .brand-word { font-size: 1.15rem; }
  .header-actions .btn-primary { padding: .85rem 1.05rem; }
}

@media (max-width: 400px) {
  .header-row { gap: .3rem; }
  .header-actions { gap: .3rem; }
  .brand { gap: .35rem; }
  .brand img { height: 34px; }
  .brand-word { font-size: .95rem; }
  .header-actions .btn-primary { padding: .7rem .65rem; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero { padding: var(--sp-7) 0 var(--sp-6); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--sp-6); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin-bottom: var(--sp-2); }
.hero .lede { font-size: 1.1rem; max-width: 46ch; margin-bottom: var(--sp-3); }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.hero-note { font-size: .85rem; color: var(--ink-faint); }

.hero-art {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--stone);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .hero-art { aspect-ratio: 16/10; max-width: 480px; margin: 0 auto; }
  .service-hero-art { max-width: 560px; margin: 0 auto; }
}

/* Landscape (3:2) photo treatment for service-page heroes — reuses .hero/.hero-grid layout */
.service-hero-art {
  position: relative; aspect-ratio: 3/2; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--stone);
}
.service-hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Service detail page ---------- */
.service-includes { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.service-includes li { display: flex; gap: .7rem; font-size: .96rem; color: var(--ink-soft); }
.service-includes svg { color: var(--blue); flex: none; margin-top: .2rem; }
.service-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin: var(--sp-2) 0 var(--sp-3); }
.breadcrumb { font-size: .85rem; color: var(--ink-faint); margin-bottom: var(--sp-2); }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Section shell ---------- */
.section { padding: var(--sp-7) 0; }
.section-head { max-width: 62ch; margin-bottom: var(--sp-4); }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .7rem; }
.section-head p { font-size: 1.02rem; }
.section-alt { background: var(--stone); }

/* ---------- Service cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
@media (max-width: 1000px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-3); text-decoration: none; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.service-card:hover { box-shadow: 0 14px 32px var(--shadow); transform: translateY(-3px); border-color: transparent; }
.service-card .ico {
  width: 3rem; height: 3rem; border-radius: 10px; background: var(--blue-wash); color: var(--blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-2);
}
/* A little colour variety across the 8 service icons (brand blue/green/red) so the grid doesn't read as all-blue */
.service-card .ico.green { background: var(--green-wash); color: var(--green-deep); }
.service-card .ico.red { background: var(--red-wash); color: var(--red); }
.service-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.service-card p { font-size: .89rem; margin-bottom: 0; flex: 1; }
.service-card .go { margin-top: 1rem; font-size: .85rem; font-weight: 700; color: var(--blue); }

/* ---------- Region cards ---------- */
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
@media (max-width: 1000px) { .region-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .region-grid { grid-template-columns: 1fr; } }
.region-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-3);
  text-decoration: none; display: block;
}
.region-card h3 { font-size: 1rem; margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.region-card h3 svg { color: var(--green); flex: none; }
.region-card p { font-size: .85rem; margin: 0; }
.region-card:hover { border-color: var(--green); }

/* ---------- Coordinator band ---------- */
.coordinator-band {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-5); display: grid; grid-template-columns: 1.3fr .7fr; gap: var(--sp-4); align-items: center;
}
@media (max-width: 800px) { .coordinator-band { grid-template-columns: 1fr; } }
.coordinator-band h2 { font-size: 1.6rem; margin-bottom: .7rem; }
.coordinator-list { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .6rem; }
.coordinator-list li { display: flex; gap: .6rem; font-size: .93rem; color: var(--ink-soft); }
.coordinator-list svg { color: var(--green); flex: none; margin-top: .15rem; }
.coordinator-actions { display: flex; flex-direction: column; gap: .9rem; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: .9rem; max-width: 760px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; font-weight: 700; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform .15s ease; flex: none; color: var(--blue); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-a { padding: 0 1.3rem 1.2rem; font-size: .92rem; }

/* ---------- Final CTA band ---------- */
.cta-band { background: var(--navy); border-radius: var(--radius-lg); padding: var(--sp-5); text-align: center; color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .7rem; }
.cta-band p { color: #C7D0E3; max-width: 56ch; margin: 0 auto var(--sp-3); }
.cta-band .hero-ctas { justify-content: center; }

.mission-band { background: var(--blue-wash); border-radius: var(--radius-lg); padding: var(--sp-6) var(--sp-4); text-align: center; }
.mission-band .eyebrow { display: block; }
.mission-band p { font-family: "Fraunces"; font-optical-sizing: auto; font-weight: 700; font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  color: var(--navy); max-width: 46ch; margin: 0 auto; line-height: 1.2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C7D0E3; padding: var(--sp-6) 0 var(--sp-3); margin-top: var(--sp-7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-4); padding-bottom: var(--sp-4); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand img { height: 34px; margin-bottom: .9rem; }
.footer-brand p { color: #A6B1C7; font-size: .87rem; max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.footer-col a { color: #C7D0E3; text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: var(--sp-3);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: .82rem; color: #94A0B8;
}
.footer-bottom a { color: #94A0B8; }
.footer-bottom-left { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ndis-badge { height: 48px; width: auto; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.25); flex: none; }
@media (max-width: 640px) { .footer-bottom { justify-content: flex-start; } .footer-bottom-left { width: 100%; } }

/* ---------- Inner page hero (Contact, Refer, and future inner pages) ---------- */
.page-hero { padding: var(--sp-6) 0 var(--sp-5); border-bottom: 1px solid var(--line); background: var(--stone); }
.page-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .6rem; }
.page-hero p { font-size: 1.05rem; max-width: 60ch; margin: 0; }
.page-hero .hero-ctas { margin-top: var(--sp-3); margin-bottom: 0; }
.page-hero .hero-note { margin-top: var(--sp-2); }
.page-hero .breadcrumb { margin-bottom: var(--sp-2); }

/* ---------- Forms (Contact / Refer) ---------- */
.form-layout { display: grid; grid-template-columns: 1.5fr .85fr; gap: var(--sp-5); align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-3); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: grid; gap: .4rem; margin-bottom: var(--sp-3); }
.field label, .field legend { font-weight: 700; font-size: .88rem; color: var(--navy); padding: 0; }
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: .8rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  font-family: inherit; font-size: .96rem; padding: .8rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash);
}
.field fieldset { border: none; padding: 0; margin: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: .3rem; }
.choice-row label { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; color: var(--ink); }
.choice-row input[type="radio"] { width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
.form-note { font-size: .82rem; color: var(--ink-faint); margin-top: var(--sp-2); }
.hp-field { position: absolute; left: -5000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.2rem; margin-top: .5rem; }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } }
.check-grid label { display: flex; align-items: flex-start; gap: .55rem; font-weight: 600; font-size: .9rem; color: var(--ink); }
.check-grid input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--green); margin-top: .15rem; flex: none; }
.field-error { font-size: .8rem; color: var(--red); margin-top: .5rem; display: none; }
.field-error.show { display: block; }

.consent-box {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: var(--sp-3);
  background: var(--green-wash); margin-bottom: var(--sp-3);
}
.consent-box label { display: flex; align-items: flex-start; gap: .7rem; font-weight: 600; font-size: .89rem; color: var(--ink); cursor: pointer; }
.consent-box input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--green-deep); margin-top: .2rem; flex: none; }
.consent-box a { color: var(--green-deep); }

.contact-side { display: grid; gap: var(--sp-3); align-content: start; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-3); }
.contact-card h3 { font-size: 1rem; margin-bottom: .9rem; }
.contact-card p { font-size: .88rem; margin-bottom: .9rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .row { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; text-decoration: none; }
.contact-card .row:last-child { margin-bottom: 0; }
.contact-card .row .ico {
  width: 2.2rem; height: 2.2rem; border-radius: 8px; background: var(--blue-wash); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.contact-card .row div { font-size: .92rem; }
.contact-card .row strong { display: block; color: var(--navy); font-size: .95rem; }
.contact-card.refer .row .ico { background: var(--green-wash); color: var(--green-deep); }

/* ---------- Confirmation / thank-you pages ---------- */
.confirm-panel { max-width: 620px; margin: 0 auto; text-align: center; padding: var(--sp-6) 0; }
.confirm-panel .ico-circle {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--green-wash); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center; margin: 0 auto var(--sp-3);
}
.confirm-panel h1 { margin-bottom: .8rem; }
.confirm-panel p { font-size: 1.05rem; }
.confirm-panel .hero-ctas { justify-content: center; margin-top: var(--sp-3); }

/* ---------- Suburb tags (area pages) ---------- */
.suburb-tags { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 760px; }
.suburb-tags span {
  background: var(--stone); border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1rem; font-size: .87rem; font-weight: 600; color: var(--ink-soft);
}

/* ---------- Utility ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }
