/* =========================================================
   FZM Production — base.css
   Token desain (docs: DESIGN FZM), tipografi, tombol, form,
   badge, dan animasi bersama. Flat color: tanpa gradasi,
   tanpa bayangan dekoratif (kecuali navbar kapsul).
   ========================================================= */

/* Open Sauce One (SIL OFL, disimpan lokal karena tidak ada di Google Fonts) */
@font-face { font-family: "Open Sauce One"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sauce-one-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce One"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/open-sauce-one-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce One"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sauce-one-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce One"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sauce-one-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce One"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/open-sauce-one-latin-800-normal.woff2") format("woff2"); }

:root {
  /* Warna */
  --bg: #FAFAFA;             /* latar halaman */
  --surface: #FFFFFF;        /* kartu, navbar, input */
  --white: #FFFFFF;
  --paper: #FAFAFA;
  --paper-2: #F2F2F2;
  --ink: #101010;            /* teks, tombol gelap, blok CTA */
  --ink-2: #1A1A1A;
  --ink-3: #262626;
  --muted: #5F5F5F;          /* teks sekunder (kontras 6.3:1 di #FAFAFA) */
  --muted-2: #8C8C8C;        /* hanya dekorasi / teks besar */
  --hairline: #E0E0E0;
  --line: #EDEDED;
  --line-2: #E0E0E0;
  --line-3: #CFCFCF;         /* garis input */
  --line-dark: rgba(255, 255, 255, .14);

  --red: #C2272D;            /* aksen & aksi utama */
  --red-ink: #C2272D;        /* teks merah di atas putih (5.9:1) */
  --red-hi: #E2474D;
  --red-deep: #8E1A1F;
  --red-soft: #F7E3E4;
  --red-line: #EAD0D2;
  --taken: #EAD0D2;          /* tanggal terisi di kalender */

  --tile-1: #E6E0D8; --tile-2: #D9DDE3; --tile-3: #EBD3D4;
  --tile-4: #DADADA; --tile-5: #E4D8D0; --tile-6: #D8E0DA;

  --ok-bg: #E4F1E7;  --ok-ink: #1C6B37;
  --dp-bg: #FBEFD9;  --dp-ink: #7A4A00;

  /* Nama lama tetap ada agar pemakai lama ikut datar */
  --g-red: var(--red);
  --g-dark: var(--ink);
  --g-ember: var(--ink);
  --g-light: var(--surface);
  --g-blush: var(--bg);
  --g-text: var(--ink);

  /* Tipografi */
  --font-body: "Open Sauce One", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: var(--font-body);

  /* Bentuk */
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-cta: 40px;
  --pill: 999px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --shadow-red: none;
  --shadow-nav: 0 10px 40px rgba(16, 16, 16, .12);   /* satu-satunya bayangan: navbar kapsul */

  /* Gerak */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.32, .72, 0, 1);      /* kurva lembar iOS */
  --bounce: cubic-bezier(.34, 1.4, .64, 1);    /* pantulan kecil ala macOS */
  --glass: rgba(255, 255, 255, .62);
  --glass-blur: saturate(180%) blur(20px);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);     /* perlambatan panjang yang tenang untuk animasi muncul */

  /* Tata letak */
  --container: 1360px;
  --gutter: clamp(20px, 3.5vw, 48px);
  --section: 160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.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; }

/* Label kecil: huruf kapital renggang (bukan nomor) */
.meta { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.meta-num { display: none; }
.text-gradient { color: var(--red-ink); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--red); }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 22px; height: 22px; flex-shrink: 0; color: var(--red); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }

/* ---------- Tombol ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: var(--pill); border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: 16px; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(.92); }
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn .arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-red { --bg: var(--red); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn-ghost:hover { filter: none; background: var(--ink); color: var(--white); }
.btn-light { --bg: var(--surface); --fg: var(--ink); --bd: var(--line-2); }
.btn-light:hover { filter: none; --bd: var(--ink); }
.btn-lg { min-height: 58px; padding: 0 34px; font-size: 18px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; filter: none; transform: none; }

.icon-btn {
  width: 44px; height: 44px; border-radius: var(--pill); border: 0; background: transparent; color: inherit;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .25s var(--ease);
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn:active { transform: scale(.9); transition-duration: .08s; }

/* Tautan dengan panah ↗ */
.link-arrow { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
.link-arrow::after { content: "↗"; display: inline-block; transition: transform .3s var(--ease); }
.link-arrow span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease), color .2s ease; }
.link-arrow:hover { color: var(--red-ink); }
.link-arrow:hover::after { transform: translate(2px, -2px); }
.link-arrow:hover span { background-size: 100% 1.5px; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: var(--pill); white-space: nowrap; background: var(--paper-2); color: var(--ink); }
.badge-pending   { background: var(--paper-2); color: var(--ink); }
.badge-confirmed { background: var(--ink); color: var(--white); }
.badge-completed { background: var(--ok-bg); color: var(--ok-ink); }
.badge-rejected, .badge-cancelled { background: var(--red-soft); color: #9E1B20; }
.badge-unpaid { background: var(--red-soft); color: #9E1B20; }
.badge-dp     { background: var(--dp-bg); color: var(--dp-ink); }
.badge-paid   { background: var(--ok-bg); color: var(--ok-ink); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-3);
  background: var(--surface); font-size: 16px; color: var(--ink); transition: border-color .15s ease;
}
.textarea { padding: 14px 16px; min-height: 120px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #8A8A8A; }
.input:hover, .select:hover, .textarea:hover { border-color: #A8A8A8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input.is-invalid, .textarea.is-invalid { border-color: var(--red-ink); box-shadow: 0 0 0 1px var(--red-ink); }
.field-error { font-size: 14px; font-weight: 500; color: #A3191F; }
.field-hint { font-size: 13px; color: var(--muted); }
.honeypot { position: absolute; left: -9999px; }

/* Chip pilihan (radio/checkbox bergaya pil) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--pill);
  border: 1.5px solid #D8D8D8; background: var(--surface); font-size: 15px; font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .25s var(--ease);
}
.chip:hover span { border-color: var(--ink); }
.chip:active span { transform: scale(.96); }
.chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Animasi ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* Muncul saat di-scroll (html.js): buram dulu, lalu menajam sambil memudar masuk dan naik pelan */
/* Memakai properti translate/scale terpisah agar tidak bentrok dengan transform efek hover.
   --d = urutan dalam daftar, memberi jeda bertingkat (stagger). */
.js [data-reveal] {
  opacity: 0; translate: 0 28px; filter: blur(9px);
  transition: opacity .9s var(--ease-out) calc(var(--d, 0) * 80ms), translate 1.1s var(--ease-out) calc(var(--d, 0) * 80ms),
    filter 1s var(--ease-out) calc(var(--d, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; translate: none; filter: none; }

/* Markup judul per baris tetap ada, tanpa animasi */
.line { display: block; }
.line > span { display: inline; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }

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

/* =========================================================
   Aksen merah untuk poin penting
   ========================================================= */
/* Label kecil di atas judul: merah dengan titik, tanpa nomor */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-ink); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
/* Angka, harga, dan frasa kunci */
.accent { color: var(--red-ink); }
strong.accent, b.accent { font-weight: 700; }

/* =========================================================
   Motion bersama
   ========================================================= */
/* Judul muncul kata per kata: dari buram menajam, memudar dan naik sedikit, berurutan lembut
   (site.js membungkus tiap kata dalam .w > span) */
.js [data-words] .w { display: inline-block; }
.js [data-words] .w > span {
  display: inline-block; opacity: 0; translate: 0 .25em; filter: blur(7px);
  transition: opacity .8s var(--ease-out) calc(var(--i, 0) * 45ms), translate 1s var(--ease-out) calc(var(--i, 0) * 45ms),
    filter .9s var(--ease-out) calc(var(--i, 0) * 45ms);
}
.js [data-words].is-in .w > span { opacity: 1; translate: none; filter: none; }

/* Foto masuk layar: buram & sedikit diperbesar, lalu perlahan menajam ke ukuran asli */
.js [data-clip] img { scale: 1.08; filter: blur(11px); transition: scale 1.8s var(--ease-out), filter 1.2s var(--ease-out); }
.js [data-clip].is-in img { scale: 1; filter: none; }
/* Paralaks halus: foto sedikit lebih tinggi dari bingkainya, digeser site.js lewat --py */
[data-parallax] { height: 110%; width: 100%; object-fit: cover; translate: 0 var(--py, -4.5%); will-change: translate; }

@media (prefers-reduced-motion: reduce) {
  .js [data-words] .w > span { opacity: 1; translate: none; filter: none; }
  .js [data-clip] img { scale: 1; filter: none; }
  [data-parallax] { height: 100%; translate: none; }
}

/* =========================================================
   Muncul mengikuti scroll (halaman publik, html.scroll-reveal)
   site.js mengisi --p (0 → 1) dari posisi elemen di layar setiap frame.
   Nilainya langsung dipetakan ke pudar, naik, dan blur, jadi efek selalu
   menempel pada gulir (cepat atau lambat) tanpa jeda. Transisi 0,15 dtk
   hanya meratakan lompatan roda mouse agar tetap halus.
   ========================================================= */
.scroll-reveal [data-reveal] {
  opacity: var(--p, 0);
  translate: 0 calc((1 - var(--p, 0)) * 28px);
  filter: blur(calc((1 - var(--p, 0)) * 9px));
  transition: opacity .15s linear, translate .15s linear, filter .15s linear;
}
.scroll-reveal [data-reveal].is-in { filter: none; }
/* Judul: kata-kata menyusul berurutan dalam rentang gulir yang sama (--t = urutan kata 0…1) */
.scroll-reveal [data-words] .w > span {
  --wp: clamp(0, calc(var(--p, 0) * 1.6 - var(--t, 0) * .6), 1);
  opacity: var(--wp);
  translate: 0 calc((1 - var(--wp)) * .25em);
  filter: blur(calc((1 - var(--wp)) * 7px));
  transition: opacity .15s linear, translate .15s linear, filter .15s linear;
}
.scroll-reveal [data-words].is-in .w > span { filter: none; }
/* Foto: menajam dan kembali ke ukuran asli seiring gulir */
.scroll-reveal [data-clip] img {
  scale: calc(1 + (1 - var(--p, 0)) * .08);
  filter: blur(calc((1 - var(--p, 0)) * 11px));
  transition: scale .15s linear, filter .15s linear;
}
.scroll-reveal [data-clip].is-in img { filter: none; }
