/* =========================================================
   CMA CLINICS — clinicservices.com.au
   Shared stylesheet. Design system copied from cmaclinic.com.au
   (palette, type, header, hero, form, footer).
   ========================================================= */

/* Self-hosted fonts (no Google Fonts request) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fraunces-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
}

:root {
  --green-bright: #6FB439;
  --green-bright-hover: #5EA628;
  --green-deep: #0E3B35;
  --green-deep-2: #1A5248;
  --green-soft: #EAF3E0;
  --green-tint: #F5F9F0;
  --black: #0A0A0A;
  --ink: #1A1A1A;
  --muted: #5B6660;
  --line: #E4E7E2;
  --cream: #FAFAF7;
  --white: #FFFFFF;
  --red-soft: #C0392B;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1240px;
  --maxw-prose: 760px;
  --radius: 4px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: var(--white);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ANNOUNCEMENT BAR */
.announce {
  background: var(--green-bright);
  color: var(--black);
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
  font-weight: 500;
}

/* HEADER / NAV */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--black);
}
.logo span { font-weight: 300; letter-spacing: 0.12em; }
.nav { display: flex; gap: 36px; align-items: center; }
.nav a {
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--green-bright-hover); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--ink);
}
.header-actions { display: flex; gap: 20px; align-items: center; }
.mobile-toggle { display: none; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  min-width: 180px;
  min-height: 44px;
}
.btn-primary {
  background: var(--green-bright);
  color: var(--black);
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.btn-primary:hover {
  background: var(--green-bright-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(111,180,57,0.3);
}
.btn-primary:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-secondary:hover { background: var(--white); color: var(--black); }

/* HOME HERO */
.hero {
  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(111, 180, 57, 0.12), transparent 60%),
    linear-gradient(120deg, var(--green-deep) 0%, var(--green-deep-2) 100%);
  color: var(--white);
  padding: 96px 24px 120px;
  position: relative;
  overflow: hidden;
}
.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero h1 em { font-style: italic; color: var(--green-bright); font-weight: 300; }
.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 auto 40px;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* INNER PAGE HERO */
.page-hero {
  background:
    radial-gradient(1000px 500px at 20% 20%, rgba(111, 180, 57, 0.12), transparent 60%),
    linear-gradient(120deg, var(--green-deep) 0%, var(--green-deep-2) 100%);
  color: var(--white);
  padding: 72px 24px 88px;
  position: relative;
  overflow: hidden;
}
.page-hero-inner {
  max-width: var(--maxw-prose);
  margin: 0 auto;
  position: relative;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.page-hero h1 em { font-style: italic; color: var(--green-bright); font-weight: 300; }
.page-hero .lede {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
.page-hero .updated {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 24px;
  letter-spacing: 0.03em;
}

/* SECTION BASE */
.section { padding: 120px 24px; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 780px;
  margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--green-bright-hover); font-weight: 300; }
.section-lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ABOUT STRIP (home) */
.about { background: var(--cream); }
.about .section-inner { text-align: center; }
.about .section-title,
.about .section-lede { margin-left: auto; margin-right: auto; }

/* ENQUIRY (form) */
.enquiry { background: var(--white); }
.enquiry-layout {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 72px;
  align-items: start;
}
.enquiry-intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.enquiry-intro h2 em { font-style: italic; color: var(--green-bright-hover); font-weight: 300; }
.enquiry-intro p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 420px;
}
.enquiry-intro .note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

form.enquiry-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.field label .optional {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field label .required {
  font-size: 12px;
  color: var(--green-bright-hover);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field input,
.field textarea {
  padding: 15px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  font-size: 16px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(111, 180, 57, 0.15);
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field.has-error input,
.field.has-error textarea { border-color: var(--red-soft); }
.error-text { font-size: 13px; color: var(--red-soft); display: none; }
.field.has-error .error-text { display: block; }
.hp { position: absolute; left: -5000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-smallprint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 380px;
}
.form-smallprint a { text-decoration: underline; color: var(--green-bright-hover); }
.form-error {
  display: none;
  background: #FBEDEB;
  border: 1px solid #F1C9C3;
  color: var(--red-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.5;
}
.form-error.is-visible { display: block; }

.success-panel {
  display: none;
  background: var(--green-deep);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.success-panel.is-visible { display: block; }
.success-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(111,180,57,0.18), transparent 60%);
  pointer-events: none;
}
.success-inner { position: relative; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(111, 180, 57, 0.2);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.success-icon svg {
  width: 28px; height: 28px;
  stroke: var(--green-bright);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-panel h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.success-panel p { color: rgba(255,255,255,0.78); font-size: 15px; line-height: 1.6; }

/* LEGAL PAGES */
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}
.toc { position: sticky; top: 100px; font-size: 13px; }
.toc h2 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 8px; }
.toc a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  margin-left: -14px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--ink); border-left-color: var(--green-bright); }
.content { max-width: var(--maxw-prose); }
.content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 56px 0 16px;
  scroll-margin-top: 100px;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  margin: 28px 0 10px;
  letter-spacing: -0.005em;
}
.content p { font-size: 16px; color: var(--ink); margin-bottom: 18px; line-height: 1.7; }
.content ul { margin: 0 0 20px 24px; padding: 0; }
.content li { font-size: 16px; color: var(--ink); line-height: 1.7; margin-bottom: 8px; }
.content a { color: var(--green-bright-hover); text-decoration: underline; }
.data-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin: 20px 0;
}
.data-card h3 { margin-top: 0; color: var(--green-deep); }
.data-card dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px 20px;
  font-size: 15px;
}
.data-card dt {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.data-card dd { color: var(--ink); line-height: 1.6; }

/* 404 */
.notfound { padding: 140px 24px; text-align: center; }
.notfound h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 58px);
  margin-bottom: 16px;
}
.notfound h1 em { font-style: italic; color: var(--green-bright-hover); font-weight: 300; }
.notfound p { color: var(--muted); margin-bottom: 32px; font-size: 17px; }

/* FOOTER */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  padding: 80px 24px 32px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { color: var(--white); margin-bottom: 20px; display: inline-block; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 340px; }
.footer-col h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s ease;
  padding: 0;
  text-align: left;
}
.footer-col a:hover { color: var(--green-bright); }
.footer-bottom {
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.disclaimer {
  max-width: var(--maxw);
  margin: 40px auto 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero { padding: 64px 24px 80px; }
  .section { padding: 80px 24px; }
  .enquiry-layout { grid-template-columns: 1fr; gap: 40px; }
  .layout { grid-template-columns: 1fr; gap: 32px; padding: 56px 24px; }
  .toc { position: static; }
  .page-hero { padding: 64px 24px 72px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .mobile-toggle {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .mobile-toggle span { width: 18px; height: 2px; background: var(--ink); position: relative; }
  .mobile-toggle span::before,
  .mobile-toggle span::after {
    content: ''; position: absolute; left: 0;
    width: 18px; height: 2px; background: var(--ink);
  }
  .mobile-toggle span::before { top: -6px; }
  .mobile-toggle span::after { top: 6px; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
  }
  .hero h1 { font-size: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .btn { min-width: 0; width: 100%; }
  .hero-cta-row { flex-direction: column; width: 100%; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .data-card dl { grid-template-columns: 1fr; gap: 4px; }
  .data-card dd { margin-bottom: 10px; }
}

/* Subtle entry animations */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-sub, .hero-cta-row,
  .page-hero h1, .page-hero .lede {
    animation: fadeUp 0.8s ease both;
  }
  .hero-sub, .page-hero .lede { animation-delay: 0.12s; }
  .hero-cta-row { animation-delay: 0.24s; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
