html,
body {
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

@font-face {
  font-family: "batoshi";
  src: url("../new-fonts/batoshi/batoshi.ttf") format("opentype");
}

@font-face {
  font-family: "loyal";
  src: url("../new-fonts/eighties/Eighties-Comeback/OTF/EightiesComeback - Semi Bold Semi Condensed.otf")
    format("opentype");
}

@font-face {
  font-family: "loyal-black";
  src: url("../new-fonts/eighties/Eighties-Comeback/OTF/EightiesComeback - Black.otf")
    format("opentype");
}

:root {
  --content-width: 1280px;
  --content-padding: clamp(16px, 5vw, 80px);
}

.smile {
  font-family: "batoshi", sans-serif;
  color: #ff50b3;
}

.stagger {
  opacity: 0;
  transform: translateX(160px); /* still from behind image */
}

.stagger.reveal {
  animation: emergeFromBehind 5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes emergeFromBehind {
  from {
    opacity: 0;
    transform: translateX(160px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== HERO SECTION ========== */
.hero-container {
  position: relative;
  padding-top: clamp(72px, 10vw, 96px);
  min-height: 85vh; /* makes sure it fills screen height */
  background: #ffbee3; /* extend pink color everywhere */
  /* overflow: hidden; */ /* Removed to allow sticky positioning */
}

/* ✅ Curved background behind content */
.hero-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff2f9; /* white curve */
  clip-path: ellipse(120% 60% at 60% 15%);
  z-index: 0;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);

  max-width: 1280px;
  margin: 0 auto;

  padding: clamp(40px, 6vw, 80px) clamp(16px, 5vw, 80px) 0;
  z-index: 1;
}

.content-left {
  flex: 0.9;
  text-align: left;
  position: relative;
  z-index: 1;
}

.content-right {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.hero-title {
  font-size: clamp(36px, 6vw, 78px);
  font-weight: bold;
  color: #323232;
  margin: 0 0 20px;
  line-height: 1.2;
  font-family: "loyal";
}

.hero-description {
  font-size: 20px;
  color: #323232;
  margin-bottom: 30px;
  line-height: 1.6;
  font-family: "loyal-black", sans-serif;
}

.hero-btn-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
  position: relative;
}

.image-container {
  position: relative;
  background: transparent;
}

.hero-image {
  width: 100%;
  max-width: none;
  height: auto;
  transform: scale(1.08) translateY(20px);
  margin-top: -65px;
  margin-left: 40px;
}

@media (max-width: 900px) {
  .hero-image {
    width: 100%;
    transform: none;
    margin-top: -40px;
  }
}

.schedule-btn {
  background-color: #fc5bb6;
  color: #323232;
  border: none;

  padding: 16px 32px;
  border-radius: 30px;

  font-size: 18px;
  font-weight: 600;
  font-family: "loyal", sans-serif;

  cursor: pointer;
  transition: background 0.3s ease;
  margin: 0;
}

.schedule-btn:hover {
  background-color: #fba1b7;
  color: white;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-top: 12px;
  padding-bottom: 12px;
  background: #fff2f9;
  border-bottom: 2px solid #ffd1da;

  z-index: 100;
  transition: padding 0.3s ease;
  overflow-x: hidden;
}

.header-inner {
  width: 100%;
  margin: 0;
  padding-left: 24px;
  padding-right: clamp(16px, 3vw, 32px);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  flex: 0 0 auto; /* do NOT let it stretch or move */
}

.logo h2 {
  font-size: clamp(24px, 3vw, 40px);
  margin: 0;
  font-family: "loyal", sans-serif;
  color: #ff0592;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 22px);
  min-width: 0;
  flex-shrink: 1;
}

.nav-item {
  color: #fe83c6;
  font-weight: 600;
  font-size: clamp(16px, 1.2vw, 20px);
  text-decoration: none;
  font-family: "loyal-black", sans-serif;
}

.nav-item:hover {
  color: #323232;
}

.appointment-btn-header {
  background: #fe83c6;
  color: #fff;
  border: none;

  padding: 10px 22px;
  border-radius: 25px;

  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 600;
  font-family: "loyal", sans-serif;

  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap; /* prevent wrapping */
  flex-shrink: 0; /* don’t let it collapse */
  max-width: 100%;
  flex: 0 0 auto;
}

.appointment-btn-header:hover {
  background: #323232;
  color: #fff2f9;
}

.header.sticky {
  padding-top: 8px;
  padding-bottom: 8px;
}

.header.sticky .logo h2 {
  font-size: clamp(22px, 2.5vw, 32px);
}

.header.sticky .appointment-btn-header {
  font-size: clamp(14px, 1.2vw, 18px);
  padding: 6px 16px;
}

/* ================= MOBILE NAV ================= */

.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: #ff0592;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    flex-direction: column;
    gap: 16px;

    background: #fff2f9;
    border-bottom: 2px solid #ffd1da;

    padding: 16px;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  /* Keep header items tight on mobile */
  .header-inner {
    gap: 140px;
  }

  .appointment-btn-header {
    font-size: 14px;
    padding: 8px 14px;
    visibility: hidden; /* hide the button, but keep its space to prevent layout shift */
  }
}

/* ================= MOBILE HERO ================= */
@media (max-width: 768px) {
  .hero-container {
    overflow: hidden; /* ← clips the ellipse bleed */
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px 0;
    gap: 24px;
  }

  .content-left,
  .content-right {
    width: 100%;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-description {
    font-size: 16px; /* or 15px */
    line-height: 1.6;
  }

  .hero-image {
    justify-content: center;
    width: 100%;
    margin-top: -35px;
    margin-left: 0;
    height: 120%;
  }

  .image-container {
    overflow: visible;
    margin-top: 18px;
  }

  .hero-btn-container {
    justify-content: left;
  }

  .schedule-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    align-items: center;
    margin-left: 60px;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ========== MOBILE MENU DIALOG ========== */

.menu-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

  z-index: 999;
}

.menu-dialog.active {
  opacity: 1;
  pointer-events: auto;
}

.menu-dialog-content {
  background: #fff2f9;
  width: 90%;
  max-width: 360px;

  padding: 24px;
  border-radius: 16px;

  display: flex;
  flex-direction: column;
  gap: 20px;

  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.menu-dialog.active .menu-dialog-content {
  transform: scale(1);
}

.menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #ff0592;
}

.menu-dialog-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.menu-dialog-nav .nav-item {
  font-size: 18px;
  color: #ff0592;
  text-decoration: none;
  font-family: "loyal-black", sans-serif;
}

.menu-dialog-nav .nav-item:hover {
  color: #323232;
}

.dialog-cta {
  margin-top: 12px;
  padding: 12px;
  border-radius: 24px;
  background: #ff0592;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-family: "loyal", sans-serif;
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-container {
    min-height: auto;
    padding-bottom: 24px; /* small, intentional breathing space */
  }
}

/* ================= MOBILE LANDSCAPE FIX ================= */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
  .hero-container {
    min-height: auto;
    padding-top: 20px !important; /* smaller header offset */
    overflow: hidden;
  }

  .hero-content {
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
  }

  .content-left {
    flex: 1.2;
  }

  .content-right {
    flex: 0.8;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.15;
  }

  .hero-description {
    font-size: 14px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .hero-btn-container {
    margin-top: 0; /* 🔥 tighten spacing */
    position: static; /* 🔥 remove sticky in landscape */
  }

  .hero-image {
    width: 100%;
    margin-top: 40px;
    margin-left: -20px;
    transform: scale(1.08) translateY(-10px);
  }

  .schedule-btn {
    padding: 10px 18px;
    font-size: 14px;
    margin-top: 0;
  }
}

/* ================= TABLET HERO FIX ================= */
@media (min-width: 769px) and (max-width: 1025px) {
  .hero-container {
    min-height: auto;
    padding-top: 96px;
  }

  .hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 48px 0;
    gap: 48px;
    align-items: center;
  }

  .content-left {
    flex: 1.1;
  }

  .content-right {
    flex: 0.9;
  }

  .hero-title {
    font-size: 42px;
    line-height: 1.15;
  }

  .hero-description {
    font-size: 15px;
    max-width: 420px;
  }

  .hero-btn-container {
    margin-top: 20px;
  }

  /* Reduce curve dominance on tablet */
  .hero-container::before {
    width: 140%;
    left: -20%;
    clip-path: ellipse(140% 60% at 50% 15%);
  }
}

/* ================= TABLET PORTRAIT (iPad) ================= */
@media (min-width: 768px) and (max-width: 1025px) and (orientation: portrait) {
  .hero-container {
    overflow: hidden;
    min-height: 30vh; /* ← more height, fills the pink gap */
    padding-top: 80px;
  }

  .hero-container::before {
    clip-path: ellipse(100% 75% at 50% 15%); /* ← taller white curve */
  }

  .hero-content {
    flex-direction: row;
    align-items: flex-end; /* ← anchor both sides to bottom */
    padding: 48px 40px 0;
    gap: 32px;
  }

  .content-left {
    flex: 1.1;
    min-width: 0;
    padding-bottom: 40px; /* ← lift text up from bottom edge */
  }

  .hero-title {
    font-size: 52px; /* ← bigger, uses the available space */
    line-height: 1.15;
    margin-top: 0;
  }

  .hero-description {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .hero-btn-container {
    margin-top: 16px;
    position: static;
  }

  .content-right {
    flex: 1;
    overflow: visible; /* ← remove hidden, that's what's clipping it */
    align-self: flex-end;
  }

  .hero-image {
    width: 125%; /* ← back to a sane value, 500% was way too large */
    max-width: none; /* ← remove the 140% cap that was fighting width */
    height: auto; /* ← let aspect ratio breathe naturally */
    margin-top: 0;
    margin-left: -10px;
    transform: translateY(0);
    object-fit: contain; /* ← ensures full image is always visible */
  }
}

/* ===== MOBILE CURVE FIX (FINAL) ===== */
@media (max-width: 768px) {
  .hero-container::before {
    inset: -20% -30% auto -30%;
    height: 70%;
    width: auto;

    clip-path: ellipse(140% 65% at 50% 35%);
    transform: none;
  }
}

/* ============================= */
/* TABLET — LANDSCAPE ONLY */
/* ============================= */
@media (min-width: 1000px) and (max-width: 1400px) and (orientation: landscape) {
  .hero-container {
    min-height: 60vh;
  }

  .hero-content {
    padding: clamp(40px, 5vw, 60px) clamp(24px, 5vw, 60px) 0;
    gap: 32px;
  }

  .content-left {
    flex: 1;
  }

  .content-right {
    flex: 1.2;
  }

  /* ✅ Image scaling — controlled */
  .hero-image {
    width: 100%;
    max-width: none;
    margin-top: 50px;
    transform: translateY(5px);
    margin-left: 20px;
  }

  .hero-title {
    font-size: clamp(42px, 5vw, 60px);
  }

  .hero-description {
    font-size: 18px;
  }
}
