/* ==========================================================
   Promise Dental Clinic — Design System & Theme Styles
   Palette: Warm Ivory Ground, Trust Midnight Navy, Medical Teal & WhatsApp Green
   Powered by PromiseMee — We Build What Matters.
   ========================================================== */

:root {
  --ivory: #F8F6F1;
  --ivory-deep: #EFEAE1;
  --paper: #FFFFFF;
  --navy: #0B192C;
  --navy-soft: #1B2F48;
  --navy-mute: #55687E;
  --teal: #0E7C86;
  --teal-dark: #0A5C64;
  --teal-bright: #17A2AE;
  --teal-wash: #E7F3F4;
  --teal-glow: rgba(14, 124, 134, 0.15);
  --wa-green: #25D366;
  --wa-dark: #128C7E;
  --wa-wash: #E9F8EE;
  --gold-star: #F59E0B;
  --line: #DFD8CD;
  --line-soft: #ECE5DB;
  --chrome: linear-gradient(145deg, #F4F2EE 0%, #D8D3C9 38%, #FBFAF8 52%, #CFC9BE 70%, #EDEAE4 100%);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 2px 4px rgba(11, 25, 44, .04), 0 4px 12px rgba(11, 25, 44, .03);
  --shadow-md: 0 4px 10px rgba(11, 25, 44, .05), 0 14px 34px rgba(11, 25, 44, .08);
  --shadow-lg: 0 10px 24px rgba(11, 25, 44, .07), 0 32px 72px rgba(11, 25, 44, .12);
  --shadow-glow: 0 8px 24px rgba(14, 124, 134, .22);
  --shadow-wa: 0 8px 24px rgba(37, 211, 102, .28);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 350;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100vw;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    /* Space for mobile sticky action bar */
  }
}

::selection {
  background: var(--teal);
  color: #fff;
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
  letter-spacing: -0.022em;
  line-height: 1.05;
  color: var(--navy);
}

.eyebrow {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--navy-mute);
  font-weight: 350;
}

.num-display {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

/* ---------- Rules & Surfaces ---------- */
.hairline {
  height: 1px;
  background: var(--line);
  border: 0;
}

.surface {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
}

.surface-elevated {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

.chrome-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, #C9C3B7 18%, #FFFFFF 50%, #C9C3B7 82%, transparent);
}

/* ---------- Buttons & CTAs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all .35s var(--ease);
  will-change: transform;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: #fff !important;
  border: 1px solid var(--navy);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-teal {
  background: var(--teal);
  color: #fff !important;
  border: 1px solid var(--teal);
  box-shadow: var(--shadow-glow);
}

.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy) !important;
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--navy);
  background: rgba(11, 25, 44, .04);
  transform: translateY(-2px);
}

.btn-onDark {
  background: var(--paper);
  color: var(--navy) !important;
  border: 1px solid var(--paper);
}

.btn-onDark:hover {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
  color: #fff !important;
  transform: translateY(-2px);
}

.btn-outlineDark {
  background: transparent;
  color: var(--paper) !important;
  border: 1px solid rgba(248, 246, 241, .32);
}

.btn-outlineDark:hover {
  border-color: var(--paper);
  background: rgba(248, 246, 241, .08);
  transform: translateY(-2px);
}

/* WhatsApp CTA Buttons */
.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF !important;
  border: 1px solid #20BA5A;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .28);
  font-weight: 600;
}

.btn-whatsapp:hover {
  background: #1EBE5D;
  border-color: #1AA852;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .38);
  transform: translateY(-2px);
}

.btn-whatsapp-outline {
  background: var(--wa-wash);
  color: var(--wa-dark) !important;
  border: 1px solid rgba(37, 211, 102, .35);
  font-weight: 600;
}

.btn-whatsapp-outline:hover {
  background: #25D366;
  color: #FFFFFF !important;
  border-color: #25D366;
  box-shadow: var(--shadow-wa);
  transform: translateY(-2px);
}

/* Magnetic Wrapper */
.magnetic {
  display: inline-block;
  transition: transform .5s var(--ease);
}

/* ---------- Floating WhatsApp Button ---------- */
.floating-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #FFFFFF !important;
  padding: 12px 18px 12px 14px;
  border-radius: 9999px;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.38), 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.35s var(--ease);
  cursor: pointer;
}

.floating-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.48), 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #FFFFFF !important;
}

.floating-whatsapp .status-dot {
  width: 9px;
  height: 9px;
  background: #FFFFFF;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.floating-whatsapp .status-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.7);
    opacity: 0;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    padding: 9px 14px;
    font-size: 0.76rem;
    touch-action: manipulation;
  }
}

/* ---------- Mobile Sticky Bottom Bar ---------- */
.mobile-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 49;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 -4px 20px rgba(11, 25, 44, 0.08);
  padding: 8px 14px;
}

@media (max-width: 768px) {
  .mobile-action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 6px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-action-bar .m-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    min-height: 46px;
    white-space: nowrap;
    touch-action: manipulation;
  }

  .mobile-action-bar .m-btn-call {
    background: var(--ivory);
    color: var(--navy);
    border: 1px solid var(--line-soft);
  }

  .mobile-action-bar .m-btn-wa {
    background: var(--wa-wash);
    color: var(--wa-dark);
    border: 1px solid rgba(37, 211, 102, 0.3);
  }

  .mobile-action-bar .m-btn-book {
    background: var(--navy);
    color: #FFFFFF;
    border: 1px solid var(--navy);
  }
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal[data-d="1"].is-in {
  transition-delay: .08s;
}

.reveal[data-d="2"].is-in {
  transition-delay: .16s;
}

.reveal[data-d="3"].is-in {
  transition-delay: .24s;
}

.reveal[data-d="4"].is-in {
  transition-delay: .32s;
}

.reveal[data-d="5"].is-in {
  transition-delay: .40s;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background .45s var(--ease), border-color .45s var(--ease),
    box-shadow .45s var(--ease), backdrop-filter .45s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(248, 246, 241, .92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 4px 20px rgba(11, 25, 44, .04);
}

.wordmark {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.15;
  color: var(--navy);
  text-decoration: none;
}

.wordmark span.sub {
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--teal);
  font-weight: 600;
  display: block;
}

@media (max-width: 380px) {
  .wordmark {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
  }
  .wordmark span.sub {
    font-size: 0.55rem;
    letter-spacing: 0.16em;
  }
}

.navlink {
  position: relative;
  font-size: .84rem;
  font-weight: 450;
  color: var(--navy-soft);
  text-decoration: none;
  transition: color .3s var(--ease);
  padding: 4px 0;
}

.navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
  border-radius: 1px;
}

.navlink:hover,
.navlink.is-active {
  color: var(--teal-dark);
}

.navlink:hover::after,
.navlink.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile menu */
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--ivory);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease);
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.mobile-panel.is-open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

.mobile-panel a.m-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  text-decoration: none;
  color: var(--navy);
}

.mobile-panel.is-open a.m-item {
  opacity: 1;
  transform: none;
}

.mobile-panel.is-open a.m-item:nth-child(1) {
  transition-delay: .12s;
}

.mobile-panel.is-open a.m-item:nth-child(2) {
  transition-delay: .18s;
}

.mobile-panel.is-open a.m-item:nth-child(3) {
  transition-delay: .24s;
}

.mobile-panel.is-open a.m-item:nth-child(4) {
  transition-delay: .30s;
}

.mobile-panel.is-open a.m-item:nth-child(5) {
  transition-delay: .36s;
}

.burger span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Hero Animation Stage ---------- */
.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(14, 124, 134, .14);
}

.hero-ring.dashed {
  border-style: dashed;
  border-color: rgba(14, 124, 134, .20);
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  animation: slow-spin 64s linear infinite;
}

.spin-slower {
  animation: slow-spin 110s linear infinite reverse;
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-13px);
  }
}

.floaty {
  animation: float-y 7.5s ease-in-out infinite;
}

.contour-lines {
  background-image: repeating-linear-gradient(90deg, rgba(11, 25, 44, .04) 0 1px, transparent 1px 68px);
}

/* ---------- Trust Indicator Strip ---------- */
.trust-strip-item {
  transition: background 0.3s var(--ease);
}

.trust-strip-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- Badges & Tags ---------- */
.badge-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--teal-wash);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(14, 124, 134, 0.2);
}

.badge-wa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--wa-wash);
  color: var(--wa-dark);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

/* ---------- Team & Doctor Cards ---------- */
.team-card,
.doctor-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-card:hover,
.doctor-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  transform: translateY(-5px);
}

.team-card-img-wrap,
.doctor-img-wrap {
  position: relative;
  overflow: hidden;
  height: 350px;
  background: var(--ivory-deep);
}

@media (max-width: 640px) {
  .team-card-img-wrap,
  .doctor-img-wrap {
    height: 270px;
  }
}

.team-card-img,
.doctor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .65s var(--ease);
}

.team-card:hover .team-card-img,
.doctor-card:hover .doctor-img {
  transform: scale(1.04);
}

.team-card-badge,
.doctor-card-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .35rem .75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(11, 25, 44, .85);
  color: #fff;
  backdrop-filter: blur(8px);
  border-radius: 4px;
}

.team-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  margin-top: .9rem;
}

.team-card-tags span {
  font-size: .66rem;
  letter-spacing: .06em;
  padding: .25rem .6rem;
  background: var(--teal-wash);
  color: var(--teal-dark);
  font-weight: 500;
  border-radius: 4px;
}

/* ---------- Treatment Detail Cards ---------- */
.treat-detail-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
  scroll-margin-top: 105px;
}

@media (max-width: 768px) {
  .treat-detail-card {
    scroll-margin-top: 86px;
  }
}

.treat-detail-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line);
  transform: translateY(-4px);
}

.treat-detail-img-wrap {
  position: relative;
  overflow: hidden;
  height: 300px;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, var(--ivory-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line-soft);
}

@media (max-width: 640px) {
  .treat-detail-img-wrap {
    height: 200px;
    padding: 0.85rem;
  }
}

.treat-detail-img {
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 175px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(11, 25, 44, .09));
  transition: transform .65s var(--ease);
}

@media (max-width: 640px) {
  .treat-detail-img {
    max-height: 140px;
  }
}

.treat-detail-card:hover .treat-detail-img {
  transform: scale(1.06);
}

.treat-detail-num {
  position: absolute;
  top: .75rem;
  left: .75rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: rgba(11, 25, 44, .85);
  color: #fff;
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 4px;
}

/* ---------- Interactive Treatments Showcase ---------- */
.ts {
  position: relative;
  height: 500vh;
}

.ts-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 80px);
  gap: 60px;
  background: var(--ivory);
}

.ts-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(14, 124, 134, .08);
  z-index: 20;
}

.ts-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  transition: width .05s linear;
}

.ts-left {
  position: relative;
  z-index: 10;
  max-width: 500px;
}

.ts-heading {
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.15;
  margin-bottom: 16px;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.ts-heading.is-morph {
  opacity: 0;
  transform: translateY(8px);
}

.ts-desc {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--navy-mute);
  margin-bottom: 28px;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.ts-desc.is-morph {
  opacity: 0;
  transform: translateY(8px);
}

.ts-counter {
  font-family: var(--font-display);
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.ts-counter-now {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  transition: transform .25s var(--ease);
}

.ts-counter-now.is-bump {
  transform: translateY(-4px);
}

.ts-counter-sep {
  font-size: 1.2rem;
  color: var(--line);
}

.ts-counter-total {
  font-size: 1rem;
  color: var(--navy-mute);
  font-weight: 400;
}

.ts-right {
  position: relative;
  display: grid;
  place-items: center;
}

.ts-stack {
  position: relative;
  width: min(480px, 40vw);
  height: min(360px, 30vw);
}

.ts-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 20px 40px rgba(11, 25, 44, .12));
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

.ts-img.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 900px) {
  .ts {
    height: 400vh;
  }

  .ts-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(74px + 10px) 18px calc(70px + env(safe-area-inset-bottom, 0px) + 12px);
    gap: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .ts-left {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ts-label {
    justify-content: center;
    margin-bottom: 2px;
  }

  .ts-heading {
    font-size: clamp(1.35rem, 5.5vw, 1.9rem);
    line-height: 1.15;
    margin-bottom: 6px;
  }

  .ts-desc {
    font-size: clamp(0.8rem, 3.2vw, 0.9rem);
    line-height: 1.5;
    margin-bottom: 12px;
    max-width: 420px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ts-counter {
    justify-content: center;
    margin-bottom: 10px;
    gap: 3px;
  }

  .ts-counter-now {
    font-size: 2.3rem;
  }

  .ts-right {
    order: -1;
    margin-bottom: 2px;
  }

  .ts-stack {
    width: min(220px, 60vw);
    height: min(140px, 18vh);
  }

  .ts-left .flex {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .ts-cta {
    margin: 0;
    padding: 0.65rem 1rem !important;
    font-size: 0.8rem !important;
  }
}

/* ---------- Reason Cards 3D Effect ---------- */
.reason-card {
  background: var(--paper);
  opacity: 0;
  transform: perspective(900px) rotateY(3deg) rotateX(4deg) translateZ(-16px);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1), opacity .6s cubic-bezier(.22, .61, .36, 1),
    box-shadow .4s var(--ease), border-color .4s var(--ease);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.reason-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  transform: translateY(-4px) !important;
}

.reason-card.is-revealed {
  opacity: 1;
  transform: perspective(900px) rotateY(0) rotateX(0) translateZ(0);
}

/* ---------- Before / After Slider ---------- */
.ba-wrap {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  max-width: 1020px;
  max-height: 460px;
  margin: 0 auto;
  aspect-ratio: 16/10;
}

.ba-wrap img,
.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ba-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
  will-change: clip-path;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  left: 50%;
  background: #FFFFFF;
  transform: translateX(-1.5px);
  box-shadow: 0 0 0 1px rgba(11, 25, 44, .12), 0 0 24px rgba(11, 25, 44, .24);
  will-change: left;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--teal);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}

.ba-tag {
  position: absolute;
  top: 1.2rem;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: .45rem .85rem;
  background: rgba(11, 25, 44, .85);
  color: #fff;
  backdrop-filter: blur(8px);
  border-radius: 4px;
}

@media (max-width: 640px) {
  .ba-wrap {
    max-height: 300px;
    border-radius: var(--radius-sm);
  }

  .ba-tag {
    top: 0.5rem;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.5rem;
  }

  .ba-knob {
    width: 36px;
    height: 36px;
  }
}

/* ---------- Review Cards ---------- */
.review-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--teal-wash);
  color: var(--teal-dark);
  flex-shrink: 0;
}

/* ---------- Patient Journey Steps ---------- */
.journey-step {
  border-top: 1px solid var(--line-soft);
  transition: background .4s var(--ease);
}

.journey-step:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.journey-step:hover {
  background: var(--paper);
}

.journey-bar {
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}

.journey-step.is-in .journey-bar {
  transform: scaleX(1);
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  transition: border-color 0.3s var(--ease);
}

.faq-item:hover,
.faq-item.is-open {
  border-color: var(--teal);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  gap: 16px;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ivory);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  background: var(--teal-wash);
  color: var(--teal);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  padding: 0 1.5rem;
  color: var(--navy-mute);
  font-size: 0.94rem;
  line-height: 1.7;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* ---------- Modal Dialog ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.35s var(--ease);
  border: 1px solid var(--line-soft);
}

@media (max-width: 640px) {
  .modal-card {
    max-height: 86dvh;
    border-radius: var(--radius-md);
  }
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
}

/* ---------- Form Controls ---------- */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font-body);
  transition: all 0.25s var(--ease);
}

@media (max-width: 768px) {
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents iOS Safari auto-zoom on input focus */
    padding: 0.75rem 0.85rem;
  }
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.15);
}

/* ---------- Accessibility & Motion Safety ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: .8rem 1.2rem;
  font-size: .85rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .spin-slow,
  .spin-slower,
  .floaty {
    animation: none !important;
  }

  .ts-heading,
  .ts-desc {
    opacity: 1 !important;
    transform: none !important;
  }
}