/* ==========================================================================
   FAMILY – AKRAB & SENANG | Landing Page Stylesheet
   Konsep Desain: Fresh Countryside – Green Family
   ========================================================================== */

:root {
  /* Palet Warna Utama (Green Countryside) */
  --primary-green: #397B45;
  --deep-green: #245A35;
  --fresh-green: #78A95B;
  --soft-green: #E5F0DF;
  --light-green: #F2F7ED;
  --warm-cream: #FFF9ED;
  --dark-text: #263D2B;
  --secondary-text: #718071;
  --white: #FFFFFF;

  /* Tipografi */
  --font-heading: 'Nunito', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Poppins', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Ukuran & Spasi */
  --container-max: 1240px;
  --header-height: 88px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  /* Bayangan & Transisi */
  --shadow-soft: 0 14px 36px rgba(36, 90, 53, 0.08);
  --shadow-card: 0 24px 54px rgba(36, 90, 53, 0.14);
  --shadow-btn: 0 10px 24px rgba(57, 123, 69, 0.28);
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--dark-text);
  background: linear-gradient(155deg, var(--warm-cream) 0%, var(--light-green) 62%, var(--soft-green) 100%);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   2. DEKORASI LATAR BELAKANG (FRESH COUNTRYSIDE)
   ========================================================================== */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.65;
}

.bg-blob--top-left {
  width: 420px;
  height: 420px;
  background: var(--soft-green);
  top: -140px;
  left: -120px;
}

.bg-blob--right {
  width: 520px;
  height: 520px;
  background: rgba(120, 169, 91, 0.16);
  top: 14%;
  right: -160px;
}

.bg-blob--bottom-left {
  width: 360px;
  height: 360px;
  background: rgba(229, 240, 223, 0.85);
  bottom: -80px;
  left: 12%;
}

.countryside-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
}

/* ==========================================================================
   3. HEADER / NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background-color: rgba(255, 249, 237, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(57, 123, 69, 0.08);
  transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth), height var(--transition-smooth);
  animation: headerSlideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  height: 76px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Bagian Kiri: Logo & Identitas */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--white);
  padding: 3px;
  box-shadow: 0 4px 14px rgba(36, 90, 53, 0.12);
  border: 2px solid var(--soft-green);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.25);
  border-radius: 50%;
}

.brand-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--deep-green);
  text-transform: uppercase;
}

.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--fresh-green);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Bagian Kanan: Navigasi Desktop */
.primary-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--deep-green);
  padding: 8px 2px;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--fresh-green);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--fresh-green);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  color: var(--primary-green);
  font-weight: 600;
}

.nav-link.active::after {
  transform: scaleX(1);
  background-color: var(--primary-green);
}

/* Hamburger Button (Hidden on Desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background-color: var(--soft-green);
  border: 1px solid rgba(57, 123, 69, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 5px;
  padding: 10px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.menu-toggle:hover {
  background-color: #d6e8cd;
}

.hamburger-bar {
  width: 22px;
  height: 2.5px;
  background-color: var(--deep-green);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ==========================================================================
   4. HERO SECTION / BAGIAN UTAMA (SEAMLESS RIGHT-SIDE FULL HERO IMAGE)
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 1;
}

.hero-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
  display: flex;
  align-items: center;
  padding: 48px 0 64px;
  overflow: hidden;
}

.hero-container {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

/* Sisi Kiri: Konten Teks (35–45% lebar hero section) */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 42%;
  max-width: 520px;
  padding-right: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--soft-green);
  color: var(--primary-green);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(57, 123, 69, 0.16);
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.badge-leaf-icon {
  color: var(--primary-green);
  flex-shrink: 0;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.8vw, 3.35rem);
  font-weight: 800;
  color: var(--deep-green);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  max-width: 16ch;
  opacity: 0;
  animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

.hero-description {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.18vw, 1.12rem);
  font-weight: 400;
  color: var(--secondary-text);
  line-height: 1.8;
  max-width: 46ch;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

/* Sisi Kanan: Gambar Keluarga Besar Menyatu dengan Background (62-65% lebar layar hingga tepi kanan viewport) */
.hero-visual-seamless {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 64vw;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  animation: visualReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;

  /* Soft Gradient Mask pada sisi kiri & bawah agar menyatu mulus tanpa garis batas kotak */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 7%,
    rgba(0, 0, 0, 0.45) 16%,
    rgba(0, 0, 0, 0.82) 26%,
    rgba(0, 0, 0, 1) 36%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 7%,
    rgba(0, 0, 0, 0.45) 16%,
    rgba(0, 0, 0, 0.82) 26%,
    rgba(0, 0, 0, 1) 36%,
    rgba(0, 0, 0, 1) 100%
  );
}

/* Transisi tambahan di tepi atas & bawah agar menyatu organik dengan background krem/hijau muda */
.hero-visual-seamless::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 249, 237, 0.45) 0%,
      transparent 14%,
      transparent 82%,
      rgba(242, 247, 237, 0.78) 100%
    );
  pointer-events: none;
}

.hero-seamless-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Posisikan agar karakter nenek dan kedua cucu terlihat utuh dan jelas */
  object-position: 62% center;
  display: block;
}

/* Kutipan di Kanan Bawah di Atas Gambar dengan warna kontras */
.hero-image-quote {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 3;
  max-width: min(520px, calc(100% - 64px));
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: 700;
  font-style: italic;
  color: var(--warm-cream);
  text-align: right;
  background-color: rgba(24, 54, 32, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 249, 237, 0.35);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   5. TOAST NOTIFICATION (INTERAKSI MENU PLACEHOLDER)
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--deep-green);
  color: var(--white);
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 30px rgba(36, 90, 53, 0.28);
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
}

.toast-notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   6. KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes visualReveal {
  from {
    opacity: 0;
    transform: translateX(20px) scale(1.02);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (LAPTOP, TABLET, SMARTPHONE)
   ========================================================================== */

/* Laptop / Desktop Kecil */
@media (max-width: 1140px) {
  .hero-content {
    width: 45%;
  }

  .hero-visual-seamless {
    width: 62vw;
  }

  .nav-list {
    gap: 24px;
  }
}

/* Tablet & Mobile (Teks di atas, Gambar menyatu di bawah memenuhi lebar layar) */
@media (max-width: 900px) {
  :root {
    --header-height: 78px;
  }

  .menu-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--soft-green);
    box-shadow: 0 18px 34px rgba(36, 90, 53, 0.12);
    padding: 16px 28px 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }

  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: var(--soft-green);
    color: var(--deep-green);
  }

  .hero-section {
    flex-direction: column;
    justify-content: flex-start;
    padding: 36px 0 0;
    min-height: auto;
  }

  .hero-container {
    justify-content: center;
  }

  .hero-content {
    width: 100%;
    max-width: 620px;
    padding-right: 0;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
  }

  .hero-headline {
    max-width: 19ch;
  }

  .hero-description {
    max-width: 54ch;
    margin-bottom: 28px;
  }

  .hero-visual-seamless {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100vw;
    height: auto;
    aspect-ratio: 16 / 9;
    /* Soft gradient mask di bagian atas agar gambar menyatu dengan background di atasnya */
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 10%,
      rgba(0, 0, 0, 0.85) 22%,
      rgba(0, 0, 0, 1) 32%,
      rgba(0, 0, 0, 1) 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 10%,
      rgba(0, 0, 0, 0.85) 22%,
      rgba(0, 0, 0, 1) 32%,
      rgba(0, 0, 0, 1) 100%
    );
  }

  .hero-seamless-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .hero-image-quote {
    right: 20px;
    bottom: 18px;
  }
}

/* Smartphone */
@media (max-width: 576px) {
  .container {
    padding: 0 20px;
  }

  .brand-logo-wrapper {
    width: 46px;
    height: 46px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .brand-subtitle {
    font-size: 0.68rem;
  }

  .hero-section {
    padding: 24px 0 0;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .hero-headline {
    font-size: 1.9rem;
    margin-bottom: 16px;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    width: 100%;
    justify-content: center;
  }

  .btn-primary {
    width: 100%;
    max-width: 300px;
    padding: 15px 28px;
  }

  .hero-image-quote {
    right: 12px;
    left: 12px;
    bottom: 12px;
    font-size: 0.82rem;
    padding: 8px 14px;
    text-align: center;
  }

  .toast-notification {
    left: 20px;
    right: 20px;
    bottom: 20px;
    justify-content: center;
  }
}
