/* ============================================================
   MacNeille Hip & Knee — Design System
   Palette: OISI teal #2A84A4 · slate #16323E · tint #EAF3F7
   ============================================================ */
:root {
  --teal: #2A84A4;
  --teal-dark: #1F6580;
  --teal-deep: #16323E;
  --tint: #EAF3F7;
  --tint-2: #F5FAFC;
  --ink: #21323B;
  --muted: #5B707C;
  --line: #DCE8EE;
  --white: #FFFFFF;
  --gold: #E8B54D;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(22, 50, 62, 0.10);
  --shadow-sm: 0 4px 14px rgba(22, 50, 62, 0.08);
  --font-head: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--teal-deep); line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.22rem; font-weight: 700; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.lead { font-size: 1.13rem; color: var(--muted); max-width: 62ch; }
section { padding: 84px 0; }
.section-head { max-width: 720px; margin-bottom: 46px; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: 0.98rem; padding: 14px 28px; border-radius: 999px;
  transition: all .18s ease; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-ghost:hover { background: var(--tint); }
.btn-light { background: #fff; color: var(--teal-deep); }
.btn-light:hover { background: var(--tint); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-text { font-family: var(--font-head); line-height: 1.1; }
.brand-text .brand-name { font-weight: 800; font-size: 1.02rem; color: var(--teal-deep); display: block; }
.brand-text .brand-sub { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
nav.mainnav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
nav.mainnav a { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
nav.mainnav a:hover, nav.mainnav a.active { color: var(--teal); }
.topbar .btn { padding: 11px 22px; font-size: 0.9rem; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--tint-2) 0%, #fff 100%); padding: 72px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--teal); }
.hero .lead { margin: 20px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 0.85rem; font-weight: 600; color: var(--teal-deep);
  display: flex; align-items: center; gap: 8px;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  position: relative; background: var(--tint);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,132,164,0) 62%, rgba(22,50,62,0.42) 100%);
}
.hero-photo img { width: 100%; height: auto; }
.hero-badge {
  position: absolute; left: -18px; bottom: 26px; z-index: 2;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; gap: 12px; align-items: center; max-width: 300px;
}
.hero-badge .num { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--teal); line-height: 1; }
.hero-badge .label { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }

/* ---------- Logo bar ---------- */
.logobar { padding: 40px 0 48px; border-top: 1px solid var(--line); background: #fff; }
.logobar p {
  text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px;
}
.logo-row { display: flex; justify-content: center; align-items: center; gap: 46px; flex-wrap: wrap; }
.logo-row img { height: 44px; width: auto; filter: grayscale(1) opacity(0.62); transition: filter .2s; }
.logo-row img:hover { filter: none; }
.logo-row img.tall { height: 56px; }

/* ---------- Split section (about teaser) ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.split-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.split .checklist { margin: 22px 0 28px; list-style: none; }
.checklist li { padding-left: 34px; position: relative; margin-bottom: 12px; color: var(--ink); }
.checklist li strong { color: var(--teal-deep); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--tint);
  color: var(--teal); font-weight: 800; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .2s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-img { height: 168px; background: var(--tint-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-img img { height: 100%; width: 100%; object-fit: cover; }
.card-img img.contain { object-fit: contain; padding: 14px; }
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 8px; font-size: 1.05rem; }
.card-body p { font-size: 0.92rem; color: var(--muted); flex: 1; }
.card-link { margin-top: 14px; font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; }
.card-link::after { content: " →"; }

/* ---------- Dark technique band ---------- */
.band { background: var(--teal-deep); color: #E9F2F6; }
.band .eyebrow { color: var(--gold); }
.band h2, .band h3 { color: #fff; }
.band .lead { color: #B9CFDA; }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 30px; }
.band-item { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 28px; }
.band-item h3 { margin-bottom: 10px; font-size: 1.08rem; }
.band-item p { font-size: 0.93rem; color: #B9CFDA; }
.band-item .k { font-family: var(--font-head); font-weight: 800; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 10px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.stat { text-align: center; padding: 26px 12px; background: rgba(255,255,255,0.05); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: #fff; display: block; }
.stat .lbl { font-size: 0.85rem; color: #B9CFDA; }

/* ---------- Education list ---------- */
.edu-card .card-body h3 { font-size: 1rem; }
.tag { display: inline-block; background: var(--tint); color: var(--teal-dark); font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 6px; padding: 4px 10px; margin-bottom: 12px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--teal) 0%, var(--teal-dark) 100%); color: #fff; text-align: center; border-radius: var(--radius-lg); padding: 64px 40px; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #DCEEF5; max-width: 56ch; margin: 0 auto 28px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(180deg, var(--tint) 0%, var(--tint-2) 100%); padding: 70px 0 56px; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-top: 16px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; font-family: var(--font-head); font-weight: 600; }

/* ---------- Prose (articles) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 18px; }
.prose h2 { font-size: 1.45rem; margin: 40px 0 14px; }
.prose h3 { margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.prose em { color: var(--muted); }
.prose blockquote { border-left: 4px solid var(--teal); padding: 6px 0 6px 20px; margin: 22px 0; color: var(--muted); font-style: italic; }
.article-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 34px; font-family: var(--font-head); font-weight: 600; }
.article-hero-img { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 36px; box-shadow: var(--shadow-sm); max-height: 380px; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--teal-deep); display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #fff;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }
.form-note { font-size: 0.85rem; color: var(--muted); background: var(--tint-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 18px 0; }
.form-note strong { color: var(--teal-dark); }

/* ---------- Footer ---------- */
footer { background: var(--teal-deep); color: #A9C2CE; padding: 64px 0 30px; margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.12); }
footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
footer a { color: #A9C2CE; display: block; margin-bottom: 9px; font-size: 0.92rem; }
footer a:hover { color: #fff; }
.footer-brand img { height: 52px; margin-bottom: 14px; filter: brightness(0) invert(1) opacity(0.9); }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 24px; font-size: 0.8rem; flex-wrap: wrap; }
.footer-bottom .disclaimer { max-width: 70ch; opacity: 0.75; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .cards, .cards.three, .band-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.mainnav { display: none; }
  .nav-toggle { display: block; margin-left: auto; background: none; border: none; font-size: 1.6rem; color: var(--teal-deep); cursor: pointer; }
  .topbar .btn { display: none; }
  nav.mainnav.open {
    display: flex; position: absolute; top: 78px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .hero-badge { left: 8px; }
}
@media (max-width: 620px) {
  .cards, .cards.three, .band-grid, .form-grid, .stats { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .form-card { padding: 26px 20px; }
}

/* ---------- Video embeds ---------- */
.video-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 28px;
}
.video-grid.one { grid-template-columns: minmax(0, 560px); }
.video-item { margin: 0; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px;
  overflow: hidden; background: var(--teal-deep); box-shadow: var(--shadow);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-item figcaption { margin-top: 10px; }
.video-item figcaption strong { display: block; font-family: 'Manrope', sans-serif; font-size: 0.98rem; color: var(--teal-deep); }
.video-item figcaption span { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.video-note { font-size: 0.85rem; color: var(--muted); margin-top: 18px; max-width: 70ch; }
.prose .video-grid { grid-template-columns: 1fr 1fr; }
.video-band { background: var(--tint-2); }
@media (max-width: 960px) {
  .video-grid, .prose .video-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .video-grid, .prose .video-grid { grid-template-columns: 1fr; }
}

/* In-article figures */
.prose figure.article-fig { margin: 28px 0; text-align: center; }
.prose figure.article-fig img { max-width: min(100%, 520px); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.prose figure.article-fig figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; max-width: 56ch; margin-left: auto; margin-right: auto; line-height: 1.5; }
