/* ==========================================================================
   KAVANA — base (dipakai semua halaman)
   Hitam netral + ivory, emas hanya aksen. Semua teks memakai Play.
   Motif sudut "daun" dari logo: kiri-atas & kanan-bawah membulat.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #161616;
  --ink: #f5f2ea;
  --ink-2: #ebe7de;
  --muted: #8c8a85;
  --line: rgb(245 242 234 / 0.1);

  /* ivory = warna aksi utama; emas = aksen, dipakai hemat (highlight, logo, penanda aktif) */
  --ivory: #f5f2ea;
  --on-ivory: #0a0a0a;
  --gold: #d1b06b;
  --on-gold: #14100a;

  --font: "Play", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Play", ui-sans-serif, system-ui, sans-serif;

  --text-xs: 0.72rem;
  --text-sm: 0.84rem;
  --text-base: clamp(0.96rem, 0.92rem + 0.2vw, 1.05rem);
  --text-xl: clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem);
  --text-hero: clamp(2.5rem, 0.9rem + 6.6vw, 7rem);

  --gutter: clamp(1.1rem, 0.4rem + 2.8vw, 3.5rem);
  --space-section: clamp(4rem, 2.8rem + 5.5vw, 8.5rem);
  --header-h: 66px;
  --pill-space: 0px;

  --r: clamp(16px, 1.6vw, 22px);
  --leaf: var(--r) 0 var(--r) 0;
  --leaf-flip: 0 var(--r) 0 var(--r);

  --shadow: 0 12px 32px -14px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 34px 80px -30px rgb(0 0 0 / 0.75);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 450ms;
  --dur-slow: 1000ms;
}

@media (max-width: 820px) {
  :root { --pill-space: calc(78px + env(safe-area-inset-bottom)); }
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Pindah halaman tanpa kedip: header & navbar dibiarkan diam, isi halaman saja yang berganti */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(pill-nav),
::view-transition-group(site-header) { animation: none; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 300; color: var(--ink-2); }
em { font-style: normal; color: var(--gold); }

::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--on-ivory);
  border-radius: var(--leaf);
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: none; }

.kicker {
  margin: 0 0 0.9rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Keyframe gerak halus, dipakai frame format & kartu CTA */
@keyframes auroraA {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) rotate(6deg) scale(1.08); }
  100% { transform: translate3d(-3%, 4%, 0) rotate(-5deg) scale(1.04); }
}
@keyframes auroraB {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05); }
  50% { transform: translate3d(-5%, 3%, 0) rotate(-8deg) scale(1); }
  100% { transform: translate3d(3%, -4%, 0) rotate(7deg) scale(1.1); }
}

/* ---------- Sections (beranda & about) ---------- */
.section { padding: var(--space-section) var(--gutter) 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.section-title {
  margin: 0;
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.8em 1.5em;
  border: 1px solid transparent;
  border-radius: 14px 0 14px 0;
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-radius var(--dur) var(--ease-out),
    background-color var(--dur-fast),
    color var(--dur-fast),
    border-color var(--dur-fast),
    box-shadow var(--dur),
    transform var(--dur-fast);
}
.btn:hover { border-radius: 0 14px 0 14px; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--ivory); color: var(--on-ivory); }
.btn--primary:hover { background: var(--gold); color: var(--on-gold); }

.btn--ghost {
  background: rgb(245 242 234 / 0.04);
  border-color: rgb(245 242 234 / 0.18);
  color: var(--ink-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { border-color: rgb(245 242 234 / 0.5); color: var(--ink); }

.btn--light { background: var(--ivory); color: var(--on-ivory); }
.btn--light:hover { background: var(--gold); color: var(--on-gold); }

.btn--lg { min-height: 56px; padding: 1em 1.9em; font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur), border-color var(--dur);
}
.site-header.is-scrolled {
  background: rgb(10 10 10 / 0.72);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-color: var(--line);
}
.brand img { height: 26px; width: auto; }

.top-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.top-nav a:not(.btn) {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
  color: var(--muted);
  transition: color var(--dur-fast);
}
.top-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease-out);
}
.top-nav a:not(.btn):hover,
.top-nav a[aria-current="page"] { color: var(--ink-2); }
.top-nav a:not(.btn):hover::after,
.top-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.top-nav .btn { min-height: 40px; padding: 0.55em 1.2em; }

@media (max-width: 820px) {
  .top-nav { display: none; }
  /* HP: logo sudah ada di pill nav, jadi header atas ikut tergulir (tidak sticky) */
  .site-header { position: absolute; }
  .site-header.is-scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: transparent;
  }
}

/* ---------- Bottom nav (mobile): sudut daun seperti tombol ---------- */
.pill-nav { display: none; }
@keyframes pill-in {
  from { transform: translateX(-50%) translateY(90px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@media (max-width: 820px) {
  .pill-nav {
    position: fixed;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 200;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 4px;
    border: 1px solid rgb(245 242 234 / 0.12);
    border-radius: 20px 0 20px 0;
    background: rgb(18 18 18 / 0.88);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
    transform: translateX(-50%);
    animation: pill-in 1.2s var(--ease-out) 0.4s both;
    view-transition-name: pill-nav;
  }
  /* sudah pernah tampil di sesi ini: langsung muncul, tanpa animasi masuk lagi */
  .pill-nav--settled { animation: none; }
  /* ikon saja: semua item sama tinggi & lebar */
  .pill-item {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 46px;
    border-radius: 14px 0 14px 0;
    color: rgb(245 242 234 / 0.6);
    -webkit-tap-highlight-color: transparent;
    transition: color var(--dur-fast), background-color var(--dur-fast), transform 150ms;
  }
  .pill-item svg { width: 21px; height: 21px; }
  .pill-item:active { transform: scale(0.9); }
  .pill-item[aria-current="page"] { color: var(--ink); background: rgb(245 242 234 / 0.07); }
  /* penanda aktif: garis emas tipis di bawah ikon */
  .pill-item[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 38%; right: 38%; bottom: 5px;
    height: 1.5px;
    background: var(--gold);
  }

  /* Beranda = logo KAVANA berwarna emas */
  .pill-item--home[aria-current="page"] { background: none; }
  .pill-item--home::after { display: none; }
  /* logo lengkap (mark + KAVANA) berwarna emas */
  .pill-item--home { width: auto; padding: 0 14px 0 12px; }
  .pill-logo {
    height: 19px;
    aspect-ratio: 640 / 148;
    background: var(--gold);
    -webkit-mask: url("/media/logo-white-nav.png") center / contain no-repeat;
    mask: url("/media/logo-white-nav.png") center / contain no-repeat;
  }
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 38px;
  padding: 0.45em 1.05em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(245 242 234 / 0.03);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.chip:hover { color: var(--ink-2); border-color: rgb(245 242 234 / 0.3); }
.chip[aria-pressed="true"],
.chip:has(input:checked) { background: var(--ivory); border-color: var(--ivory); color: var(--on-ivory); }

/* ---------- Placeholder art (karya tanpa poster) ---------- */
.ph {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 20% 15%, hsl(var(--h) 6% 34% / 0.45), transparent 65%),
    radial-gradient(80% 60% at 85% 95%, hsl(var(--h) 4% 22% / 0.5), transparent 65%),
    #141414;
}
.ph::before,
.ph::after { content: ""; position: absolute; will-change: transform; }
.ph--orbit::before {
  width: 46%; aspect-ratio: 1;
  left: 27%; top: 50%;
  margin-top: -23%;
  border: 1.5px solid rgb(245 242 234 / 0.9);
  border-radius: 50%;
  animation: orbit 7s var(--ease-in-out) infinite;
}
.ph--orbit::after {
  width: 10%; aspect-ratio: 1;
  left: 45%; top: 50%;
  margin-top: -5%;
  background: var(--ivory);
  border-radius: 50%;
  animation: orbit-dot 7s var(--ease-in-out) infinite;
}
@keyframes orbit { 50% { transform: scale(0.6) rotate(180deg); border-radius: 35% 0 35% 0; } }
@keyframes orbit-dot { 50% { transform: translateY(-220%) scale(1.3); } }
.ph--leaf::before,
.ph--leaf::after {
  width: 40%; aspect-ratio: 1;
  left: 30%; top: 50%;
  margin-top: -20%;
  border-radius: 40% 0 40% 0;
}
.ph--leaf::before { background: rgb(245 242 234 / 0.9); animation: leaf 5.5s var(--ease-in-out) infinite; }
.ph--leaf::after { border: 1.5px solid var(--gold); animation: leaf 5.5s var(--ease-in-out) infinite reverse; }
@keyframes leaf {
  0%, 100% { transform: translateY(-40%) rotate(0); }
  50% { transform: translateY(40%) rotate(90deg); border-radius: 0 40% 0 40%; }
}
.ph--bars::before {
  inset: 34% 22%;
  background: repeating-linear-gradient(90deg, rgb(245 242 234 / 0.9) 0 9%, transparent 9% 16%);
  transform-origin: bottom;
  animation: bars 2.6s var(--ease-in-out) infinite alternate;
}
.ph--bars::after {
  left: 22%; right: 22%; top: 68%;
  height: 1.5px;
  background: var(--gold);
  transform-origin: left;
  animation: bar-line 2.6s var(--ease-in-out) infinite alternate;
}
@keyframes bars { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }
@keyframes bar-line { from { transform: scaleX(0.1); } to { transform: scaleX(1); } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: var(--space-section);
  padding-bottom: var(--pill-space);
  background: #070707;
  border-top: 1px solid var(--line);
  color: rgb(245 242 234 / 0.7);
}
/* cahaya tipis dari atas, supaya footer tidak datar */
.ft-glow {
  position: absolute;
  inset: -40% 10% auto;
  height: 80%;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgb(245 242 234 / 0.06), transparent 70%);
}

.ft-cta {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: clamp(4.5rem, 11vw, 9rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}
.ft-cta-title {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 1rem + 7vw, 7.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.ft-cta .btn svg { transition: transform var(--dur) var(--ease-out); }
.ft-cta .btn:hover svg { transform: translateX(4px); }

.ft-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 1.1fr 1fr;
  grid-template-areas: "brand explore services contact";
  gap: clamp(2rem, 4vw, 3.5rem);
  margin: 0 var(--gutter);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.ft-brand { grid-area: brand; }
.ft-inner > .ft-col:nth-of-type(2) { grid-area: explore; }
.ft-inner > .ft-col:nth-of-type(3) { grid-area: services; }
.ft-inner > .ft-col:nth-of-type(4) { grid-area: contact; }
@media (max-width: 920px) {
  .ft-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "brand brand" "explore contact" "services services";
    gap: 2.25rem 1.5rem;
  }
  .ft-inner > .ft-col:nth-of-type(3) ul { columns: 2; column-gap: 1.5rem; }
}

/* logo lengkap (dengan tagline Arab), ukuran wajar di kolom brand */
.ft-logo {
  width: min(240px, 70%);
  aspect-ratio: 1200 / 300;
  background: var(--ink);
  -webkit-mask: url("/media/logo-white.png") left center / contain no-repeat;
  mask: url("/media/logo-white.png") left center / contain no-repeat;
}
.ft-desc {
  max-width: 34ch;
  margin: 1.1rem 0 0;
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.55;
  color: rgb(245 242 234 / 0.62);
}
.ft-socials { display: flex; gap: 10px; margin-top: 1.4rem; }
.ft-socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px 0 12px 0;
  color: var(--ink-2);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), border-radius var(--dur) var(--ease-out);
}
.ft-socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--on-gold, #0a0a0a); border-radius: 0 12px 0 12px; }
.ft-socials svg { width: 18px; height: 18px; }
.ft-col h2 {
  margin: 0 0 1rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.ft-col ul { list-style: none; margin: 0; padding: 0; }
.ft-col a,
.ft-col span {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: var(--text-sm);
  color: rgb(245 242 234 / 0.62);
  text-decoration: none;
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.ft-col a:hover { color: var(--ink); transform: translateX(3px); }

.ft-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin: 0 var(--gutter);
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: rgb(245 242 234 / 0.45);
}
.ft-bottom a { text-decoration: none; }
.ft-bottom a:hover { color: var(--ink); }

/* ---------- Intro (sekali per sesi) ----------
   0–0.5s   mark K muncul dari blur
   0.5–1.4s tulisan KAVANA tersibak dari kiri, garis emas memanjang
   1.9–2.9s tirai terangkat, hero menyusul
*/
.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  animation: intro-out 1s var(--ease-in-out) 1.9s forwards;
}
.intro-logo {
  width: clamp(220px, 32vw, 340px);
  aspect-ratio: 1200 / 300;
  background: var(--gold);
  -webkit-mask: url("/media/logo-white.png") center / contain no-repeat;
  mask: url("/media/logo-white.png") center / contain no-repeat;
  animation: intro-logo 1.45s var(--ease-in-out) both;
}
.intro-line {
  width: 100%;
  max-width: clamp(220px, 32vw, 340px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  transform: scaleX(0);
  animation: intro-line 1.2s var(--ease-in-out) 0.5s forwards;
}
/* mark K menempati 25% kiri gambar logo: mulai di tengah layar (geser 37.5%),
   lalu bergeser ke kiri sambil KAVANA dan tagline Arab tersibak */
@keyframes intro-logo {
  0% { clip-path: inset(0 75% 0 0); opacity: 0; filter: blur(8px); transform: translateX(37.5%) scale(0.94); }
  35% { clip-path: inset(0 75% 0 0); opacity: 1; filter: blur(0); transform: translateX(37.5%); }
  100% { clip-path: inset(0 0 0 0); opacity: 1; filter: blur(0); transform: none; }
}
@keyframes intro-line { to { transform: scaleX(1); } }
/* tirai terangkat ke atas */
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); } }
.is-intro .pill-nav { animation-delay: 2.65s; }

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
