/* =========================================================
   Cikal Maritim Nusantara: gaya "product story" (terang → gelap hangat)
   ========================================================= */
:root {
  /* PALET: krem tulang · hijau zaitun · cokelat tua · hijau hutan */
  --bg: #ECE6D8;            /* diubah JS saat scroll */
  --light: #ECE6D8;         /* krem tulang */
  --dark: #241A0C;          /* cokelat tua (latar gelap) */
  --choco: #3A2A12;         /* cokelat kartu */
  --olive: #4E5B33;         /* hijau zaitun */
  --forest: #1E2418;        /* hijau hutan gelap */
  --ink: #2E2210;           /* teks gelap di latar terang */
  --white: #ECE6D8;         /* teks terang di latar gelap */
  --muted-d: rgba(236, 230, 216, .64);
  --line-d: rgba(236, 230, 216, .14);
  --amber: #ECE6D8;         /* warna aksen/tombol (mode Senja: krem) */
  --on-amber: #2E2210;      /* teks di atas tombol aksen */
  --amber-2: #BAC391;       /* teks aksen (label, nomor): hijau sage */
  --accent-rgb: 186, 195, 145;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;        /* font isi: paragraf, menu, tombol, formulir */
  --font-judul: 'Inter Tight', system-ui, sans-serif;       /* font judul & angka besar */
  --pad: clamp(20px, 4vw, 56px);

  /* SKALA HURUF KECIL: batas bawah agar tetap terbaca di laptop maupun HP.
     Semua label, menu, tombol & keterangan memakai variabel ini; ubah di sini untuk membesarkan/mengecilkan semuanya sekaligus.
     Format clamp(terkecil, mengikuti lebar layar, terbesar). */
  --fs-mikro: clamp(12px, .82vw, 13px);       /* paling kecil: lencana, nomor urut */
  --fs-label: clamp(12.5px, .9vw, 14px);      /* label HURUF BESAR berspasi */
  --fs-ui: clamp(13.5px, .95vw, 15px);        /* menu, tombol */
  --fs-ket: clamp(14px, 1vw, 15.5px);         /* keterangan, catatan kecil */
  --fs-isi: clamp(15.5px, 1.1vw, 17px);       /* paragraf pendek di dalam kartu */
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, .nav__logo, .cerita__stats dt, .jfeat__title, .jitem__title, .voice__content blockquote, .stat b, .pkt__name {
  font-family: var(--font-judul);
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- lapisan latar ---------- */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse 38% 45% at 50% 50%, rgba(236, 230, 216, .10), transparent 72%),
    radial-gradient(ellipse 80% 60% at 50% 105%, rgba(78, 91, 51, .28), transparent 72%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .35) 100%);
}
/* logo emas 3D: kanvas kecil yang ditempatkan di posisi logo (koordinat halaman) oleh js/logo3d.js.
   absolute, bukan fixed: browser sendiri yang menggulirnya bersama halaman, jadi logo tidak
   tertinggal saat scroll cepat. z-index di atas isi halaman, di bawah header. */
#lamp { position: absolute; left: 0; top: 0; z-index: 3; max-width: none; pointer-events: none; opacity: 0; will-change: transform, opacity; }
html.menu-open #lamp { visibility: hidden; }   /* menu HP terbuka: logo 3D disembunyikan */
main { position: relative; z-index: 2; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--pad);
  color: var(--ink);
  transition: color .4s ease, background-color .4s ease, padding .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-dark { color: var(--white); }
/* setelah di-scroll: latar blur supaya menu tidak bertabrakan dengan konten */
.nav.is-scrolled {
  padding-top: 12px; padding-bottom: 12px;
  background-color: rgba(236, 230, 216, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: rgba(46, 34, 16, .08);
}
.nav.is-scrolled.is-dark { background-color: rgba(30, 22, 10, .62); border-bottom-color: rgba(236, 230, 216, .08); }
.nav__logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.nav__mark { position: relative; width: 30px; height: 45px; flex: none; }
.nav__mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .4s ease; }
.nav__mark-white { opacity: 0; }
.nav.is-dark .nav__mark-color { opacity: 0; }
.nav.is-dark .nav__mark-white { opacity: 1; }
/* garis kail "tergambar" saat halaman dibuka */
.nav__mark { animation: markIn 1.2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes markIn { from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand img { width: 22px; height: auto; opacity: .85; }
/* teks footer "© tahun CMN Group · Cikal Maritim Nusantara" sebagai satu baris biasa;
   di HP cukup "© tahun CMN Group" (nama lengkap sudah ada di header) agar tidak turun baris */
footer span.foot-teks, footer span.foot-teks span { display: inline; }
@media (max-width: 600px) {
  footer span.foot-teks span.foot-nama { display: none; }
  /* HP: footer rata tengah & simetris (logo + "© tahun CMN Group", lalu semboyan di bawahnya),
     ruang bawah cukup agar tidak tertutup tombol "Chat" yang melayang di kiri bawah */
  footer.footer, footer.foot-light {
    flex-direction: column; align-items: center; text-align: center; gap: 8px;
    padding-right: 0; padding-bottom: 104px;
  }
}
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; opacity: .75; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__btn {
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  padding: 10px 16px; border-radius: 999px; border: 1px solid currentColor;
  transition: background .2s, color .2s;
}
.nav__btn:hover { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.nav__toggle { display: none; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s, box-shadow .3s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
/* <button> bergaya .btn: buang garis tepi & huruf bawaan browser */
button.btn { font-family: var(--font); cursor: pointer; }
button.btn:where(.btn--glow, .btn--ink) { border: 0; }
.btn--glow { background: var(--amber); color: var(--on-amber); box-shadow: 0 8px 26px rgba(0, 0, 0, .22); }
.btn--glow:hover { box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
.btn--ghost { border: 1px solid rgba(236, 230, 216, .35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); }
.btn--light { background: var(--white); color: var(--dark); }

.eyebrow { font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-2); }

/* ---------- 1. HERO: seluruh gayanya ada di css/hero.css ---------- */

/* ---------- 2. INTRO ---------- */
.s-intro__title {
  font-size: clamp(34px, 4.2vw, 64px); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.03em; line-height: .95; max-width: 9ch;
}
.s-intro__side { color: var(--muted-d); }

/* ---------- 3. STRIP FOTO ---------- */
.s-strips__lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }

/* ---------- 4. FOTO PENUH ---------- */
.s-cinema { padding: 10vh var(--pad); }
.s-cinema__frame {
  position: relative; height: 88vh; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.s-cinema__img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
#ombak .s-cinema__img { object-position: 50% 66%; }   /* "Teruji ombak": matahari, garis pantai, dan kepala-bahu nahkoda */
#ombak .s-cinema__frame::after { background: linear-gradient(180deg, rgba(30, 22, 10, 0), rgba(30, 22, 10, .10) 55%, rgba(30, 22, 10, .38)); }   /* lapisan lebih tipis: foto senja sudah cukup gelap */
.s-cinema__frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 22, 10,.15), rgba(30, 22, 10,.55)); }
.s-cinema__word {
  position: relative; z-index: 1;
  font-size: clamp(56px, 11vw, 200px); font-weight: 800; letter-spacing: -.06em; line-height: .9;
  color: rgba(236, 230, 216, .94); text-align: center; text-shadow: 0 6px 60px rgba(0,0,0,.35);
}
.s-cinema__cap { position: absolute; z-index: 1; bottom: 26px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; background: rgba(30, 22, 10,.5); padding: 9px 16px; border-radius: 999px; backdrop-filter: blur(6px); white-space: nowrap; }

/* ---------- 5. KARTU BERGESER ---------- */

/* ---------- 6. TABEL ---------- */
.s-table { padding: 16vh var(--pad); max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.s-table__head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.s-table__head h2 { font-size: clamp(36px, 4.4vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.s-table__note { text-align: center; font-size: var(--fs-ket); color: var(--muted-d); }

/* ---------- 7. BINGKAI BERCAHAYA ---------- */
.s-glow { padding: 6vh var(--pad); }
.s-glow__frame {
  position: relative; min-height: 92vh; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14vh 40px 48px; text-align: center;
  background: rgba(30, 36, 24, .25);
}
/* cahaya bingkai "bernapas": dua lapis bayangan yang berganti lewat opacity saja.
   (Menganimasikan box-shadow langsung memaksa browser menggambar ulang bingkai besar ini tiap frame.) */
.s-glow__frame::before, .s-glow__frame::after {
  content: ''; position: absolute; inset: -2px; z-index: 0; border-radius: inherit; pointer-events: none;
  will-change: opacity;
}
.s-glow__frame::before {
  box-shadow:
    inset 0 0 60px 12px rgba(186, 195, 145, .32),
    inset 0 0 150px 40px rgba(78, 91, 51, .45),
    inset 0 0 280px 70px rgba(236, 230, 216, .06);
  animation: glowShift 7s ease-in-out infinite alternate-reverse;
}
.s-glow__frame::after {
  box-shadow:
    inset 0 0 70px 14px rgba(214, 220, 182, .34),
    inset 0 0 160px 46px rgba(94, 110, 62, .42),
    inset 0 0 300px 80px rgba(236, 230, 216, .08);
  opacity: 0;
  animation: glowShift 7s ease-in-out infinite alternate;
}
@keyframes glowShift { from { opacity: 0; } to { opacity: 1; } }
.s-glow__frame > * { position: relative; z-index: 1; }
.s-glow__k { font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-2); margin-bottom: 14px; }
.s-glow__title { font-size: clamp(48px, 7.5vw, 124px); font-weight: 700; letter-spacing: -.055em; line-height: .95; }
.s-glow__row { width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; text-align: left; }
.s-glow__side { max-width: 360px; font-size: var(--fs-isi); line-height: 1.6; color: var(--muted-d); }

/* ---------- 8. KONTAK ---------- */
.s-contact { min-height: 100vh; padding: 18vh var(--pad) 30px; display: flex; flex-direction: column; gap: 40px; }
.s-contact__title { font-size: clamp(56px, 10vw, 170px); font-weight: 800; letter-spacing: -.065em; line-height: .88; }
.s-contact__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.footer { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line-d); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-ui); color: var(--muted-d); }

/* ---------- animasi muncul ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.is-in.selesai { transition: none; }   /* lepas lapisan animasi agar foto tetap tajam (lihat js/halaman.js) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .s-glow__frame::before { animation: none; opacity: 1; }
  .s-glow__frame::after { animation: none; opacity: 0; }
}

/* ---------- tablet & HP ---------- */
@media (max-width: 860px) {
  .nav__links, .nav__btn { display: none; }
  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: auto; width: 44px; height: 44px; padding: 0 12px;
    background: transparent; border: 1px solid currentColor; border-radius: 50%; color: inherit; cursor: pointer;
  }
  .nav__toggle span { height: 1.5px; background: currentColor; transition: transform .3s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  /* menu HP yang terbuka: lihat css/menu.css */

  /* keterangan foto: boleh turun baris di HP (tidak terpotong) */
  .s-cinema__cap { bottom: 18px; width: max-content; white-space: normal; text-align: center; line-height: 1.5; letter-spacing: .1em; border-radius: 18px; }

  /* kartu: geser horizontal biasa */

  .s-glow__frame { padding: 10vh 22px 32px; }
}

/* ---------- tombol WhatsApp melayang (HP & tablet) ----------
   Di laptop sudah ada ikon WhatsApp di tepi kiri & tombol Booking di menu, jadi tombol ini hanya untuk layar ≤ 1100px.
   Dibuat oleh js/halaman.js (pasangTombolWA). */
.wa-fab {
  position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 18;
  display: none; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 15px; border-radius: 999px;
  background: var(--amber); color: var(--on-amber); text-decoration: none;
  font-size: 15px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 12px 32px rgba(26, 19, 8, .32), 0 0 0 1px rgba(236, 230, 216, .18);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.wa-fab svg { flex: none; width: 24px; height: 24px; }
.wa-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wa-fab:active { transform: scale(.96); }
@media (max-width: 1100px) { .wa-fab { display: inline-flex; } }
/* HP & tablet (≤ 860px), semua halaman: bulat, hanya ikon, di kanan bawah */
@media (max-width: 860px) {
  .wa-fab { left: auto; right: 14px; width: 56px; min-height: 56px; padding: 0; gap: 0; justify-content: center; border-radius: 50%; }
  .wa-fab svg { width: 27px; height: 27px; }
  .wa-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* tablet: footer halaman selain beranda diberi ruang kanan untuk tombol bulat (HP ≤ 600px: footer rata tengah, lihat atas) */
@media (min-width: 601px) and (max-width: 860px) { footer.foot-light { padding-right: 68px; } }
@media (prefers-reduced-motion: reduce) { .wa-fab { transition: opacity .2s; transform: none; } }
@media print { .wa-fab { display: none !important; } }
