/* Lontaras — Hangat, lembut, beraksen merah Makassar. */
:root {
  --bg: #F6EFE4;
  --ink: #2B211B;
  --muted: #5A4B41;
  --accent: #B83227;
  --accent-dark: #8E2219;
  --card: #FFFDF9;
  --sage: #D9E3CD;
  --sage-deep: #7F9A6B;
  --blush: #F1C9B5;
  --gold: #E9B949;
  --sand: #EADFCB;
  --line: #E4D8C6;
  --pad: clamp(20px, 5vw, 72px);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Sans", system-ui, sans-serif;
  --r: 28px;
  --accent-hover: #8E2219;
  --gold-soft: #F6E3AE;
  --prod-shadow: #C5D2B6;
  --header-bg: rgba(246, 239, 228, 0.9);
  --header-shadow: 0 2px 12px rgba(43, 33, 27, 0.08);
  --foot-word: rgba(184, 50, 39, .13);
  color-scheme: light;
}

/* Tema gelap */
:root[data-theme="dark"] {
  --bg: #1A1411;
  --ink: #F3E9DC;
  --muted: #BFAF9F;
  --accent: #DC4A3E;
  --accent-dark: #F2A395;
  --accent-hover: #B8352B;
  --card: #2A201A;
  --sage: #222B1C;
  --sage-deep: #8FAA7A;
  --blush: #3A211B;
  --gold: #E9B949;
  --sand: #2A211B;
  --line: #3A2E26;
  --gold-soft: #4A3A18;
  --prod-shadow: #33402A;
  --header-bg: rgba(26, 20, 17, 0.9);
  --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --foot-word: rgba(220, 74, 62, .2);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.mono { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.08; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.brand { text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; }
.menu { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; font-weight: 500; }
.menu a { text-decoration: none; }
.menu a:not(.pill):hover { color: var(--accent); }
.pill { padding: 10px 20px; background: var(--accent); color: #fff; border-radius: 999px; font-weight: 700; transition: background .15s; }
.pill:hover { background: var(--accent-hover); }

/* Dekorasi */
.blob { position: absolute; pointer-events: none; }
.blob--sage { top: -120px; left: -100px; width: 380px; height: 340px; background: var(--sage); border-radius: 60% 40% 55% 45%; }
.blob--blush { bottom: -140px; right: -80px; width: 360px; height: 320px; background: var(--blush); border-radius: 45% 55% 40% 60%; }
.blob--gold { top: 46%; left: 38%; width: 120px; height: 110px; background: var(--gold); opacity: .35; border-radius: 55% 45% 50% 50%; }
.songket {
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M18 1 29 9 18 17 7 9Z' fill='none' stroke='%23B83227' stroke-width='1.6'/%3E%3Cpath d='M18 6 22 9 18 12 14 9Z' fill='%23E9B949'/%3E%3C/svg%3E") repeat-x center / 36px 18px;
  opacity: .85;
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 10vw, 128px) var(--pad) clamp(48px, 7vw, 96px); min-height: 84vh; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.eyebrow { margin: 0; color: var(--accent); position: relative; z-index: 1; }
.hero-title { font-size: clamp(2.5rem, 7vw, 6rem); letter-spacing: -0.025em; max-width: 15ch; position: relative; z-index: 1; font-variation-settings: "opsz" 144; }
.hero-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; position: relative; z-index: 1; }
.lead { max-width: 46ch; margin: 0; color: var(--muted); font-size: 1.15rem; }
.btn-row { display: flex; align-items: center; gap: 24px; }
.btn { display: inline-block; padding: 16px 32px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; border-radius: 999px; transition: background .15s, transform .15s; }
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.link { color: var(--accent-dark); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.link:hover { color: var(--accent); }

/* Sections */
.sec { padding: clamp(56px, 8vw, 112px) var(--pad); }
.sec-head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline; margin-bottom: clamp(32px, 5vw, 64px); }
.sec-head .mono { color: var(--accent); }
.sec-head h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); letter-spacing: -0.02em; }

/* Layanan */
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.row { display: flex; flex-direction: column; gap: 12px; padding: 32px; background: var(--card); border-radius: var(--r); box-shadow: 0 2px 0 var(--line); transition: transform .2s, box-shadow .2s; }
.row:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--line); }
.row .num { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--accent-dark); background: var(--blush); margin-bottom: 8px; }
.row:nth-child(2) .num { background: var(--sage); }
.row:nth-child(3) .num { background: var(--gold-soft); }
.row:nth-child(4) .num { background: var(--sand); }
.row h3 { font-size: clamp(1.35rem, 2.3vw, 1.75rem); }
.row p { margin: 0; color: var(--muted); }

/* Produk */
.ink { background: var(--sage); margin: 0 clamp(12px, 2.5vw, 32px); border-radius: 40px; }
.prods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.prod { display: flex; flex-direction: column; gap: 14px; padding: 32px; min-height: 260px; background: var(--card); color: var(--ink); border-radius: var(--r); box-shadow: 0 2px 0 var(--prod-shadow); }
.prod h3 { font-size: 1.8rem; }
.prod p { margin: 0; color: var(--muted); }
.tag { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--blush); color: var(--accent-dark); }
.status { margin-top: auto; font-size: .9rem; font-weight: 700; color: var(--accent-dark); }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--gold); }

/* Cara kerja */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; }
.steps li { counter-increment: s; padding: 28px; background: var(--card); border-radius: var(--r); border-top: 6px solid var(--accent); box-shadow: 0 2px 0 var(--line); font-size: 1.05rem; }
.steps li:nth-child(2) { border-top-color: var(--gold); }
.steps li:nth-child(3) { border-top-color: var(--sage-deep); }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--serif); font-weight: 700; font-size: 3rem; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.steps b { font-family: var(--serif); font-size: 1.4rem; }

/* Kontak */
.contact { position: relative; overflow: hidden; margin: 0 clamp(12px, 2.5vw, 32px) clamp(32px, 5vw, 64px); background: var(--blush); border-radius: 40px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.contact > * { position: relative; z-index: 1; }
.contact::after { content: ""; position: absolute; right: -90px; bottom: -110px; width: 320px; height: 290px; background: var(--gold); opacity: .4; border-radius: 55% 45% 50% 50%; }
.contact .mono { color: var(--accent-dark); }
.contact h2 { font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
.contact .lead { color: var(--ink); }
.mail { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 6vw, 4.6rem); letter-spacing: -0.02em; color: var(--accent-dark); text-decoration: none; border-bottom: 4px solid var(--accent); line-height: 1.1; overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); }

/* Footer */
.foot { background: var(--sand); color: var(--ink); padding: 40px var(--pad) 24px; overflow: hidden; }
.foot-word { font-family: var(--serif); font-weight: 700; font-size: clamp(4rem, 19vw, 17rem); line-height: .85; letter-spacing: -0.04em; color: var(--foot-word); user-select: none; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; font-size: .9rem; color: var(--muted); }

@media (max-width: 760px) {
  .menu { gap: 10px; }
  .menu a:not(.pill) { display: none; }
  .sec-head { grid-template-columns: 1fr; gap: 8px; }
  .hero { min-height: 74vh; }
  .ink, .contact { border-radius: 28px; }
  .row, .prod { padding: 26px; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main.page-in { animation: none; }
  * { transition: none !important; }
}

/* Toggle bahasa */
.lang { display: inline-flex; padding: 3px; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; }
.lang button { font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .06em; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Toggle tema */
.theme { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer; transition: background .15s; }
.theme:hover { background: var(--line); }
.theme svg { width: 18px; height: 18px; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }

/* Footer: tautan legal */
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: .9rem; }
.foot-links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot-links a:hover { color: var(--accent); border-color: var(--accent); }

/* Halaman legal (Kebijakan Privasi & Syarat Layanan) */
html[lang="en"] [data-l="id"], html:not([lang="en"]) [data-l="en"] { display: none; }
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--pad) clamp(56px, 8vw, 112px); }
.legal .back { display: inline-block; margin-bottom: 32px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
.legal .updated { margin: 12px 0 28px; color: var(--accent); }
.legal .doc { counter-reset: h; }
.legal h2 { counter-increment: h; font-size: 1.5rem; margin: 40px 0 12px; }
.legal h2::before { content: counter(h) ". "; color: var(--accent); }
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.legal li b { color: var(--ink); }

/* Transisi antar halaman */
main { transition: opacity .14s ease, transform .14s ease; }
main:focus { outline: none; }
main.page-out { opacity: 0; transform: translateY(6px); }
main.page-in { animation: page-in .28s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Progress bar di bawah navbar */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.progress.is-active { opacity: 1; }
.progress span { display: block; height: 100%; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 0 3px 3px 0; box-shadow: 0 0 8px var(--accent); transition: transform .25s ease-out; }

/* Preloader (muat awal): overlay di bawah header supaya progress bar tetap terlihat */
.preloader { position: fixed; inset: 0; z-index: 15; display: none; align-items: center; justify-content: center; background: var(--bg); transition: opacity .35s ease, visibility .35s ease; }
html.is-loading .preloader { display: flex; }
html.is-loading body { overflow: hidden; }
.preloader.is-hiding { opacity: 0; visibility: hidden; }
/* Saat pindah halaman: fade-in halus (fill "backwards" agar is-hiding tetap bisa menyembunyikan) */
.preloader.is-nav { animation: pre-in .18s ease backwards; }
@keyframes pre-in { from { opacity: 0; } to { opacity: 1; } }
.preloader-chip { padding: 18px 36px; border-radius: 999px; background: #2B211B; border: 1px solid transparent; box-shadow: 0 2px 0 var(--line), 0 14px 34px rgba(43, 33, 27, .18); }
:root[data-theme="dark"] .preloader-chip { background: #2A201A; border-color: var(--line); }

/* Teks terisi dari putih ke merah, kiri ke kanan, berulang */
.preloader-text {
  display: block;
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.25rem, 3.4vw, 1.75rem); letter-spacing: .01em; white-space: nowrap;
  color: #fff;
  background-image: linear-gradient(90deg, #FF4D3D 0 50%, #fff 50% 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pre-fill 1.8s ease-in-out infinite;
}
@keyframes pre-fill { 0% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .preloader-text { -webkit-text-fill-color: currentColor; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .preloader-text { animation: none; background-position: 0 0; }
}

/* Navbar mobile: tombol menu + panel turun. Desktop tidak berubah. */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .top { padding: 12px var(--pad); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer; }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, background .2s; }
  .nav-toggle .bars { position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .bars::before { top: -6px; }
  .nav-toggle .bars::after { top: 6px; }
  .top.is-open .nav-toggle .bars { background: transparent; }
  .top.is-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
  .top.is-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; grid-template-columns: 1fr auto; align-items: center; gap: 0; padding: 8px var(--pad) 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--header-shadow); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; }
  .top.is-open .menu { display: grid; }
  .menu a:not(.pill) { display: block; grid-column: 1 / -1; padding: 14px 2px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .pill { grid-column: 1 / -1; margin-top: 16px; padding: 13px 20px; text-align: center; }
  .lang { grid-column: 1; justify-self: start; margin-top: 16px; }
  .theme { grid-column: 2; margin-top: 16px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .top.is-open .menu { animation: menu-in .18s ease; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
