/* ===== WARNA & RESET ===== */
:root {
  --luar: #3b0714;
  --marun: #4b0f1e;
  --krem: #f7ece8;
  --krem-tua: #ecdcd6;
  --teks: #4a0d1a;
  --pudar: #b9a09c;
  --garis: #dcc7c1;
  --meja: #6e5a46;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  padding: 40px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--teks);
  background-color: var(--luar);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.halaman { max-width: 1200px; margin: 0 auto; background-color: var(--krem); }

/* ===== TOMBOL ===== */
.tombol {
  display: inline-block;
  padding: 10px 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--krem);
  background-color: var(--marun);
  border: 1px solid var(--marun);
  transition: background-color 0.3s, color 0.3s;
}
.tombol:hover { background-color: transparent; color: var(--marun); }

.tombol-putih { color: var(--marun); background-color: #ffffff; border-color: #ffffff; }
.tombol-putih:hover { background-color: transparent; color: #ffffff; }

/* ===== NAVBAR ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 3.5vw;
  color: var(--krem);
  background-color: var(--marun);
}

.nav-menu { flex: 1; display: flex; gap: 28px; }
.nav-kanan { flex: 1; display: flex; justify-content: flex-end; }

.nav-link {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav-link:hover { border-bottom-color: var(--krem); }

.nav-logo {
  padding: 4px 22px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 23px;
  border: 1px solid rgba(247, 236, 232, 0.6);
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s;
}
.nav-logo:hover { background-color: var(--krem); color: var(--marun); }

/* ===== HEADER ===== */
#header { text-align: center; color: var(--krem); background-color: var(--marun); }

.hero-atas {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 30px 3.5vw 34px;
}

.hero-judul {
  grid-column: 2;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(42px, 6.8vw, 90px);
  line-height: 0.98;
}

#header > .tombol { margin-bottom: 40px; }

/* pita cokelat tempat logo berdiri, tidak menimpa tulisan */
.hero-meja {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5vw;
  padding: 40px 3.5vw 46px;
  background-color: var(--meja);
}

.meja-teks { flex: 1; max-width: 270px; font-size: 14px; color: var(--krem); }
.meja-kiri { text-align: right; }
.meja-kanan { text-align: left; }
.hero-logo { width: auto; height: clamp(180px, 24vw, 300px); object-fit: contain; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.45)); transition: transform 0.5s; }
.hero-logo { animation: melayang 4s ease-in-out infinite; }
.hero-logo:hover { animation-play-state: paused; filter: drop-shadow(0 34px 30px rgba(0, 0, 0, 0.6)); }

/* ===== ISI ===== */
.isi { padding: 0 3.5vw 70px; }
.seksi { padding-top: 64px; }

.kepala-seksi { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.judul-skrip { font-family: 'La Belle Aurore', cursive; font-weight: 400; font-size: 33px; margin-bottom: 18px; }
.kepala-seksi .judul-skrip { margin-bottom: 0; }
.deskripsi { max-width: 76ch; margin-bottom: 28px; font-size: 14px; }

/* ===== PROFIL ===== */
.profil-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 12px; }

.kartu-besar { padding: 24px 24px 30px; text-align: center; background-color: var(--krem-tua); }

.bentuk {
  height: 21vw;
  min-height: 240px;
  margin-bottom: 20px;
  overflow: hidden;
  background-color: var(--marun);
  border-radius: 45% 45% 12% 12% / 32% 32% 8% 8%;
}
.bentuk img { transition: transform 0.6s; }
.kartu-besar:hover .bentuk img { transform: scale(1.08); }

.kartu-judul { font-size: 15px; font-weight: 500; text-transform: uppercase; }
.kartu-teks { max-width: 300px; margin: 8px auto 0; font-size: 12px; }

.kisi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile-foto { aspect-ratio: 1; overflow: hidden; }
.tile-foto img { transition: transform 0.6s; }
.tile:hover .tile-foto img { transform: scale(1.08); }
.tile figcaption { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; text-transform: uppercase; }

/* ===== MATERI ===== */
.daftar { border-bottom: 1px solid var(--garis); }

.baris {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0;
  border-top: 1px solid var(--garis);
  transition: padding-left 0.4s, background-color 0.4s;
}
.baris:hover { padding-left: 16px; background-color: var(--krem-tua); }

.baris-foto { flex: 0 0 110px; width: 110px; height: 64px; transition: flex-basis 0.5s, width 0.5s; }
.baris:hover .baris-foto { flex-basis: 260px; width: 260px; }
.baris-teks { flex: 1; min-width: 0; max-width: 240px; font-size: 11px; }
.baris-judul { flex: 0 0 46%; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.2; transition: letter-spacing 0.3s; }
.baris-judul::after { content: "\2192"; margin-left: 12px; opacity: 0; transition: opacity 0.3s, margin-left 0.3s; }
.baris:hover .baris-judul { font-style: italic; letter-spacing: 0.02em; }
.baris:hover .baris-judul::after { opacity: 1; margin-left: 28px; }

/* ===== KEUNGGULAN ===== */
.deret-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.card { transition: transform 0.4s; }
.card:hover { transform: translateY(-8px); }

.card-foto { aspect-ratio: 1 / 1.05; overflow: hidden; }
.card-foto img { transition: transform 0.6s; }
.card:hover .card-foto img { transform: scale(1.08); }

.card-kepala { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; }
.card-kepala h3 { font-size: 13px; font-weight: 500; }

.card-baris { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 11px; border-top: 1px solid var(--garis); transition: background-color 0.3s, padding 0.3s; }
.card-baris i { font-style: normal; color: var(--pudar); }
.card-baris b { font-weight: 400; text-align: right; }

/* ===== FOOTER ===== */
#kontak { padding: 50px 3.5vw 24px; color: var(--krem); background-color: var(--marun); }
.footer-wrap { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(247, 236, 232, 0.3); }
.footer-brand { font-family: 'Instrument Serif', serif; font-size: 48px; line-height: 1.1; }
.footer-teks { max-width: 350px; margin-top: 8px; font-size: 12px; }
.footer-link { border-bottom: 1px solid var(--krem); transition: opacity 0.3s; }
.footer-link:hover { opacity: 0.6; }
.footer-hak { margin-top: 20px; font-size: 11px; text-align: center; opacity: 0.7; }

/* ===== RESPONSIF (HP) ===== */
@media (max-width: 800px) {
  body { padding: 0; }
  #navbar { flex-wrap: wrap; gap: 12px; }
  .nav-menu { flex-wrap: wrap; gap: 14px; }
  .hero-atas { grid-template-columns: 1fr; }
  .hero-judul { grid-column: 1; }
  .hero-meja { flex-direction: column; gap: 16px; }
  .meja-kiri, .meja-kanan { max-width: none; text-align: center; }
  .profil-grid, .deret-card { grid-template-columns: 1fr; }
  .baris-foto, .baris:hover .baris-foto { flex-basis: 80px; width: 80px; }
  .baris-teks { display: none; }
  .baris-judul { flex: 1; }
  .footer-wrap { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===== INTERAKSI TAMBAHAN ===== */

/* garis progres scroll di paling atas (Chrome/Edge) */
@supports (animation-timeline: scroll()) {
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    height: 5px;
    background-color: var(--pudar);
    transform: scaleX(0);
    transform-origin: left;
    animation: progres linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progres { to { transform: scaleX(1); } }
}

/* judul hero naik saat halaman dibuka */
.hero-judul { animation: naik 1s ease-out both; }
@keyframes naik { from { opacity: 0; transform: translateY(40px); } }

@keyframes melayang {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

/* bagian muncul pelan saat di-scroll */
@supports (animation-timeline: view()) {
  .kepala-seksi, .deskripsi, .profil-grid, .daftar, .deret-card, .tanya-daftar, #materi .judul-skrip, #tanya .judul-skrip {
    animation: muncul linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
  @keyframes muncul { from { opacity: 0; transform: translateY(60px); } }
}

/* teks berjalan */
.ticker { overflow: hidden; padding: 18px 0; color: var(--krem); background-color: var(--luar); }
.ticker-jalur { display: flex; width: max-content; animation: geser 30s linear infinite; }
.ticker:hover .ticker-jalur { animation-play-state: paused; }
@keyframes geser { to { transform: translateX(-50%); } }
.ticker span { display: flex; align-items: center; padding-left: 32px; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 28px; white-space: nowrap; }
.ticker span::after { content: ""; width: 8px; height: 8px; margin-left: 32px; background-color: var(--pudar); border-radius: 50%; }

.card-baris:hover { padding-left: 10px; background-color: var(--krem-tua); }
.tile figcaption { transition: padding 0.3s; }
.tile:hover figcaption { padding: 0 8px; }

/* tanya jawab */
.tanya-daftar { border-bottom: 1px solid var(--garis); }
.tanya { border-top: 1px solid var(--garis); }

.tanya summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 2.6vw, 32px);
  cursor: pointer;
  list-style: none;
  transition: padding-left 0.3s, font-style 0.3s;
}
.tanya summary::-webkit-details-marker { display: none; }
.tanya summary::after { content: "+"; font-family: 'IBM Plex Mono', monospace; font-size: 24px; transition: transform 0.3s; }
.tanya summary:hover { padding-left: 14px; font-style: italic; }
.tanya[open] summary::after { transform: rotate(45deg); }
.tanya p { max-width: 70ch; padding: 0 0 20px; font-size: 14px; animation: buka 0.4s ease-out; }
@keyframes buka { from { opacity: 0; transform: translateY(-10px); } }