/* ==========================================================================
   Mes Esquisses — galeri seni grafis Muhardiansyah
   Bahasa visual: color-blocking ala abetkaua.com
   bleu #6f8db5 · moutarde #c9bb3f · crème #e8e4d9 · noir #0d0d0d
   ========================================================================== */

:root {
  --bleu: #6f8db5;
  --moutarde: #c9bb3f;
  --creme: #e8e4d9;
  --noir: #0d0d0d;
  --blanc: #ffffff;
  --encre: #111111;

  --display: "Unbounded", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--encre);
  background: var(--creme);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
#preloader {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: var(--noir);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.fini { opacity: 0; visibility: hidden; }

/* --------------------------------------------------------------------------
   Header adaptif
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(18px, 4vw, 44px);
  mix-blend-mode: normal;
  transition: color 0.35s ease;
  color: var(--encre);
}
.site-header.sombre { color: var(--creme); }
.site-header a {
  color: inherit; text-decoration: none;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-header .logo { font-weight: 700; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 34px); }
.site-header a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-header a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Hero · bleu
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--bleu);
  color: var(--encre);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding: 110px 20px 90px;
  overflow: hidden;
}
.kicker { opacity: 0.75; margin: 0 0 22px; }
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 13vw, 10.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center;
}
.hero h1 .word { display: block; overflow: hidden; }
.hero h1 .lettre {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero h1.joue .lettre { transform: none; }
.hero-sub {
  max-width: 46ch;
  margin: 26px auto 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

/* badge teks melingkar + wajah scratch */
.badge-circulaire {
  position: absolute;
  right: clamp(8px, 6vw, 90px);
  bottom: clamp(16px, 6vh, 70px);
  width: clamp(120px, 16vw, 200px);
  aspect-ratio: 1;
}
.badge-circulaire svg { width: 100%; height: 100%; animation: orbite 22s linear infinite; }
.badge-circulaire text {
  font-family: var(--mono); font-size: 15.5px; letter-spacing: 0.22em;
  fill: var(--encre); text-transform: uppercase;
}
.badge-face {
  position: absolute; inset: 22%;
  width: 56%; height: 56%; object-fit: contain;
  opacity: 0.9;
}
@keyframes orbite { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  color: var(--encre); text-decoration: none; opacity: 0.7;
}
.scroll-hint:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee-strip {
  background: var(--noir);
  color: var(--creme);
  overflow: hidden;
  padding: 16px 0;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: defiler 28s linear infinite; }
.marquee-track.slow { animation-duration: 40s; }
.marquee-track span {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@keyframes defiler { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Chapitres
   -------------------------------------------------------------------------- */
.chapitre { padding: clamp(70px, 10vw, 130px) clamp(18px, 5vw, 60px); }
.ch-visages { background: var(--blanc); }
.ch-lettres { background: var(--noir); color: var(--creme); }

.ch-head { max-width: 1100px; margin: 0 auto clamp(40px, 6vw, 70px); }
.ch-num { display: block; opacity: 0.6; margin-bottom: 10px; }
.chapitre h2, .statement blockquote {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 1;
  text-transform: uppercase;
}
.ch-sub { max-width: 52ch; margin: 18px 0 0; opacity: 0.8; }

/* reveal kata-per-kata untuk judul chapter */
.split-h2 .lettre {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.split-h2 .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split-h2.joue .lettre { transform: none; }

/* --------------------------------------------------------------------------
   Kartu flip 3D
   -------------------------------------------------------------------------- */
.cartes {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(14px, 2.5vw, 26px);
}
.lettres-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.carte {
  all: unset;
  cursor: pointer;
  perspective: 1600px;
  aspect-ratio: 1;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.carte.visible { opacity: 1; transform: none; }
.carte:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 4px; }

.carte-inner {
  position: relative; display: block;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.carte:hover .carte-inner,
.carte.tournee .carte-inner { transform: rotateY(180deg); }

.carte-front, .carte-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  overflow: hidden;
}
.carte-front img { width: 100%; height: 100%; object-fit: cover; }
.carte-noire .carte-front { background: #000; }

.carte-back {
  transform: rotateY(180deg);
  background: var(--creme);
  color: var(--encre);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.carte-back b {
  font-family: var(--display); font-weight: 600;
  font-size: 1.15rem; text-transform: uppercase; line-height: 1.1;
}
.carte-back i { font-style: normal; font-size: 0.9rem; opacity: 0.8; }
.carte-back em {
  font-family: var(--mono); font-style: normal; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 3px 10px; margin-top: auto;
}

.hint { max-width: 1100px; margin: 26px auto 0; opacity: 0.5; }

/* --------------------------------------------------------------------------
   Interlude & band
   -------------------------------------------------------------------------- */
.interlude { background: var(--blanc); overflow: hidden; }
.interlude img { width: 100%; will-change: transform; }
.kufi-band { margin-top: clamp(50px, 8vw, 90px); overflow: hidden; }
.kufi-band img { width: 100%; will-change: transform; }

/* --------------------------------------------------------------------------
   Statement · moutarde
   -------------------------------------------------------------------------- */
.statement {
  background: var(--moutarde);
  color: var(--encre);
  text-align: center;
  padding: clamp(80px, 12vw, 150px) clamp(18px, 5vw, 60px);
}
.statement blockquote { max-width: 16ch; margin: 0 auto; }
.statement p { max-width: 52ch; margin: 26px auto 34px; }
.btn-suivre {
  display: inline-block;
  font-family: var(--display); font-weight: 600;
  font-size: 0.95rem; text-transform: uppercase;
  color: var(--creme); background: var(--noir);
  text-decoration: none;
  padding: 16px 30px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-suivre:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.btn-suivre:focus-visible { outline: 3px solid var(--noir); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Reveal generik
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.kicker.reveal { transition-delay: 0.15s; }
.hero-sub.reveal { transition-delay: 0.45s; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--noir); color: var(--creme); }
.footer-marquee { border-top: 1px solid rgba(232, 228, 217, 0.15); padding: 26px 0; }
.footer-marquee span { font-size: clamp(1.6rem, 5vw, 3.2rem); font-weight: 800; opacity: 0.92; }
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding: 22px clamp(18px, 4vw, 44px) 30px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a, .footer-row .mono { color: var(--creme); }
.footer-links a {
  text-decoration: none; font-family: var(--mono);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   Responsif & motion
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .badge-circulaire { display: none; }
  .cartes { grid-template-columns: repeat(2, 1fr); }
  .lettres-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .badge-circulaire svg { animation: none; }
  .hero h1 .lettre, .split-h2 .lettre { transform: none; transition: none; }
  .carte, .reveal { opacity: 1; transform: none; transition: none; }
  .carte-inner { transition-duration: 0.01s; }
  .interlude img, .kufi-band img { transform: none !important; }
}
