/* ============================================================
   GLOBAL OVERFLOW PROTECTION — FIXED
   ============================================================ */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}

/* ⚠️ PENTING: `header` DIKELUARKAN dari rule ini
   karena overflow-x: clip mematikan position: fixed */
section, footer, main {
  max-width: 100vw;
  overflow-x: clip;
}

/* Header TIDAK di-clip — biar position: fixed bekerja */
.site-header {
  overflow: visible !important;
}

/* Fixed elements — force GPU layer */
.float-wa,
.nav-toggle {
  transform: translateZ(0);
}

/* Container: safe area padding */
.container {
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Safe area untuk iPhone notch */
.float-wa {
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
}

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --pink: #FF5E95;
  --yellow: #FFC233;
  --sky: #53C7F5;
  --navy: #0B2D6B;
  --ink: #0F172A;
  --muted: #64748B;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --line: #E2E8F0;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
  --shadow: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 48px rgba(15,23,42,.12);
  --container: 1200px;
  --gutter: 20px;
  --ease: cubic-bezier(.4,0,.2,1);
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  padding-top: 64px; /* Kompensasi tinggi header — mobile */
}

@media (min-width: 992px) {
  body { padding-top: 72px; } /* Header lebih tinggi di desktop */
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { padding: 0; margin: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(1.75rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   SKIP LINK (A11y)
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--navy);
  color: #fff;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   HEADER — FIXED ANTI-GAGAL
   ============================================================ */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999 !important;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  overflow: visible !important;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-logo {
  border-radius: 12px;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand-text { color: var(--navy); }
.brand-text strong { color: var(--pink); }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  margin: 0 auto;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.nav-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: #fff;
  flex-direction: column;
  padding: 20px;
  gap: 4px;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.nav-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--navy);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible {
  background: var(--bg);
  color: var(--pink);
}

.nav-cta { margin-top: 8px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 60px;
  background: linear-gradient(180deg, #FFF5F9 0%, #FFFFFF 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
}
.hero-blob-1 { width: 320px; height: 320px; background: var(--pink); top: -80px; right: -80px; }
.hero-blob-2 { width: 260px; height: 260px; background: var(--sky); bottom: -60px; left: -60px; }

.hero-container {
  position: relative;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-top: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,94,149,.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.hero-title { margin-bottom: 16px; }

.text-gradient {
  background: linear-gradient(90deg, var(--pink), #FF8FB1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-trust {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  font-size: .9rem;
  color: var(--muted);
}
.hero-trust strong {
  color: var(--navy);
  font-size: 1.25rem;
  display: block;
  font-family: var(--font-display);
}

.hero-visual {
  position: relative;
  max-width: 100%;
}

/* Hero float cards */
.hero-float-card {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.1);
  font-weight: 700;
  font-size: .78rem;
  color: var(--navy);
  z-index: 2;
  white-space: nowrap;
}

.hero-float-card-1 {
  top: 8%;
  left: 0;
  animation: float 3s ease-in-out infinite;
}
.hero-float-card-2 {
  bottom: 8%;
  right: 0;
  animation: float 3s ease-in-out infinite .5s;
}

@media (min-width: 768px) {
  .hero-float-card { padding: 10px 14px; font-size: .85rem; }
  .hero-float-card-1 { left: -4%; }
  .hero-float-card-2 { right: -4%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}
.hero-wave svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,94,149,.35);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(255,94,149,.45); }

.btn-outline {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--navy); }

.btn-lg { padding: 16px 26px; font-size: 1.05rem; }
.btn-sm { padding: 10px 16px; font-size: .9rem; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,94,149,.1);
  color: var(--pink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-tag-blue {
  background: rgba(83,199,245,.15);
  color: #0369A1;
}

.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--muted); font-size: 1rem; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
[data-anim] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-anim="fade-left"] { transform: translateX(30px); }
[data-anim="fade-right"] { transform: translateX(-30px); }
[data-anim="zoom-in"] { transform: scale(.95); }
[data-anim].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-anim] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-float-card { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   SCROLL ANCHOR — biar section tidak ketutup header
   ============================================================ */
section[id],
:target {
  scroll-margin-top: 80px;
}

/* ============================================================
   RESPONSIVE — TABLET & DESKTOP
   ============================================================ */
@media (min-width: 768px) {
  .hero { padding: 48px 0 80px; }
  .hero-container {
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
  }
  .hero-visual { order: 2; }
  .hero-content { order: 1; }
}

/* Desktop: menu horizontal */
@media (min-width: 992px) {
  .nav-toggle {
    display: none !important;
  }

  .nav-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 !important;
    gap: 4px !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    max-height: none !important;
    overflow: visible !important;
    margin-left: auto !important;
  }

  .nav-link {
    padding: 8px 14px;
    white-space: nowrap;
  }

  .nav-cta {
    margin: 0 0 0 12px;
  }

  .nav-container {
    padding: 16px var(--gutter);
  }
}

/* ============================================================
   FLOATING WHATSAPP — TOOLTIP HANYA DESKTOP
   ============================================================ */
.float-wa {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.float-wa:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 32px rgba(37,211,102,.55);
}

/* Tooltip — hidden default, muncul hanya di desktop hover */
.float-wa-tip {
  display: none;
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}

@media (min-width: 1024px) and (hover: hover) {
  .float-wa-tip { display: block; }
  .float-wa:hover .float-wa-tip,
  .float-wa:focus-visible .float-wa-tip {
    opacity: 1;
  }
}

/* Mobile kecil */
@media (max-width: 480px) {
  .float-wa {
    width: 54px;
    height: 54px;
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }
}

/* ============================================================
   FOCUS VISIBLE (A11y)
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}