/* ============================================================
   01 Token · 02 Base · 03 Tipografi · 04 Navbar · 05 Hero
   06 Container · 07 Flex & Artikel · 08 Highlight · 09 Gambar & Modal
   10 Button & CTA · 11 Fixed Button · 12 Footer · 13 Animasi Masuk
   14 Responsive · 15 Aksesibilitas
   ============================================================ */

/* 01. TOKEN */
:root {
  --color-gold: #c9a86a;
  --color-gold-dark: #8a6a2c;
  --color-gold-soft: #eadfc9;
  --color-charcoal: #2b2b2b;
  --color-charcoal-light: #4b4b4b;
  --color-black: #111;
  --color-white: #fff;
  --color-bg: #f3f4f4;
  --color-bg-soft: #e9ebeb;
  --color-border: #d7d9d9;
  --color-overlay: rgba(17, 17, 17, 0.88);
  --hover-bg: rgba(201, 168, 106, 0.18);

  --font-head: "Montserrat", "Poppins", Arial, sans-serif;
  --font-main: "Poppins", Arial, sans-serif;
  --text-base: 1rem;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;

  --max-width: 1200px;
  --radius: 12px;
  --shadow-soft: 0 8px 24px rgba(17, 17, 17, 0.06);
  --shadow-medium: 0 14px 40px rgba(17, 17, 17, 0.14);
  --ease: 0.3s ease;
}

/* 02. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--color-charcoal);
  background: var(--color-bg);
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.7;
  hyphens: auto;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
a, button { cursor: pointer; }               /* ikon tangan */
p, ul, ol { margin: 0 0 var(--space-md); }
p, li { text-align: justify; }
ul, ol { padding-left: 1.5rem; }
li + li { margin-top: var(--space-xs); }
figure { margin: 0 0 var(--space-sm); }
figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* 03. TIPOGRAFI */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md);
  padding: 0.15em 0.5em;
  color: var(--color-black);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  border-radius: 8px;
  transition: transform var(--ease), background-color var(--ease), box-shadow var(--ease);
}
h1 { font-size: clamp(2rem, 4.5vw, 2.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

@media (hover: hover) {
  :is(h1, h2, h3, h4, h5, h6, p, li):hover {         /* lift + background */
    transform: translateY(-4px);
    background-color: var(--hover-bg);
    box-shadow: var(--shadow-medium);
  }
}

.intro, .kicker { text-align: center; }
.intro {                                     /* teks pendukung sebelum headline */
  margin-bottom: var(--space-xs);
  color: var(--color-gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: capitalize;
}
.kicker {                                    /* jembatan ke section berikutnya */
  max-width: 900px;
  margin: var(--space-lg) auto 0;
  color: var(--color-black);
  font-size: 1.125rem;
  font-weight: 600;
}
.kicker::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0 auto var(--space-sm);
  background: var(--color-gold);
  border-radius: 3px;
}
figcaption {
  margin-top: var(--space-xs);
  color: var(--color-charcoal-light);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}
main :is(p, li) a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
main :is(p, li) a:hover { color: var(--color-gold-dark); }

/* 04. NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: min(100% - 32px, var(--max-width));
  min-height: 72px;
  margin: 0 auto;
}
.nav-logo img { width: auto; max-height: 56px; }
.nav-menu { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nav-menu li { margin: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background-color 0.25s, transform 0.25s;
}
.nav-link:hover, .nav-link:focus-visible {
  background: var(--color-gold-soft);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--color-charcoal);
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 11px;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle::before { transform: translateY(-7px); }
.nav-toggle::after { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

/* 05. HERO */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-white);
  background: var(--color-charcoal) var(--hero-img, none) center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.4), rgba(17, 17, 17, 0.7));
}
.hero-content { width: min(100%, 900px); text-align: center; }
.hero h1 { color: var(--color-gold); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.hero p { color: var(--color-white); text-align: center; }
.hero .button-group { margin-top: var(--space-md); }

/* 06. CONTAINER BOX (satu gaya, dipakai semua section) */
.container-box {
  width: min(100% - 32px, var(--max-width));
  margin: var(--space-lg) auto;
  padding: var(--space-xl);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.container-box--soft    { background: var(--color-bg-soft); }
.container-box--charcoal { background: var(--color-charcoal); }

/* Emas: h2, h3 */
.container-box--charcoal :is(h2, h3) {
    color: var(--color-gold);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Putih: p, figcaption */
.container-box--charcoal :is(p, figcaption) {
    color: var(--color-white);
    text-align: center;
}

/* 07. FLEX ITEM (gambar landscape) & ARTIKEL (gambar portrait) */
.flex-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.flex-item {                                 /* jumlah item apa pun otomatis penuh */
  flex: 1 1 calc(25% - var(--space-md));
  min-width: min(100%, 230px);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform var(--ease), box-shadow var(--ease);
}
.flex-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-medium); }
.flex-item p:last-child { margin-bottom: 0; }

.artikel-section {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}
.artikel-section:nth-of-type(even) { flex-direction: row-reverse; }   /* zig-zag */
.artikel-image, .artikel-content { flex: 1 1 0; min-width: 0; }
.artikel-image { margin: 0; }
.artikel-image img { aspect-ratio: 4 / 5; }
.artikel-content > :last-child { margin-bottom: 0; }

/* 08. HIGHLIGHT */
.highlight {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--color-gold-soft);
  border: 1px solid var(--color-gold);
  border-left: 6px solid var(--color-gold);
  border-radius: var(--radius);
}
.highlight, .highlight :is(p, li) { text-align: center; }
.highlight p { font-weight: 600; }
.highlight > :last-child { margin-bottom: 0; }

/* 09. GAMBAR & MODAL */
.image-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: zoom-in;
}
.image-zoom img { transition: transform var(--ease), filter var(--ease), opacity var(--ease); }
.image-zoom:hover img, .image-zoom:focus-visible img {
  transform: scale(1.05);
  filter: brightness(0.9);
}
.image-zoom::after {                         /* ikon kaca pembesar */
  content: "🔍";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  background: rgba(17, 17, 17, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  transition: transform var(--ease);
}
.image-zoom:hover::after { transform: scale(1.1); }

.image-modal {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  padding: 5vh 5vw;
  overflow: hidden;
  background: transparent;
  border: 0;
}
.image-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.25s ease;
}
.image-modal::backdrop { background: var(--color-overlay); }
.image-modal-image {
  width: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
}
.image-modal-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: transform 0.25s, background-color 0.25s;
}
.image-modal-close:hover { transform: scale(1.08); background: rgba(17, 17, 17, 0.85); }
@keyframes fade-in { from { opacity: 0; } }

/* 10. BUTTON & CTA */
.button {
  --pulse: 201, 168, 106;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  animation: soft-pulse 2.8s ease-in-out infinite;
  transition: transform 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s;
}
.button .icon { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.button:hover, .button:focus-visible { transform: translateY(-3px); animation-play-state: paused; }
.button-primary { color: var(--color-black); background: var(--color-gold); border: 1px solid var(--color-gold); }
.button-primary:hover, .button-primary:focus-visible {
  color: var(--color-white);
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
}
.button-secondary { --pulse: 43, 43, 43; color: var(--color-white); background: var(--color-charcoal); border: 1px solid var(--color-charcoal); }
.button-secondary:hover, .button-secondary:focus-visible { background: var(--color-black); border-color: var(--color-black); }
:is(.hero, .cta-box) .button-secondary { --pulse: 255, 255, 255; background: transparent; border-color: var(--color-white); }
:is(.hero, .cta-box) .button-secondary:hover { background: rgba(255, 255, 255, 0.18); }
.button-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--pulse), 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(var(--pulse), 0); }
}

.cta-box {                                   /* punch line pamungkas */
  width: min(100% - 32px, var(--max-width));
  margin: var(--space-xl) auto;
  padding: var(--space-xl) var(--space-lg);
  color: var(--color-white);
  background: radial-gradient(circle at top, rgba(201, 168, 106, 0.28), transparent 60%), var(--color-black);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  animation: cta-glow 3.5s ease-in-out infinite;
}
.cta-box, .cta-box p { text-align: center; }
.cta-box :is(h2, h3) { color: var(--color-white); }
.cta-box p { color: rgba(255, 255, 255, 0.92); }
:is(.hero, .cta-box) .intro { color: var(--color-gold); }
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(201, 168, 106, 0); }
  50% { box-shadow: 0 0 40px rgba(201, 168, 106, 0.4); }
}

/* 11. FIXED BUTTON (riak hanya untuk WA) */
.fixed-buttons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fixed-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: var(--color-gold);
  background: var(--color-black);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s;
}
.fixed-buttons a:hover { transform: scale(1.1); }
.fixed-buttons .icon { width: 30px; height: 30px; fill: currentColor; pointer-events: none; }
.fixed-buttons .back-to-top { color: var(--color-black); background: var(--color-gold); }
.fixed-buttons .wa { animation: wa-ripple 2.4s ease-out infinite; }
.fixed-buttons .wa:hover { animation-play-state: paused; }
@keyframes wa-ripple {                       /* 2 cincin, dari tepi tombol ke luar */
  0%   { box-shadow: 0 0 0 0 rgba(201, 168, 106, 0.55), 0 0 0 0 rgba(201, 168, 106, 0); }
  35%  { box-shadow: 0 0 0 12px rgba(201, 168, 106, 0.25), 0 0 0 0 rgba(201, 168, 106, 0.45); }
  70%  { box-shadow: 0 0 0 24px rgba(201, 168, 106, 0), 0 0 0 14px rgba(201, 168, 106, 0.2); }
  100% { box-shadow: 0 0 0 24px rgba(201, 168, 106, 0), 0 0 0 28px rgba(201, 168, 106, 0); }
}

/* 11B. SOCIAL SHARE (floating, tepi kiri) */
.social-share {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 98;
  transform: translateY(-50%);
}
.social-share-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: share-in 0.6s ease-out 0.8s both;
}
.social-share-list li { margin: 0; }

.share-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--color-gold);
  background: var(--color-black);
  border: 1px solid rgba(201, 168, 106, 0.5);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s, color 0.3s, background-color 0.3s;
}
.share-btn:hover,
.share-btn:focus-visible {
  color: var(--color-black);
  background: var(--color-gold);
  transform: translateX(6px);
}
.share-btn .icon { width: 22px; height: 22px; fill: currentColor; pointer-events: none; }

.share-label {                               /* tooltip */
  position: absolute;
  left: calc(100% + 12px);
  padding: 4px 10px;
  color: var(--color-gold);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--color-black);
  border-radius: 6px;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.share-btn:hover .share-label,
.share-btn:focus-visible .share-label { opacity: 1; transform: none; }

@keyframes share-in { from { opacity: 0; transform: translateX(-100%); } }

@media (max-width: 767px) {                  /* HP: baris tombol bulat, kiri-bawah */
  .social-share { top: auto; bottom: 20px; left: 12px; transform: none; }
  .social-share-list { flex-direction: row; }
  .share-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 168, 106, 0.5);
    border-radius: 50%;
  }
  .share-btn:hover,
  .share-btn:focus-visible { transform: translateY(-3px); }
  .share-label { display: none; }
}

/* 12. FOOTER */
.footer {
  margin-top: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-md);
  color: rgba(255, 255, 255, 0.9);
  background: var(--color-black);
  border-top: 4px solid var(--color-gold);
}

/* Logo footer */
.footer-logo {
  display: block;
  width: fit-content;
  margin: 0 auto var(--space-sm);   /* rata tengah + jarak ke tagline */
}
.footer-logo img {
  width: auto;
  height: 56px;                     /* tinggi tetap, lebar mengikuti rasio */
  object-fit: contain;
}

.footer-inner, .footer-bottom { width: min(100% - 32px, var(--max-width)); margin: 0 auto; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.footer :is(h2, h3, h4) { color: var(--color-white); }
.footer :is(p, li) { text-align: center; }
.footer ul { padding: 0; list-style: none; }
.footer a { transition: color 0.25s; }
.footer a:hover { color: var(--color-gold); font-weight: 600; }
.footer-bottom { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer-bottom p { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }

/* 13. ANIMASI MASUK (fly-in + opacity; konten tetap tampil jika JS mati) */
:is(.container-box, .cta-box, .flex-section, .artikel-section) {
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
@media (scripting: enabled) {
  :is(.container-box, .cta-box, .flex-section, .artikel-section):not(.show) {
    opacity: 0;
    transform: translateY(48px);
  }
}

/* 14. RESPONSIVE */
@media (max-width: 1199px) {
  .container-box { padding: var(--space-lg); }
}
@media (max-width: 767px) {
  :root { --space-md: 20px; --space-lg: 32px; --space-xl: 44px; --text-base: 0.95rem; }
  html { scroll-padding-top: 72px; }
  .navbar-inner { width: min(100% - 24px, var(--max-width)); min-height: 64px; }
  .nav-logo img { max-height: 40px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: 0;
    padding: 0 12px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
  }
  .nav-menu.is-open { max-height: 80vh; padding: 10px 12px 14px; opacity: 1; pointer-events: auto; }
  .nav-link { justify-content: center; width: 100%; min-height: 46px; }
  .hero { min-height: 54vh; }
  .container-box, .cta-box { width: min(100% - 20px, var(--max-width)); padding: var(--space-lg) var(--space-md); }
  .artikel-section, .artikel-section:nth-of-type(even) { flex-direction: column; }
  .artikel-image, .artikel-content { flex: none; width: 100%; }
  .button-group { flex-direction: column; width: 100%; }
  .button { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* 15. AKSESIBILITAS */
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}