/* ===================================================
   VARIABLES & RESET
   =================================================== */
:root {
  --clr-bg:       #F8F6F3;
  --clr-bg-alt:   #FFFFFF;
  --clr-navy:     #1B2A4A;
  --clr-navy-lt:  #2E4270;
  --clr-gold:     #B8975A;
  --clr-gold-lt:  #D4B07C;
  --clr-text:     #2C2C2C;
  --clr-muted:    #6B6B6B;
  --clr-border:   #E5E1DB;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --r-card:  12px;
  --r-pill:  100px;

  --gap-xs:  0.5rem;
  --gap-sm:  1rem;
  --gap-md:  1.75rem;
  --gap-lg:  3rem;
  --gap-xl:  5rem;

  --max-content: 680px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px; /* nav height */
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ===================================================
   HERO
   =================================================== */
.hero {
  background: var(--clr-navy);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, #2E4270 0%, transparent 70%),
    linear-gradient(170deg, #1B2A4A 0%, #0F1A30 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  border: 1px solid rgba(184, 151, 90, 0.4);
  padding: 0.35em 1.1em;
  border-radius: var(--r-pill);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: #F5F2ED;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
}

/* ===================================================
   SECTION NAV
   =================================================== */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--clr-border);
  padding: 0.6rem 0;
}

.nav-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--clr-navy);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-pill);
  padding: 0.35em 0.9em;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: var(--clr-navy);
  color: #fff;
  border-color: var(--clr-navy);
  outline: none;
}

/* ===================================================
   SECTIONS
   =================================================== */
.section {
  background: var(--clr-bg-alt);
  padding: var(--gap-lg) 1.25rem;
}

.section-alt {
  background: var(--clr-bg);
}

.section-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 400;
  color: var(--clr-navy);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--clr-border);
}

.section-intro {
  font-size: 0.88rem;
  color: var(--clr-muted);
  line-height: 1.7;
  margin-bottom: var(--gap-md);
}

/* ===================================================
   CASES GRID
   =================================================== */
.cases {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.case {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(27,42,74,0.05);
}

.section-alt .case {
  background: var(--clr-bg-alt);
}

.case-text {
  padding: 1rem 1.25rem 1.25rem;
}

.case-text h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-navy);
  margin-bottom: 0.4rem;
}

.case-text p {
  font-size: 0.83rem;
  color: var(--clr-muted);
  line-height: 1.65;
}

/* ===================================================
   BEFORE / AFTER IMAGES
   =================================================== */
.ba-wrap {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
}

.ba-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.ba-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Horizontal composites: labels at bottom corners */
.ba-horizontal .ba-labels {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
}

/* Vertical composites: labels at top-right and bottom-right */
.ba-vertical .ba-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
}

/* Single image: just bottom */
.ba-single .ba-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.6rem 0.75rem;
  gap: 0;
}

.ba-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.ba-before {
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.ba-after {
  background: rgba(27, 42, 74, 0.80);
  color: #fff;
}

.ba-placeholder {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(27,42,74,0.88) 0%, rgba(27,42,74,0.2) 100%);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 1.25rem 1rem 1rem;
  pointer-events: none;
}

/* ===================================================
   VIDEO SECTION
   =================================================== */
.video-wrap {
  border-radius: var(--r-card);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 12px rgba(27,42,74,0.08);
  margin-bottom: 0.75rem;
}

.video-wrap video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.video-note {
  font-size: 0.75rem;
  color: var(--clr-muted);
  text-align: center;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--clr-navy);
  color: rgba(255,255,255,0.7);
  padding: var(--gap-md) 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.footer-clinic {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.footer-disclaimer {
  font-size: 0.72rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
}

/* ===================================================
   MULTI-PHOTO CASE LAYOUTS
   =================================================== */
.case-photos {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.case-photos-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

/* ===================================================
   TABLET / DESKTOP ENHANCEMENTS
   =================================================== */
@media (min-width: 640px) {
  .hero {
    padding: 6rem 2rem 5rem;
  }

  .section {
    padding: var(--gap-xl) 2rem;
  }

  .case-text {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .cases-single {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (min-width: 900px) {
  /* Two-column grid for sections with multiple cases */
  .cases:not(.cases-single) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
  }

  /* Video centred at reasonable size */
  .video-wrap {
    max-width: 380px;
    margin: 0 auto 0.75rem;
  }
}
