/* =========================================================
   Waratah Connects — Shared Stylesheet
   Brand kit per Website Design Brief & NDIS Onboarding Guide
   ========================================================= */

:root {
  /* Brand palette (from brief, Part 5) */
  --teal: #2D6A7F;
  --teal-dark: #21505F;
  --teal-tint: #EAF2F5;
  --navy: #0A1633;
  --gold: #E9A542;
  --maroon: #894E64;
  --coral: #DB5E58;
  --white: #FFFFFF;

  /* Type */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 14px;
  --max-width: clamp(1100px, 88vw, 1560px);
}

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

html { scroll-behavior: smooth; }

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

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--space-2); }

a { color: var(--teal); text-decoration-thickness: 2px; }
a:hover { color: var(--teal-dark); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-150%);
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  transform: translateY(0);
}

/* Visible focus outlines everywhere (WCAG 2.1 AA) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* =========================
   Header / Navigation
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 1px solid #e4edf0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.2rem;
  padding: 0.75rem var(--space-3);
  max-width: clamp(1300px, 90vw, 1660px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}
.brand img { height: 44px; width: 44px; flex-shrink: 0; }
.brand-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.1;
  white-space: nowrap;
}
.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--teal-dark);
  white-space: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 1.6rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.1rem;
}
.nav-links li { flex-shrink: 0; }
.nav-links a {
  display: inline-block;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--gold);
  color: var(--teal-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.phone-link svg { flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 0.72rem 1.25rem;
  border-radius: 50px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { background: #d6913a; color: var(--navy); }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--teal); }

.btn-outline-teal {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal);
}
.btn-outline-teal:hover { background: var(--teal); color: var(--white); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--teal);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--coral);
  margin: 4px 0;
  border-radius: 2px;
}

@media (max-width: 1300px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    height: 100vh;
    width: min(320px, 85vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem var(--space-3) var(--space-3);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(10,22,51,0.12);
  }
  .main-nav.open { transform: translateX(0); }
  .nav-links {
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
  }
  .header-actions {
    flex-direction: column;
    align-items: flex-start;
    margin-top: var(--space-3);
    width: 100%;
    gap: 0.8rem;
  }
  .header-actions .btn { width: 100%; }
}

/* =========================
   Hero band (waratah motif signature)
   ========================= */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--teal-tint) 0%, var(--white) 60%);
  overflow: hidden;
  padding: var(--space-6) 0 var(--space-5);
}

.hero-bloom {
  position: absolute;
  right: -80px;
  top: -60px;
  width: 420px;
  height: 420px;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: center;
}
.hero-inner > *:not(.hero-bloom) {
  position: relative;
  z-index: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-bloom { width: 260px; height: 260px; right: -50px; top: -40px; }
}
@media (max-width: 640px) {
  .hero-bloom { width: 100px; height: 100px; right: -15px; top: -10px; opacity: 0.65; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(45,106,127,0.09);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  margin-bottom: var(--space-2);
}

.hero h1 { margin-bottom: var(--space-2); }
.hero .lead {
  font-size: 1.15rem;
  color: #33475a;
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--space-3);
}

.hero-phone {
  margin-top: var(--space-2);
  font-size: 0.95rem;
  color: #33475a;
}
.hero-phone a { font-weight: 700; color: var(--teal-dark); }

.hero-art {
  background: var(--white);
  border-radius: 20px;
  padding: var(--space-3);
  box-shadow: 0 20px 45px -20px rgba(10,22,51,0.25);
  border: 1px solid #e4edf0;
}
.hero-art img { border-radius: 12px; width: 100%; height: 280px; object-fit: cover; }
.hero-art figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: #5a6b78;
}

/* =========================
   CTA band (repeats phone + referral button)
   ========================= */
.cta-band {
  background: var(--coral);
  color: var(--white);
  padding: var(--space-4) 0;
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.cta-band h2, .cta-band p { color: var(--white); margin: 0; }
.cta-band .cta-text { max-width: 46ch; }
.cta-band-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* =========================
   Sections
   ========================= */
section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }
.section-tint { background: var(--teal-tint); }

.section-head {
  max-width: 62ch;
  margin: 0 auto var(--space-4);
  text-align: center;
}
.section-head.left { text-align: left; margin-left: 0; }

.eyebrow-line {
  color: var(--maroon);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

/* Card grid (services) */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(6, 1fr);
}
.grid > * { grid-column: span 2; min-width: 0; }
/* Centers a leftover 2-card row (only fires when there are exactly 5 cards total) */
.grid > *:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid > * { grid-column: span 1 !important; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .grid > * { grid-column: span 1 !important; }
}

.card {
  background: var(--white);
  border: 1px solid #e4edf0;
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 16px 32px -18px rgba(10,22,51,0.22); transform: translateY(-2px); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(233,165,66,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.card-icon svg { width: 28px; height: 28px; }

/* Photo-topped service cards with colour label bar (Home "What we offer") */
.card.service-card-photo {
  padding: 0;
  overflow: hidden;
}
.service-photo {
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.service-label-bar {
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
}
.service-label-bar h3 {
  color: var(--white);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.service-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.service-body {
  padding: 1.1rem 1.1rem 1.3rem;
}
.service-body p {
  font-size: 0.95rem;
  color: #33475a;
  margin-bottom: 0.8rem;
}

.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.98rem; color: #33475a; margin-bottom: 0.9rem; }
.card a.card-link {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.card a.card-link::after { content: " →"; }

/* Value points / why choose us */
.value-list {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.value-list > * { min-width: 0; }
.value-item { display: flex; gap: 1rem; }
.value-item .dot {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--coral); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; flex-shrink: 0;
}

/* Steps (getting started) */
.steps {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}
.steps > * { min-width: 0; }
.step {
  position: relative;
  background: var(--white);
  border: 1px solid #e4edf0;
  border-radius: var(--radius);
  padding: var(--space-3);
  padding-top: var(--space-4);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -18px;
  left: var(--space-3);
  width: 40px; height: 40px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
}

/* Testimonial / trust */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-around;
  text-align: center;
}
.trust-strip .stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--teal);
}
.trust-strip .stat span { font-size: 0.9rem; color: #5a6b78; }

/* Forms */
form.card-form {
  background: var(--white);
  border: 1px solid #e4edf0;
  border-radius: var(--radius);
  padding: var(--space-4);
  max-width: 720px;
}
.form-row { margin-bottom: var(--space-3); }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-row .hint { font-size: 0.85rem; color: #5a6b78; margin-top: 0.3rem; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid #d7e3e7;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--navy);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(45,106,127,0.18);
}
.form-row textarea { resize: vertical; min-height: 110px; }
.required-mark { color: var(--coral); }

/* Honeypot field - hidden from real users, catches bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.85rem;
  color: #5a6b78;
  margin-top: var(--space-2);
}

.alert {
  border-radius: 10px;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  font-weight: 600;
}
.alert-success { background: #e6f4ea; color: #1e5b32; border: 1px solid #b7dfc2; }
.alert-error { background: #fdecec; color: #8a2b26; border: 1px solid #f3b9b6; }

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: start;
}
.two-col > * { min-width: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Contact details list */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: 0.9rem;
  padding: var(--space-2) 0;
  border-bottom: 1px solid #e4edf0;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Values grid on About */
.value-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.value-grid > * { min-width: 0; }

/* Page hero (non-home) */
.page-hero {
  background: var(--teal-tint);
  padding: var(--space-5) 0 var(--space-4);
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; }
.page-hero .hero-bloom { width: 300px; height: 300px; right: -20px; top: -50px; opacity: 0.55; z-index: 0; }
.page-hero .container > *:not(.hero-bloom) { position: relative; z-index: 1; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { max-width: 55ch; color: #33475a; font-size: 1.05rem; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--teal-dark);
  margin-bottom: var(--space-2);
}
.breadcrumb a { color: var(--teal-dark); }

/* Service detail block */
.service-block {
  padding: var(--space-4) 0;
  border-bottom: 1px solid #e4edf0;
}
.service-block:last-of-type { border-bottom: none; }
.service-block .two-col { align-items: center; }
.service-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: var(--space-2); }
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  background: rgba(137,78,100,0.12);
  color: var(--maroon);
}

/* FAQ / definition style */
.info-block {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

/* "What we cover" overview section (Services page) */
.coverage-group { margin-bottom: var(--space-4); }
.coverage-group:last-child { margin-bottom: 0; }
.coverage-group-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--teal-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--teal-tint);
  padding-bottom: 0.6rem;
  margin: 0 0 var(--space-2);
}
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}
.coverage-grid > * { min-width: 0; }
.coverage-item {
  background: var(--white);
  border: 1px solid #e4edf0;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}
.coverage-item h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.coverage-item p {
  font-size: 0.87rem;
  color: #556270;
  margin: 0;
  line-height: 1.5;
}

/* Table (glossary) */
.simple-table { width: 100%; border-collapse: collapse; margin-top: var(--space-2); }
.simple-table th, .simple-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e4edf0;
  font-size: 0.95rem;
}
.simple-table th { background: var(--teal-tint); font-family: var(--font-heading); }

/* =========================
   Footer
   ========================= */
.site-footer {
  background: var(--coral);
  color: #cfd8e8;
  padding: var(--space-5) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  margin-bottom: var(--space-4);
}
.footer-grid > * { min-width: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.site-footer h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-2);
}
.site-footer a { color: #cfd8e8; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }

.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--space-2); }
.footer-brand img {
  height: 40px;
  width: 40px;
  background: var(--white);
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.footer-brand span { font-family: var(--font-heading); font-weight: 600; color: var(--white); font-size: 1.1rem; }

.acknowledgement-block {
  padding: var(--space-3) 0;
  max-width: 75ch;
}
.acknowledgement-flags {
  display: flex;
  gap: 0.6rem;
  margin-bottom: var(--space-2);
}
.flag-icon {
  border-radius: 3px;
  display: block;
}
.acknowledgement {
  font-size: 0.9rem;
  color: #a9b6cc;
  margin: 0 0 0.7rem;
  line-height: 1.6;
}
.acknowledgement:last-of-type { margin-bottom: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #a9b6cc;
}
.footer-bottom .legal-line { max-width: 60ch; }

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