/* ============================================
   BOSS Orthopaedics — Dr. Patrick Pallitto
   Design system: colors pulled directly from
   the practice logo (sunrise-over-water mark).
   ============================================ */

:root {
  /* Brand colors — sampled from logo-full.png */
  --ocean-blue: #0074C7;
  --sky-aqua: #00A7E0;
  --water-deep: #005F9A;
  --slate-navy: #27495C;
  --navy-900: #1B323F;
  --navy-950: #101F28;

  --white: #FFFFFF;
  --mist-50: #F5F9FB;
  --fog-200: #E1E8ED;
  --fog-400: #C4D1D8;
  --ink-700: #33454E;
  --ink-500: #5B6B73;

  /* Type */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid type scale */
  --fs-hero: clamp(3rem, 3rem + 5vw, 7.5rem);
  --fs-h1: clamp(2.25rem, 2rem + 2.5vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.5rem + 1.5vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-lede: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);

  --container: 1280px;
  --radius: 4px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

section { position: relative; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ocean-blue);
}
.eyebrow--on-dark { color: var(--sky-aqua); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.98;
  text-transform: uppercase;
  color: var(--slate-navy);
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--ink-500);
  max-width: 42ch;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--ocean-blue); color: var(--white); }
.btn--primary:hover { background: var(--sky-aqua); }
.btn--outline { border-color: currentColor; color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--navy-950); }
.btn--dark { border-color: var(--slate-navy); color: var(--slate-navy); }
.btn--dark:hover { background: var(--slate-navy); color: var(--white); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: inherit;
}
.arrow-link .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.arrow-link:hover .arrow { transform: translateX(6px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(16, 31, 40, 0.92);
  backdrop-filter: blur(8px);
  padding-block: 0.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand img { height: 34px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand-word small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--sky-aqua);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-links a {
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--sky-aqua);
  transition: right 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }
.nav-links a.is-active { color: var(--sky-aqua); }
.nav-cta { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px; height: 24px;
  position: relative;
  z-index: 200;
}
.nav-toggle span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 20px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: var(--navy-950);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  body.nav-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.5rem; }
  .nav-toggle { display: block; }
}

/* ---------- Hero (sunrise-over-water) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--navy-950);
  overflow: hidden;
}
.hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-svg svg { width: 100%; height: 100%; display: block; }

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--navy-950);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  opacity: 0.95;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(16,31,40,0.9) 0%, rgba(16,31,40,0.15) 40%, rgba(16,31,40,0.05) 60%),
    linear-gradient(100deg, rgba(16,31,40,0.94) 8%, rgba(16,31,40,0.55) 45%, rgba(16,31,40,0.25) 75%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem) clamp(3.5rem, 8vw, 5.5rem);
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}
.hero-badge {
  position: absolute;
  top: clamp(5.5rem, 10vw, 7rem);
  right: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  text-align: right;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  line-height: 1.6;
}
.hero h1 {
  color: var(--white);
  font-size: var(--fs-hero);
  max-width: 15ch;
}
.hero .lede {
  color: var(--fog-200);
  margin-top: 1.5rem;
  max-width: 46ch;
}
.hero-cta-row {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  align-items: center;
}

/* Page header (shorter hero used on interior pages) */
.page-header {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--navy-950);
  overflow: hidden;
}
.page-header .hero-content { padding-top: clamp(7rem, 14vw, 9rem); }
.page-header h1 { color: var(--white); font-size: clamp(2.75rem, 2.25rem + 4vw, 5.5rem); }

/* ---------- Tile grid ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: var(--white);
  isolation: isolate;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.1) contrast(1.05);
  transition: transform 0.6s var(--ease);
}
.tile:hover::before { transform: scale(1.08); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(16,31,40,0.92) 0%, rgba(16,31,40,0.45) 55%, rgba(16,31,40,0.15) 100%);
}
.tile--a::before { background-color: var(--navy-950); background-image: linear-gradient(160deg, rgba(10,20,26,0.5), rgba(10,20,26,0.7)), url('../images/procedures/hip-bilateral-xray.png'); background-position: center 30%; }
.tile--b::before { background-color: var(--navy-950); background-image: linear-gradient(160deg, rgba(10,20,26,0.5), rgba(10,20,26,0.7)), url('../images/procedures/knee-xray-prosthesis.jpg'); background-position: center 32%; }
.tile--c::before { background: linear-gradient(160deg, var(--sky-aqua), var(--slate-navy)); }
.tile-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky-aqua);
  margin-bottom: 0.75rem;
}
.tile h3 {
  color: var(--white);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  max-width: 12ch;
}
.tile .arrow-link { margin-top: 1.25rem; font-size: 0.95rem; }

@media (max-width: 900px) {
  .tile-grid { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 10; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--light { background: var(--white); }
.section--mist { background: var(--mist-50); }
.section--dark { background: var(--navy-950); color: var(--fog-200); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 { margin-top: 0.75rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- About / bio ---------- */
.bio-photo {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-950);
}

.xray-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-950);
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xray-card img { width: 100%; height: 100%; object-fit: cover; }
.xray-caption {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--ink-500);
  font-style: italic;
}
.credential-list { margin-top: 1.5rem; }
.credential-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--fog-200);
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  font-size: 0.95rem;
}
.credential-list .label {
  font-weight: 700;
  color: var(--slate-navy);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding-top: 0.15rem;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  background: var(--mist-50);
  color: var(--slate-navy);
  border: 1px solid var(--fog-200);
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  padding: 2rem;
}
.card h3 { font-size: 1.35rem; }

.location-card { display: flex; flex-direction: column; gap: 1rem; }
.location-card .loc-name { color: var(--ocean-blue); }
.location-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.75rem; font-size: 0.95rem; margin: 0; }
.location-card dt { font-weight: 700; color: var(--ink-500); }
.location-card dd { margin: 0; }
.location-card .btn { align-self: flex-start; margin-top: 0.5rem; }

.procedure-card { border-top: 3px solid var(--ocean-blue); }
.procedure-card .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--fog-400);
  line-height: 1;
}

.testimonial-card {
  background: var(--mist-50);
  border-radius: var(--radius);
  padding: 2.5rem;
  border-left: 4px solid var(--ocean-blue);
}
.testimonial-card p.quote {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--slate-navy);
}
.testimonial-card .attribution {
  margin-top: 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.testimonial-placeholder {
  border: 1.5px dashed var(--fog-400);
  border-radius: var(--radius);
  padding: 2.5rem;
  color: var(--ink-500);
  font-size: 0.95rem;
}

/* ---------- Stats ---------- */
.stat { text-align: left; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 2vw, 4rem);
  color: var(--ocean-blue);
  line-height: 1;
}
.section--dark .stat .num { color: var(--sky-aqua); }
.stat .label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section--dark .stat .label { color: var(--fog-200); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--water-deep), var(--ocean-blue));
  color: var(--white);
  padding: clamp(3rem, 7vw, 5rem);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-band h2 { color: var(--white); font-size: var(--fs-h2); max-width: 16ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--fog-200);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  font-family: var(--font-body);
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-grid ul li { margin-bottom: 0.6rem; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--sky-aqua); }
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; color: var(--fog-400); max-width: 32ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--fog-400);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Accordion (discharge instructions) ---------- */
.accordion { border-top: 1px solid var(--fog-200); }
.accordion-item { border-bottom: 1px solid var(--fog-200); }
.accordion-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--slate-navy);
  font-size: 1.05rem;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ocean-blue);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-body {
  padding: 0 0.25rem 1.5rem;
  color: var(--ink-700);
  line-height: 1.65;
}
.accordion-body h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ocean-blue);
  margin: 1.25rem 0 0.5rem;
}
.accordion-body h4:first-child { margin-top: 0; }
.accordion-body ul { margin: 0; padding-left: 1.25rem; list-style: disc; }
.accordion-body li { margin-bottom: 0.6rem; }
.accordion-body li:last-child { margin-bottom: 0; }
.accordion-body p { margin-bottom: 0.75rem; }

.callout {
  border-radius: var(--radius);
  border-left: 4px solid var(--ocean-blue);
  background: var(--mist-50);
  padding: 1.75rem 2rem;
}
.callout--warn { border-left-color: #B4483A; background: #FBF2F0; }
.callout h3 { color: var(--slate-navy); font-size: 1.35rem; }
.callout ul { margin: 1rem 0 0; padding-left: 1.25rem; }
.callout li { margin-bottom: 0.5rem; line-height: 1.5; }

.timeline-step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
  position: relative;
}
.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.65rem;
  top: 3.2rem;
  bottom: 0;
  width: 1px;
  background: var(--fog-200);
}
.timeline-step .step-num {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--slate-navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  flex-shrink: 0;
}
.timeline-step h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.timeline-step p { color: var(--ink-500); line-height: 1.6; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.85rem; font-weight: 700; color: var(--slate-navy); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--fog-400);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-700);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--ocean-blue);
}

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Divider motif ---------- */
.wave-divider { display: block; width: 100%; height: auto; }
