/* ============================================================
   ANGELICA GROUP — NDIS / SDA HOUSING
   Shared stylesheet. Mobile-first. WCAG 2.1 AA target.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (from logo) */
  --charcoal:   #1e1f21;
  --deep:       #161719;
  --gold:       #c6a96b;
  --gold-soft:  #d8c08a;
  --cream:      #f3efe6;
  --muted:      #9a9892;

  /* Functional colours chosen for contrast.
     --gold-text is darkened from brand gold so gold-coloured text
     on charcoal/deep clears 4.5:1. Brand --gold is reserved for
     large text, borders, icons and decorative use. */
  --gold-text:  #d8bd86;          /* ~6.0:1 on --deep, for body-size gold text */
  --ink:        #1e1f21;          /* primary text on light bg */
  --ink-soft:   #45464a;          /* secondary text on light bg, ~8:1 on cream */
  --line:       #ddd6c7;          /* hairlines on light bg */
  --line-dark:  #34353a;          /* hairlines on dark bg */
  --bg:         #ffffff;
  --bg-cream:   #f3efe6;
  --bg-cream-2: #ece6d8;
  --focus:      #ffd27a;          /* high-vis focus ring */

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;

  --wrap: 1180px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(22,23,25,.06), 0 8px 30px rgba(22,23,25,.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;                 /* 16px min */
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  letter-spacing: .005em;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 var(--sp-4); }
a { color: inherit; }

.lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 60ch;
}

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: var(--sp-2); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -120px;
  z-index: 999;
  background: var(--charcoal);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Focus visibility (global) ---------- */
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: 2px;
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: var(--sp-8) 0; }
.section--tight { padding: var(--sp-7) 0; }
.section--cream { background: var(--bg-cream); }
.section--dark { background: var(--charcoal); color: var(--cream); }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 var(--sp-3);
}
.section--dark .eyebrow { color: var(--gold-text); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.center { text-align: center; margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn--primary { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--on-dark { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.btn--on-dark.btn--ghost { background: transparent; color: #fff; border-color: var(--cream); }
.btn--on-dark.btn--ghost:hover { background: #fff; color: var(--deep); }
.btn:active { transform: translateY(1px); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-5); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30,31,33,.97);
  border-bottom: 1px solid var(--line-dark);
  color: var(--cream);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.brand .mark {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 700;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 600;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
}
.nav-toggle .bars { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.nav-menu { list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block;
  text-decoration: none;
  color: var(--cream);
  font-weight: 500;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-dark);
}
.nav-menu a:hover { color: var(--gold-text); }
.nav-menu a[aria-current="page"] { color: var(--gold-text); }
.nav-menu .nav-cta a {
  color: var(--deep);
  background: var(--gold);
  border-radius: var(--radius);
  border-bottom: none;
  padding: var(--sp-2) var(--sp-5);
  text-align: center;
  font-weight: 600;
  margin-top: var(--sp-2);
}
.nav-menu .nav-cta a:hover { background: var(--gold-soft); color: var(--deep); }

/* Mobile: menu collapses */
@media (max-width: 859px) {
  .nav-menu {
    display: none;
    width: 100%;
    padding-bottom: var(--sp-4);
  }
  .nav-menu.is-open { display: block; }
  .nav { flex-wrap: wrap; }
}

/* Desktop nav */
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    align-items: center;
    gap: var(--sp-5);
  }
  .nav-menu a { padding: var(--sp-2) 0; border-bottom: 2px solid transparent; }
  .nav-menu a[aria-current="page"] { border-bottom-color: var(--gold); }
  .nav-menu .nav-cta a { border-bottom: none; margin-top: 0; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22,23,25,.78), rgba(22,23,25,.88)),
    radial-gradient(120% 90% at 80% 10%, #2b2c30 0%, var(--deep) 60%);
  color: var(--cream);
  padding: var(--sp-9) 0;
  border-bottom: 1px solid var(--line-dark);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: var(--cream); opacity: .92; }
.hero .eyebrow { color: var(--gold-text); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-dark);
}
.hero-meta div { min-width: 140px; }
.hero-meta strong { font-family: var(--serif); font-size: 1.6rem; color: var(--gold-text); display: block; }
.hero-meta span { font-size: .9rem; color: var(--cream); opacity: .85; }

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
}
.section--cream .card { background: #fff; }
.card h3 { margin-bottom: var(--sp-3); }
.card .icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-cream);
  color: var(--ink);
  border: 1px solid var(--line);
  margin-bottom: var(--sp-4);
}
.card .icon svg { width: 24px; height: 24px; }

.card--link { display: block; text-decoration: none; transition: transform .12s ease, box-shadow .15s ease; }
.card--link:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(22,23,25,.14); }
.card--link .more { color: var(--ink-soft); font-weight: 600; margin: 0; }

/* feature list with check marks */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: var(--sp-3);
}
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: .45em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--gold);
  border-bottom: 2.5px solid var(--gold);
  transform: rotate(-45deg);
}
.section--dark .checklist li::before { border-color: var(--gold-text); }

/* ---------- Split / media ---------- */
.split {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--media-first .media { order: -1; }
}

.placeholder-img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, #ece6d8 0 14px, #e6dfcd 14px 28px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: .9rem;
  padding: var(--sp-5);
}
.placeholder-img span {
  background: rgba(255,255,255,.75);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
}

/* ---------- Steps (process) ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-5); }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  padding-left: calc(var(--sp-6) + 56px);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: var(--sp-5); top: var(--sp-6);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.step h3 { margin-bottom: var(--sp-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; }
caption { text-align: left; color: var(--ink-soft); margin-bottom: var(--sp-3); }
th, td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

/* ---------- Callout / note ---------- */
.note {
  border-left: 4px solid var(--gold);
  background: var(--bg-cream);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}
.note strong { color: var(--ink); }
.section--dark .note { background: rgba(255,255,255,.05); border-left-color: var(--gold); color: var(--cream); }
.section--dark .note strong { color: #fff; }

/* ---------- Anchored category blocks ---------- */
.cat { scroll-margin-top: 96px; }
.cat-badge {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: var(--sp-1) var(--sp-3);
  margin-bottom: var(--sp-3);
}

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: var(--cream); opacity: .9; max-width: 56ch; margin-inline: auto; }

/* ============================================================
   FORMS
   ============================================================ */
.form { max-width: 640px; }
.field { margin-bottom: var(--sp-5); }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.field .req { color: #8a2b1f; }
.field .hint { font-size: .88rem; color: var(--ink-soft); margin: 0 0 var(--sp-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: var(--sp-3) var(--sp-4);
  min-height: 48px;
  border: 1px solid #b9b3a5;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--charcoal); }
.form-status { margin-top: var(--sp-4); font-weight: 600; }
.form-status:empty { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--deep);
  color: var(--cream);
  padding: var(--sp-8) 0 var(--sp-6);
  border-top: 1px solid var(--line-dark);
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: var(--sp-4); }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold-text); text-decoration: underline; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--sp-2); }
.footer-bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}
.placeholder { color: var(--gold-text); font-style: italic; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
