/*
  Joburg North Psychology — "Warm Practice, Photography-Led"
  Redesign per client-pinned reference. Replaces the earlier
  "Calm Official Record" system. See DESIGN.md for the full record.
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --paper: #fbfaf7;
  --sage-tint: #e7eee9;
  --sage-tint-deep: #dbe6e0;
  --ink: #16302a;
  --ink-soft: #4b615a;
  --ink-faint: #7c8f87;
  --line: #dce6e1;
  --line-strong: #b9ccc1;

  --accent: #1f4a3e;
  --accent-deep: #143028;
  --accent-tint: rgba(31, 74, 62, 0.08);

  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 42rem;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.3rem; }
em.accent-word, .accent-word { font-style: italic; color: var(--accent); }

p { margin: 0 0 1.1em; max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--ink-soft); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 1.1em 0;
}
.meta-row span { white-space: nowrap; display: inline-flex; align-items: center; }
.meta-row span::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.6em;
}
.meta-row span:first-child::before { content: none; }

.container { max-width: 74rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.prose { max-width: var(--measure); }
.icon { display: inline-block; vertical-align: middle; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  gap: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.brand small {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

.header-actions { display: flex; align-items: center; gap: 1.5rem; }
nav.primary-nav { display: none; }
nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 500;
}
nav.primary-nav a { color: var(--ink-soft); text-decoration: none; }
nav.primary-nav a:hover, nav.primary-nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle { display: block; }
.nav-toggle > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle[open] > summary { border-color: var(--accent); color: var(--accent); }
.nav-toggle .mobile-menu { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1.1rem; }
.nav-toggle .mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; font-size: 1rem; font-weight: 500; }
.nav-toggle .mobile-menu a { color: var(--ink); text-decoration: none; }
.nav-toggle .mobile-menu a[aria-current="page"] { color: var(--accent); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  nav.primary-nav { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-on-photo { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-on-photo:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost-on-photo { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); color: #fff; backdrop-filter: blur(6px); }
.btn-ghost-on-photo:hover { background: rgba(255,255,255,0.22); }

/* ---------- Hero photo (full-bleed) ---------- */
.hero-photo {
  position: relative;
  width: 100%;
  min-height: clamp(26rem, 72vh, 44rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  padding-bottom: 2.75rem;
}
@media (max-width: 640px) {
  .hero-photo { min-height: 0; padding: 6.5rem 0 3.5rem; align-items: flex-start; }
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,31,27,0.2) 0%, rgba(14,31,27,0.1) 35%, rgba(14,31,27,0.55) 100%),
    linear-gradient(100deg, rgba(14,31,27,0.82) 0%, rgba(14,31,27,0.6) 32%, rgba(14,31,27,0.22) 58%, rgba(14,31,27,0.08) 75%);
}
.hero-photo .container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-photo .hero-copy { max-width: 40rem; }
.hero-photo h1, .hero-photo p { color: #fff; }
.hero-photo .accent-word { color: #e8cd8f; }
.hero-photo .lede { color: rgba(255,255,255,0.88); }
.hero-photo .meta-row { color: rgba(255,255,255,0.82); }
.hero-photo .meta-row span::before { background: #fff; }
.hero-photo .hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.hero-photo .photo-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 0.85rem;
  z-index: 2;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.28);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.hero-photo .photo-credit a { color: #fff; }

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}
.page-hero h1 { max-width: 22ch; }

/* ---------- Sections / rhythm ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--sage-tint); }
.section-head { max-width: 42rem; margin-bottom: 2.25rem; }
.section-head h2 { font-weight: 500; }
.section-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2.25rem; }
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Split section (photo + text) ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-media { order: 2; }
  .split.reverse .split-copy { order: 1; }
}
.split-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 45px -18px rgba(22, 48, 42, 0.35);
  aspect-ratio: 4 / 3.1;
  object-fit: cover;
}
.split-media .photo-credit {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.split-copy h2 { margin-bottom: 0.75rem; }

/* ---------- Card grid (services) ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .card-grid { grid-template-columns: 1.15fr 1fr; }
  .card-grid .card-stack { display: grid; gap: 1.5rem; }
  .card-grid-even { grid-template-columns: 1fr 1fr; }
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--line);
}
.card.card-photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.card-photo img { width: 100%; height: auto; aspect-ratio: 16/11; object-fit: cover; }
.card.card-photo .card-body { padding: 1.75rem; }
.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.96rem; }
.card .card-link { display: inline-block; margin-top: 0.9rem; font-size: 0.9rem; font-weight: 600; }

/* ---------- Credential card (replaces certificate box) ---------- */
.credential-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--sage-tint);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.credential-card .badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.credential-card h3 { margin-bottom: 0.2rem; }
.credential-card .role { color: var(--ink-soft); margin-bottom: 0.75rem; }
.credential-card .body { flex: 1 1 16rem; }

/* ---------- Statement band (full-bleed peak moment) ---------- */
.statement-band {
  background: var(--accent);
  color: #fff;
  padding: clamp(3.5rem, 9vw, 6rem) 0;
}
.statement-band .container { max-width: 50rem; }
.statement-band p {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  line-height: 1.28;
  color: #fff;
  margin: 0 0 1.25rem;
  max-width: none;
}
.statement-band p em { font-style: italic; opacity: 0.92; }
.statement-band .meta-row { color: rgba(255,255,255,0.78); margin: 0; }
.statement-band .meta-row span::before { background: rgba(255,255,255,0.6); }

/* ---------- Fee table ---------- */
.fee-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.fee-table th, .fee-table td { text-align: left; padding: 1rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.fee-table td.amount { font-weight: 600; white-space: nowrap; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; flex-shrink: 0; font-family: var(--font-sans); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-answer { padding: 0 0 1.5rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.detail-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.detail-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
.detail-list .label { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.map-frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 20px 45px -18px rgba(22,48,42,0.3); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

form.contact-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-note { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--sage-tint-deep); padding: 3.5rem 0 2.25rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h4 { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; font-size: 0.8rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-bottom a { color: var(--ink-faint); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 1; transform: none; }
.js-enhanced .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-enhanced .reveal.in-view { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: auto; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { left: 1rem; top: 1rem; }
