/* =========================================================
   BASE — token desain, reset, tipografi, utilitas, tombol
   Palet: Merah Maroon · Emas · Kilau Perak · Gading
   ========================================================= */

/* @fonts:start — dihasilkan tools/fetch-fonts.py, jangan diedit manual.
   Font self-host (Google Fonts, SIL Open Font License — lihat assets/fonts/LICENSE-*.txt).
   Font variabel: satu file per gaya & subset mencakup seluruh rentang bobot. */
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 500;
  font-display: block;
  src: url('../assets/fonts/cormorant-garamond-italic-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 500;
  font-display: block;
  src: url('../assets/fonts/cormorant-garamond-italic-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 500;
  font-display: block;
  src: url('../assets/fonts/cormorant-garamond-normal-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 500;
  font-display: block;
  src: url('../assets/fonts/cormorant-garamond-normal-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/montserrat-normal-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/montserrat-normal-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* @fonts:end */


:root {
  /* Warna inti — merah maroon, emas, perak, gading */
  --wine: #6e1426;              /* merah maroon utama (judul di latar terang) */
  --wine-bright: #8c1d33;       /* maroon untuk teks kecil di latar terang (kontras 7.9:1) */
  --wine-deep: #4a0a18;
  --wine-night: #2c040d;
  --gold: #d4a947;
  --gold-soft: #e9cf8a;
  --gold-light: #f6e3a8;
  --gold-deep: #a67c2e;
  --gold-ink: #86621f;          /* emas untuk teks di latar terang (kontras 4.9:1 di atas gading) */
  --silver: #dcdee5;
  --silver-light: #eef0f4;
  --silver-deep: #a4a7b2;
  --champagne: #f4e8d6;
  --pearl: #fcf8f2;
  --ivory: #f7efe3;
  --ink: #3a0d18;
  --ink-soft: #6a3a44;
  --on-dark: #fbf5ef;
  --on-dark-soft: rgba(251, 245, 239, .8);

  /* Alias nama token lama (palet dusty rose sebelumnya) → dipetakan ke palet maroon-emas-perak */
  --rose: var(--silver);
  --rose-soft: var(--silver-light);
  --rose-ink: var(--wine-bright);
  --blush: var(--champagne);

  /* Gradien metalik */
  /* emas foil untuk teks di atas latar gelap/foto — tanpa titik gelap agar kontras terjaga di seluruh huruf */
  --grad-gold: linear-gradient(100deg, #d9b25a 0%, #fbe7ae 20%, #e2bd67 38%, #fff6d8 50%, #e2bd67 62%, #cfa24a 80%, #f6e3a8 100%);
  --grad-gold-btn: linear-gradient(135deg, #f7e4a9 0%, #e6c26c 34%, #c9973a 68%, #efd48f 100%);
  /* emas lebih pekat untuk teks besar di latar terang (tetap terbaca di seluruh gradien) */
  --grad-gold-ink: linear-gradient(100deg, #86621f 0%, #b88a33 26%, #d4a947 44%, #94701f 58%, #c49a3e 78%, #86621f 100%);
  /* perak berkilau */
  --grad-silver: linear-gradient(100deg, #a4a7b2 0%, #f7f8fa 32%, #c6c9d2 52%, #ffffff 64%, #b5b8c2 82%, #eceef2 100%);
  --grad-rose-gold: linear-gradient(120deg, var(--gold-soft), var(--silver-light) 55%, var(--gold));
  /* bingkai metalik: emas → perak → emas */
  --grad-frame: linear-gradient(145deg, #f6e3a8, #dcdee5 30%, #ffffff 46%, #c9973a 72%, #f1d78f 100%);

  /* Brokat emas (damask) halus untuk section maroon */
  --damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23e9cf8a' stroke-opacity='.085' stroke-width='1'%3E%3Cpath d='M48 4 92 48 48 92 4 48Z'/%3E%3Cpath d='M48 20c10 12 10 19 0 28-10-9-10-16 0-28ZM48 76c10-12 10-19 0-28-10 9-10 16 0 28ZM20 48c12-10 19-10 28 0-9 10-16 10-28 0ZM76 48c-12-10-19-10-28 0 9 10 16 10 28 0Z'/%3E%3Ccircle cx='48' cy='48' r='2.5'/%3E%3Ccircle cx='0' cy='0' r='4'/%3E%3Ccircle cx='96' cy='0' r='4'/%3E%3Ccircle cx='0' cy='96' r='4'/%3E%3Ccircle cx='96' cy='96' r='4'/%3E%3C/g%3E%3C/svg%3E");
  /* Debu glitter perak (statis — digambar sekali, tanpa animasi) */
  --glitter:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .7) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 64% 38%, rgba(226, 229, 238, .6) 0 .7px, transparent 1.3px),
    radial-gradient(circle at 36% 74%, rgba(255, 255, 255, .55) 0 .9px, transparent 1.5px),
    radial-gradient(circle at 84% 86%, rgba(246, 227, 168, .55) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .45) 0 1.1px, transparent 1.8px);

  /* Tipografi */
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", Georgia, serif;
  --font-body: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Ruang & bentuk */
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(4.5rem, 13vw, 8.5rem);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 18px 50px -24px rgba(110, 20, 38, .35);
  --shadow-card: 0 30px 70px -40px rgba(74, 10, 24, .45), 0 2px 10px -4px rgba(74, 10, 24, .08);
  --ease-lux: cubic-bezier(.22, .61, .36, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);

  --dock-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* Tekstur halus (noise SVG, dirender sekali sebagai tile) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .08 0 0 0 0 .14 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  overflow-x: hidden;           /* pengaman overflow horizontal */
}
/* PENTING: jangan pakai scroll-behavior: smooth global — mengganggu auto-scroll berbasis rAF. */
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--pearl);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
img, picture, svg, video, iframe { display: block; max-width: 100%; }
/* <picture> di dalam wadah media harus mengisi penuh agar object-fit: cover bekerja */
.cover__media picture, .hero__media picture, .bg-media picture, .arch__frame picture {
  width: 100%;
  height: 100%;
}
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p, h1, h2, h3, h4, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.noscript-note {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  padding: 12px 16px; border-radius: 12px; background: var(--wine); color: var(--on-dark);
  font-size: 13px; text-align: center;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }
.container--wide { max-width: 1280px; }

section { position: relative; }

/* Render bertahap: section di bawah sampul belum di-layout sampai sampul tampil (js/components/deferred.js).
   Memakai display:none (bukan content-visibility) agar kemunculannya tidak terhitung sebagai layout shift. */
.js:not(.boot-failed) [data-defer] { display: none; }
.section--light, .section--blush, .section--pearl, .section--maroon { padding-block: var(--section-y); overflow: hidden; }
.section--light {
  background:
    radial-gradient(90% 55% at 0% 0%, rgba(206, 209, 218, .26), transparent 62%),
    radial-gradient(80% 50% at 100% 100%, rgba(212, 169, 71, .14), transparent 62%),
    var(--noise),
    var(--pearl);
}
.section--blush {
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(233, 207, 138, .22), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(220, 222, 229, .35), transparent 60%),
    var(--noise),
    linear-gradient(180deg, var(--champagne), #f9f1e6 60%, var(--pearl));
}
.section--pearl {
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(212, 169, 71, .12), transparent 70%),
    var(--noise),
    var(--ivory);
}
.section--dark {
  color: var(--on-dark);
  background: var(--wine-night);
  overflow: hidden;
  isolation: isolate;
}
/* Maroon beludru + brokat emas + debu glitter perak — section "mewah" dengan teks terang */
.section--maroon {
  color: var(--on-dark);
  isolation: isolate;
  background:
    radial-gradient(110% 55% at 50% 0%, rgba(160, 30, 55, .55), transparent 65%),
    radial-gradient(90% 45% at 50% 100%, rgba(212, 169, 71, .16), transparent 70%),
    var(--damask),
    var(--noise),
    linear-gradient(180deg, #5a0c1f 0%, var(--wine-deep) 45%, var(--wine-night) 100%);
  /* garis tepi emas tipis → batas section tegas & mewah */
  box-shadow: inset 0 1px 0 rgba(233, 207, 138, .45), inset 0 -1px 0 rgba(233, 207, 138, .3);
}
.section--maroon::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: var(--glitter);
  background-size: 150px 150px, 210px 210px, 260px 260px, 180px 180px, 330px 330px;
  opacity: .85;
  pointer-events: none;
}
.section--maroon > .sparkles { z-index: -1; }

/* ---------- Tipografi ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold-ink);
  line-height: 1.6;
}
.eyebrow--light { color: var(--gold-soft); }

.section-head { text-align: center; margin-bottom: clamp(2.5rem, 7vw, 4rem); }
.section-head .eyebrow { margin-bottom: .9rem; }
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.35rem, 9vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: .01em;
  color: var(--wine);
  text-wrap: balance;
}
.section-title--light { color: var(--on-dark); }
/* Judul di section maroon: emas foil (+ kilau saat tampil, lihat motion.css); eyebrow perak */
.section--maroon .eyebrow { color: var(--silver); }
.section--maroon .section-title {
  background: var(--grad-gold);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: .08em;
}
.section--maroon .section-sub, .section--maroon .lead { color: var(--on-dark-soft); }
.section-sub {
  margin: 1.2rem auto 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 14px;
}
.lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.6vw, 1.55rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Nama bergaya display (emas metalik) */
.display-names {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .14em;
  line-height: .95;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.display-names .amp {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300;
  font-size: .62em;
  line-height: 1.1;
}
.text-gold {
  background: var(--grad-gold);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Ornamen pemisah: garis emas + berlian + titik perak */
.ornament {
  position: relative;
  width: 180px;
  height: 14px;
  margin: 1.35rem auto 0;
}
.ornament::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, transparent 44%, transparent 56%, var(--gold) 70%, transparent);
}
.ornament::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, var(--gold-light), transparent 60%);
  box-shadow: -22px 22px 0 -3px var(--silver-deep), 22px -22px 0 -3px var(--silver-deep);
}
.ornament--light::before, .section--maroon .ornament::before { background: linear-gradient(90deg, transparent, var(--gold-soft) 30%, transparent 44%, transparent 56%, var(--gold-soft) 70%, transparent); }
.ornament--light::after, .section--maroon .ornament::after { border-color: var(--gold-soft); box-shadow: -22px 22px 0 -3px var(--silver), 22px -22px 0 -3px var(--silver); }

/* ---------- Tombol ---------- */
.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: var(--btn-h);
  padding: 0 1.6em;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform .35s var(--ease-lux), box-shadow .35s var(--ease-lux), background-color .35s, color .35s, border-color .35s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn--sm { --btn-h: 44px; font-size: 11px; padding: 0 1.3em; }
.btn--lg { --btn-h: 54px; font-size: 12.5px; padding: 0 2.1em; }

.btn--gold {
  color: var(--wine-deep);
  background: var(--grad-gold-btn);
  box-shadow: 0 10px 30px -12px rgba(212, 169, 71, .75), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(120, 84, 30, .25);
}
/* kilau yang menyapu tombol */
.btn--gold::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-lux);
}
.btn--gold:hover::after, .btn--gold:focus-visible::after { transform: translateX(120%); }
.btn--gold:hover { box-shadow: 0 16px 40px -14px rgba(212, 169, 71, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
/* Kilau perak yang menyapu tombol utama secara berkala (hanya transform → ringan di HP) */
.btn--shine::after { animation: btn-sheen 4.8s var(--ease-lux) 2.2s infinite; }

.btn--outline {
  color: var(--wine);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(166, 124, 46, .55);
}
.btn--outline:hover { background: #fff; border-color: var(--gold-deep); }

.btn--ghost {
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid rgba(233, 207, 138, .4);
}
.btn--ghost:hover { border-color: var(--gold-soft); background: rgba(233, 207, 138, .08); }

.btn--glass {
  color: var(--on-dark);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
}
.btn--glass:hover { background: rgba(255, 255, 255, .18); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 2rem;
}

/* ---------- Kartu mewah (bingkai gradien emas) ---------- */
.lux-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 252, 248, .86)) padding-box,
    var(--grad-frame) border-box;
  box-shadow: var(--shadow-card);
}
.section--maroon .lux-card { box-shadow: 0 34px 70px -38px rgba(0, 0, 0, .85), 0 0 0 1px rgba(233, 207, 138, .12); }
.lux-card::before {
  /* bingkai dalam tipis */
  content: "";
  position: absolute; inset: 8px;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(212, 169, 71, .28);
  pointer-events: none;
}

/* ---------- Media latar section gelap ---------- */
.bg-media {
  position: absolute; inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--wine-night);
}
.bg-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.bg-media::after {
  /* overlay cukup pekat di pita teks: teks krem tetap ≥ 4.5:1 bahkan di atas piksel foto paling terang */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 30%, rgba(22, 2, 7, .55) 100%),
    linear-gradient(180deg, rgba(44, 4, 13, .82) 0%, rgba(84, 12, 30, .72) 45%, rgba(44, 4, 13, .88) 100%);
}

/* Gambar gagal dimuat → latar gradien elegan (tanpa ikon rusak) */
.img-failed {
  background: linear-gradient(135deg, var(--silver-light), var(--gold-soft) 60%, var(--silver)) !important;
}
.img-failed img { opacity: 0 !important; }
