/* ===================================================================
   Dr Christiaan Watson — doctorwatson.co.za
   Design tokens
   =================================================================== */

:root{
  /* Colour */
  --ink:        #14293D;   /* near-black, warmed toward green */
  --ink-soft:   #57626B;
  --paper:      #F7F8FA;   /* cool stone paper, not warm cream */
  --paper-alt:  #EAF1F1;
  --line:       #DCE3E6;
  --teal:       #0E7C7E;   /* primary — clinical + coastal */
  --teal-deep:  #0B2036;
  --sage:       #EAF6F5;   /* quiet section backgrounds */
  --ember:      #1DBBBB;   /* single warm accent — used sparingly */
  --ember-soft: #E3F3F3;
  --white:      #FFFFFF;

  /* Type */
  --serif: "Lora", "Iowan Old Style", Georgia, serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: 2.9rem;
  --step-5: 3.8rem;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[id]{ scroll-margin-top: 5.5rem; }

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

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

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

h1, h2, h3, h4{
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--teal-deep);
  margin: 0 0 0.5em;
}

h1{ font-size: clamp(2.1rem, 4vw, var(--step-5)); font-weight: 500; letter-spacing: -0.01em; }
h2{ font-size: clamp(1.6rem, 3vw, var(--step-4)); font-weight: 500; }
h3{ font-size: var(--step-2); font-weight: 600; }
h4{ font-size: var(--step-1); font-weight: 600; }

p{ margin: 0 0 1.1em; max-width: 62ch; }
.lede{ font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; }

:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

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

/* ---------- layout ---------- */
.wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.narrow{ max-width: 760px; }

section{ padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section.alt{ background: var(--sage); }
section.deep{ background: var(--teal-deep); color: var(--paper); }
section.deep h2, section.deep h3, section.deep h4{ color: var(--paper); }
section.deep p{ color: #B7C9D1; }
section.deep a{ color: #7DBEB6; }

.divider{
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- nav ---------- */
.site-header{
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,248,250,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav{
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  max-width: 1180px; margin: 0 auto;
}
.brand{
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--teal-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-logo{ height: 38px; width: auto; flex-shrink: 0; }
.footer-logo{ height: 52px; width: auto; margin-bottom: 1rem; }
.brand span{ color: var(--ember); }
.nav-links{
  display: flex; gap: clamp(1rem, 2vw, 2rem);
  list-style: none; margin: 0; padding: 0;
  font-size: 0.97rem;
}
.nav-links a{
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"]{
  color: var(--teal); border-bottom-color: var(--teal);
}
.nav-cta{
  background: var(--teal); color: var(--white) !important;
  padding: 0.55rem 1.15rem; border-radius: 3px;
  border-bottom: none !important;
  font-weight: 500;
}
.nav-cta:hover{ background: var(--teal-deep); color: var(--white) !important; }

.nav-toggle{
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 4px;
  width: 42px; height: 38px; cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after{
  content: ""; display: block; height: 2px; background: var(--ink);
  margin: 4px auto; width: 20px;
}

@media (max-width: 780px){
  .nav-links{
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 1rem clamp(1.25rem,4vw,3rem) 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{ display: block; }
  .nav-links{ gap: 0.25rem; }
  .nav-links a{ display: block; padding: 0.75rem 0; font-size: 1.02rem; }
  .nav-cta{ display: inline-block; text-align: center; margin-top: 0.5rem; padding: 0.8rem 1.15rem; }
}

/* ---------- buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.8rem 1.5rem;
  border-radius: 3px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--sans);
  min-height: 44px;
}
.btn-primary{ background: var(--ember); color: var(--teal-deep); }
.btn-primary:hover{ background: #16A3A3; color: var(--teal-deep); }
.btn-ghost{ border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-ghost:hover{ background: var(--teal); color: var(--white); }
.btn-ghost-light{ border-color: #B7C9D1; color: var(--paper); background: transparent; }
.btn-ghost-light:hover{ background: var(--paper); color: var(--teal-deep); }

.btn-row{ display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

/* ---------- hero ---------- */
.hero{
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 7vw, 5rem);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow{
  color: var(--teal);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}
.hero-photo{
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--sage);
}
.hero-photo img{ width: 100%; height: 100%; object-fit: cover; }
.hero-contour{
  position: absolute; right: -10%; top: -8%;
  width: 60%; opacity: 0.5; pointer-events: none;
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-photo{ order: -1; max-width: 340px; margin: 0 auto; }
}

/* ---------- video hero ---------- */
.hero-video{
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--teal-deep);
}
.hero-video video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-video::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,32,54,0.25) 0%, rgba(11,32,54,0.15) 35%, rgba(11,32,54,0.88) 100%);
}
.hero-video-content{
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  color: var(--paper);
}
.hero-video-content .hero-eyebrow{
  color: #8FE0DD;
}
.hero-video-content h1{
  color: var(--white);
  max-width: 16ch;
}
.hero-video-content .lede{
  color: #DCE9E7;
  max-width: 48ch;
}
/* keep small text legible over bright video frames */
.hero-video-content .hero-eyebrow,
.hero-video-content h1,
.hero-video-content .lede{
  text-shadow: 0 1px 14px rgba(11,32,54,0.6);
}
.hero-video-content .hero-eyebrow{ font-weight: 600; }
/* shorter hero (Sport & Exercise Medicine): darker overlay + more compact heading */
.hero-video.hero-video-short::after{
  background: linear-gradient(180deg, rgba(11,32,54,0.52) 0%, rgba(11,32,54,0.46) 40%, rgba(11,32,54,0.90) 100%);
}
.hero-video-short .hero-video-content h1{
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  max-width: 22ch;
}
@media (max-width: 700px){
  .hero-video{ min-height: 72vh; }
}
.hero-video.hero-video-short{ min-height: 56vh; }
@media (max-width: 700px){
  .hero-video.hero-video-short{ min-height: 50vh; }
}

/* ---------- cards / grids ---------- */
.grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
@media (max-width: 860px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.9rem;
}
.card h3{ margin-bottom: 0.6rem; font-size: 1.25rem; }
.card p{ margin-bottom: 0.9rem; font-size: 0.97rem; }
.card a{ font-weight: 500; font-size: 0.94rem; display: inline-block; padding: 0.55rem 0; }

.section-head{ max-width: 640px; margin-bottom: 2.5rem; }
.section-head .kicker{
  color: var(--teal); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem;
}

/* ---------- injury / condition entries (click-to-expand) ---------- */
.condition{
  border-top: 1px solid var(--line);
}
.condition:last-child{ border-bottom: 1px solid var(--line); }
.condition summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
  cursor: pointer;
  list-style: none;
}
.condition summary::-webkit-details-marker{ display: none; }
.condition summary::marker{ content: ""; }
.condition summary::after{
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.condition[open] summary::after{
  content: "+";
  transform: rotate(45deg);
}
.condition summary:hover h4{ color: var(--teal); }
.cond-head{
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.condition h4{ margin: 0; transition: color 0.15s ease; }
.condition .region{
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: none;
  min-width: 100px;
  flex-shrink: 0;
}
.condition-detail{ padding: 0 0 1.5rem; }
@media (max-width: 720px){
  .cond-head{ flex-direction: column; gap: 0.2rem; }
  .condition .region{ min-width: 0; }
}

.region-block{ margin-bottom: 2.4rem; }
.region-title{
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
  display: inline-block;
  padding-bottom: 0.15rem;
  margin-bottom: 0.4rem;
}

/* ---------- condition detail breakdown ---------- */
.condition-detail p{
  margin: 0 0 0.55rem;
  font-size: 0.96rem;
  max-width: 62ch;
}
.condition-detail p:last-child{ margin-bottom: 0; }
.d-label{
  color: var(--teal);
  font-weight: 600;
}

/* ---------- care-team callout ---------- */
.care-team-note{
  background: var(--sage);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.4rem;
}
.care-team-note h4{ margin-bottom: 0.4rem; }
.care-team-note p{
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---------- sport tags ---------- */
.sport-tags{
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 1.6rem;
}
.sport-tags span{
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- pillars ---------- */
.pillars{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px){ .pillars{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .pillars{ grid-template-columns: 1fr; gap: 1.25rem; } }
.pillar{
  border-top: 3px solid var(--teal);
  padding-top: 1rem;
}
.pillar.emphasis{ border-top-color: var(--ember); }
.pillar h4{ margin-bottom: 0.4rem; }
.pillar p{ font-size: 0.93rem; color: var(--ink-soft); }

/* ---------- quote / values ---------- */
.values-block{
  border-left: 3px solid var(--ember);
  padding-left: 1.6rem;
  margin: 2rem 0;
}

/* ---------- timeline (About) ---------- */
.story p{ max-width: 66ch; }
.story h3{ margin-top: 2.2rem; }

/* ---------- contact ---------- */
.contact-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
}
@media (max-width: 900px){ .contact-grid{ grid-template-columns: 1fr; } }
.info-item{ margin-bottom: 1.6rem; }
.info-item a:not(.btn){ display: inline-block; padding: 0.4rem 0; }
.info-item .label{
  font-weight: 600; color: var(--teal-deep); display: block; margin-bottom: 0.2rem;
  font-size: 0.92rem;
}
.form-embed{
  border: 1px dashed var(--line);
  background: var(--white);
  border-radius: 4px;
  padding: 2.2rem;
  text-align: left;
}
.placeholder-note{
  background: var(--ember-soft);
  border: 1px solid #BFE3E1;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: #2F5C5E;
  margin-top: 1rem;
}

/* ---------- footer ---------- */
.site-footer{
  background: var(--teal-deep);
  color: #C4D3D6;
  padding: 3.5rem 0 2rem;
  font-size: 0.93rem;
}
.site-footer h4{ color: var(--paper); font-size: 1rem; }
.site-footer a{ color: #7DBEB6; }
.footer-grid{
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 780px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 0.5rem; }
.footer-grid a{ display: inline-block; padding: 0.15rem 0; }
.footer-bottom{
  border-top: 1px solid #1B3550;
  padding-top: 1.4rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.85rem; color: #8CA5AE;
}

/* ---------- disclosure banner (HPCSA compliance note area on Sport page) ---------- */
.scope-note{
  background: var(--sage);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
  margin: 2rem 0;
  border: 1px solid var(--line);
}

/* ---------- small phones ---------- */
@media (max-width: 520px){
  .footer-grid li{ margin-bottom: 0.1rem; }
  .footer-grid a{ padding: 0.5rem 0; }
  .btn-row .btn{ flex: 1 1 100%; justify-content: center; }
  .form-embed{ padding: 1.4rem; }
  .card{ padding: 1.5rem; }
  .brand{ font-size: 1.1rem; }
  .brand-logo{ height: 34px; }
  .sport-tags span{ padding: 0.45rem 0.85rem; font-size: 0.88rem; }
}
