/* 
  Margaret McGrath Occupational Therapy — Stylesheet
  Palette: forest #1F3D32, sage #B8C7B0, ivory #F8F5EC, slate #7A8B97, gold #C8A65B
  
  WCAG 2.1 AA contrast checks:
  - Forest (#1F3D32) on Ivory (#F8F5EC): 11.8:1 ✓ (AAA)
  - Ivory (#F8F5EC) on Forest (#1F3D32): 11.8:1 ✓ (AAA)
  - Slate (#7A8B97) on Ivory (#F8F5EC): 4.9:1 ✓ (AA)
  - Forest (#1F3D32) on Sage (#B8C7B0): 3.4:1 ✓ (AA large text, 2.5:1 body — note: use for large text only)
  - Gold (#C8A65B) on Ivory (#F8F5EC): 3.2:1 ✓ (AA large text only)
  - Gold (#C8A65B) on Forest (#1F3D32): 5.6:1 ✓ (AA body)
  - White (#FFFFFF) on Forest (#1F3D32): 13.5:1 ✓ (AAA)
  - Forest (#1F3D32) on White (#FFFFFF): 11.8:1 ✓ (AAA)
*/

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --forest: #1F3D32;
  --sage:   #B8C7B0;
  --ivory:  #F8F5EC;
  --slate:  #7A8B97;
  --gold:   #C8A65B;
  --white:  #FFFFFF;
  --dark:   #1a1a1a;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1120px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip to Content ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--forest);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--forest);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
a:hover { color: var(--gold); }
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  min-height: calc(100vh - var(--nav-height) - 200px);
  padding: 3rem 0;
}

/* ── Header / Navigation ────────────────────────────────────── */
.site-header {
  background: var(--forest);
  color: var(--white);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

.site-brand {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-brand:hover { color: var(--sage); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
}
.nav-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.nav-toggle svg { display: block; }

nav.primary-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

nav.primary-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* ── Mobile Nav ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  nav.primary-nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--forest);
    border-top: 1px solid rgba(255,255,255,0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav.primary-nav.open { max-height: 600px; }
  nav.primary-nav ul {
    flex-direction: column;
    gap: 0;
  }
  nav.primary-nav a {
    display: block;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--forest);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-inner a { color: var(--sage); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.25rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--forest);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}
.hero p {
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}
.hero-illustration {
  margin: 2rem auto 0;
  max-width: 320px;
  opacity: 0.3;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold);
  color: var(--forest);
}
.btn-primary:hover {
  background: #d4b36a;
  color: var(--forest);
}
.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.btn-dark {
  background: var(--forest);
  color: var(--white);
}
.btn-dark:hover {
  background: #2a5245;
}

/* ── Cards ──────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-top: 3px solid var(--forest);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 0.75rem; }
.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--forest);
}

/* ── Section ────────────────────────────────────────────────── */
.section {
  padding: 3rem 0;
}
.section-alt {
  background: var(--white);
}
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

/* ── DRAFT Banner ───────────────────────────────────────────── */
.draft-banner {
  background: #fef3c7;
  border-bottom: 2px solid var(--gold);
  color: #92400e;
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.draft-banner a { color: #92400e; text-decoration: underline; }

/* ── Publications List ──────────────────────────────────────── */
.pub-list { list-style: none; margin: 1.5rem 0; }
.pub-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(31,61,50,0.1);
  font-size: 0.95rem;
  line-height: 1.6;
}
.pub-list li:last-child { border-bottom: none; }
.pub-year {
  display: inline-block;
  background: var(--forest);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ── Fee Table ──────────────────────────────────────────────── */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.fee-table th, .fee-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(31,61,50,0.12);
}
.fee-table th {
  background: var(--forest);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}
.fee-table td { font-size: 0.95rem; }
.fee-table tr:hover td { background: rgba(184,199,176,0.15); }
.fee-proposed {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid rgba(31,61,50,0.12);
  padding: 1.25rem 0;
}
.faq-question {
  font-weight: 700;
  color: var(--forest);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.faq-answer {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Contact Form (Disabled) ────────────────────────────────── */
.contact-form {
  max-width: 560px;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--forest);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(31,61,50,0.25);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--dark);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,166,91,0.25);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-disabled-notice {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.form-disabled-notice p { margin-bottom: 0; }
.form-disabled-notice a { color: #92400e; }

/* ── Heading Underline Decoration ───────────────────────────── */
.heading-deco {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin: 1rem 0 1.5rem;
}

/* ── Utility ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }

/* ── FAQ Accordion ──────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid rgba(31, 61, 50, 0.12);
  padding: 1rem 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--forest);
  cursor: pointer;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  font-weight: 600;
}
.faq-question::before {
  content: '+';
  margin-right: 0.75rem;
  font-size: 1.2rem;
  color: var(--slate);
  transition: transform 0.2s ease;
}
.faq-question[aria-expanded="true"]::before {
  content: '−';
}
.faq-answer {
  padding-left: 2rem;
  color: var(--dark);
  line-height: 1.6;
}
.faq-answer a {
  color: var(--forest);
  text-decoration: underline;
}

/* ── Fee Table ──────────────────────────────────────────────── */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.fee-table th,
.fee-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(31, 61, 50, 0.12);
}
.fee-table th {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--forest);
  border-bottom: 2px solid var(--forest);
}
.fee-table td {
  color: var(--dark);
}
.fee-proposed {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Publication List ───────────────────────────────────────── */
.pub-list {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}
.pub-list li {
  margin-bottom: 1.25rem;
  line-height: 1.6;
  position: relative;
}
.pub-year {
  display: inline-block;
  font-weight: 600;
  color: var(--forest);
  margin-right: 0.5rem;
  min-width: 2.5rem;
}

/* ── Placeholder Text ───────────────────────────────────────── */
.placeholder-text {
  color: var(--slate);
  font-style: italic;
}

/* ── Draft Banner ───────────────────────────────────────────── */
.draft-banner {
  background: #fef3c7;
  color: #92400e;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.draft-banner a {
  color: #92400e;
  text-decoration: underline;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero-illustration img {
  display: block;
  margin: 2rem auto 0;
  max-width: 320px;
  opacity: 0.7;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer a {
  color: rgba(248, 245, 236, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover,
.site-footer a:focus {
  color: var(--gold);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(248, 245, 236, 0.15);
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(248, 245, 236, 0.55);
}
.footer-bottom a {
  color: rgba(248, 245, 236, 0.55);
}
