/* =============================================================
   AJL40 Microsite — Dunia Kreatif, Budaya Sebuah Negara
   Built on the AJL 40 Design System (Manrope + heritage gold)
   ============================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope.ttf') format('truetype-variations'),
       url('../assets/fonts/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');    font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Core palette — DS tokens */
  --ink:           #0E0D0B;
  --ink-raised:    #16140F;
  --ink-sunk:      #07060A;
  --ink-line:      #1F1C16;

  --gold:          #B8945A;
  --gold-bright:   #D4B073;
  --gold-deep:     #8A6E40;
  --gold-wash:     rgba(184,148,90,0.18);
  --gold-tint:     rgba(184,148,90,0.08);

  --bone:          #F1EADB;
  --ivory:         #F4EFE6;
  --ivory-80:      rgba(244,239,230,0.80);
  --ivory-60:      rgba(244,239,230,0.60);
  --ivory-40:      rgba(244,239,230,0.40);
  --ivory-20:      rgba(244,239,230,0.20);
  --ivory-10:      rgba(244,239,230,0.10);
  --ivory-05:      rgba(244,239,230,0.05);

  /* Per-era accents — muted editorial markers, not loud */
  --era-1: #B8945A;  /* Era Perintis — heritage gold */
  --era-2: #9F7BA8;  /* Prasasti Emas — dusty violet */
  --era-3: #5A8BB0;  /* Revolusi Muzik — slate blue */
  --era-4: #6FB0B5;  /* Pertarungan Jati Diri — patina teal */

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --tr-eyebrow:    0.22em;
  --tr-tight:      -0.025em;
  --tr-display:    -0.018em;

  --grain-opacity: 0.045;

  --ease-settle:   cubic-bezier(0.2, 0.6, 0.1, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --d-fast:        220ms;
  --d-base:        480ms;
  --d-slow:        800ms;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- Global film grain ---------- */
.grain::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- App shell ---------- */
.app {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  overflow: hidden;
}
.app__glow {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
}
.app__glow::before {
  content: ""; position: absolute;
  top: -10%; left: -10%;
  width: 60%; height: 50%;
  background: var(--gold);
  opacity: 0.04;
  filter: blur(140px);
  border-radius: 50%;
}
.app__glow::after {
  content: ""; position: absolute;
  bottom: -10%; right: -10%;
  width: 50%; height: 40%;
  background: var(--era-2);
  opacity: 0.035;
  filter: blur(120px);
  border-radius: 50%;
}
.app__main {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

/* ---------- TopNav ---------- */
.topnav {
  position: relative; z-index: 20;
  height: 64px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--ink-line);
  background: rgba(7,6,10,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topnav__left { display: flex; align-items: center; gap: 32px; min-width: 0; flex: 1 1 auto; }
.topnav__menu { display: flex; gap: 22px; flex-wrap: nowrap; }
@media (max-width: 1100px) { .topnav__menu { gap: 18px; } }
@media (max-width: 940px) { .topnav__menu { display: none; } }
.topnav__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--d-fast);
}
.topnav__brand:hover { color: var(--gold-bright); }
.topnav__brand-wordmark {
  height: 22px; width: auto;
  filter: brightness(0.95) sepia(0.3) hue-rotate(355deg) saturate(0.6);
  opacity: 0.9;
}
.topnav__item {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-40);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color var(--d-fast), border-color var(--d-fast);
}
.topnav__item:hover { color: var(--ivory); }
.topnav__item--active {
  color: var(--ivory);
  border-bottom-color: var(--gold);
}
.topnav__right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.topnav__disc {
  width: 32px; height: 32px;
  border: 1px solid var(--ivory-20);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ivory-60);
}
.topnav__disc svg { animation: spin 6s linear infinite; }
.topnav__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-40);
  white-space: nowrap;
}
.topnav__status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--status-live, #C84B3A);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px rgba(200,75,58,0.6);
  animation: pulse 2.4s var(--ease-settle) infinite;
}
@media (max-width: 1280px) { .topnav__status { display: none; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- Sidebar (decade rail) ---------- */
.sidebar {
  width: 88px;
  flex-shrink: 0;
  border-right: 1px solid var(--ink-line);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 0;
  position: relative; z-index: 20;
  background: rgba(7,6,10,0.4);
}
@media (max-width: 900px) { .sidebar { display: none; } }
.sidebar__act {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory-40);
  padding: 8px 4px;
  transition: color var(--d-fast);
}
.sidebar__act:hover { color: var(--ivory); }
.sidebar__act--active { color: var(--gold); }
.sidebar__divider {
  width: 1px;
  height: 32px;
  background: var(--ivory-10);
}

/* ---------- TimelineRail ---------- */
.timeline {
  position: relative; z-index: 20;
  height: 96px;
  flex-shrink: 0;
  display: flex; align-items: center;
  gap: 28px;
  padding: 0 40px;
  border-top: 1px solid var(--ink-line);
  background: var(--ink);
}
.timeline__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-40);
}
@media (max-width: 700px) { .timeline__label { display: none; } }
.timeline__rail {
  flex: 1 1 auto;
  height: 1px;
  background: var(--ivory-10);
  position: relative;
}
.timeline__progress {
  position: absolute;
  left: 0; top: -1px;
  height: 3px;
  background: linear-gradient(to right, var(--gold-deep), var(--gold));
  transition: width 800ms var(--ease-settle);
}
.timeline__node {
  position: absolute;
  top: -5px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ivory-20);
  border: 1px solid var(--ink);
  transform: translateX(-50%);
  transition: all var(--d-base) var(--ease-settle);
}
.timeline__node:hover { background: var(--ivory-60); }
.timeline__node--past { background: var(--gold-deep); }
.timeline__node--active {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(184,148,90,0.20);
  transform: translateX(-50%) scale(1.1);
}
.timeline__ticks {
  position: absolute;
  top: 14px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ivory-40);
  letter-spacing: 0.05em;
}
.timeline__meta {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.2;
}
.timeline__meta-years {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.08em;
}
.timeline__meta-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}
.timeline__play {
  width: 42px; height: 42px;
  border: 1px solid var(--ivory-20);
  display: flex; align-items: center; justify-content: center;
  color: var(--ivory-60);
  transition: background var(--d-fast), color var(--d-fast), border-color var(--d-fast);
}
.timeline__play:hover {
  background: var(--gold-tint);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ---------- Common view ---------- */
.view {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.view__inner {
  position: relative;
  z-index: 10;
  width: 100%;
}
.view__bg-number {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tr-tight);
  color: transparent;
  -webkit-text-stroke: 1px var(--ivory-10);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0); }
::-webkit-scrollbar-thumb { background: var(--ivory-10); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ivory-20); }

/* ---------- Overture ---------- */
.overture {
  position: relative;
  min-height: 100%;
}
.overture__hero {
  position: relative;
  min-height: calc(100vh - 64px - 96px);
  padding: 56px 56px 64px;
  display: flex; flex-direction: column;
}
@media (max-width: 700px) { .overture__hero { padding: 32px 24px; } }
.overture__bg-40 {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(280px, 38vw, 540px);
  letter-spacing: var(--tr-tight);
  color: transparent;
  -webkit-text-stroke: 1px rgba(184,148,90,0.10);
  line-height: 0.85;
  user-select: none;
  pointer-events: none;
}
.overture__content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 820px;
}
.overture__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
}
.overture__eyebrow::before {
  content: ""; width: 32px; height: 1px;
  background: var(--gold);
}
.overture__h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: var(--tr-tight);
  margin: 0 0 32px;
  color: var(--ivory);
}
.overture__h1 em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.overture__lede {
  font-size: 19px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ivory-80);
  max-width: 560px;
  margin: 0 0 40px;
  text-wrap: pretty;
}
.overture__ctas {
  display: flex; flex-wrap: wrap; gap: 16px;
}
.overture__scroll-cue {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; gap: 14px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--gold-wash);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--ivory-40);
}
.overture__scroll-cue::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(to right, var(--gold-wash), transparent);
}
.overture__scroll-cue-glyph {
  width: 28px; height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
  animation: bobDown 2.2s var(--ease-settle) infinite;
}
@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Essay sections after the hero */
.overture__essay {
  position: relative;
  padding: 96px 56px;
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
}
@media (max-width: 700px) { .overture__essay { padding: 64px 24px; } }
.overture__essay--raised { background: var(--ink-raised); }
.essay-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 980px) {
  .essay-inner { grid-template-columns: 220px 1fr; gap: 64px; align-items: start; }
}
.essay-meta {
  position: sticky;
  top: 24px;
  align-self: start;
}
@media (max-width: 979px) {
  .essay-meta { position: static; }
}
.essay-meta__no {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-wash);
}
.essay-meta__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-40);
  line-height: 1.5;
}
.essay-meta__label strong {
  display: block;
  font-weight: 700;
  color: var(--ivory-80);
  margin-bottom: 6px;
}
.essay-body {
  max-width: 680px;
}
.essay-body__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: var(--tr-tight);
  color: var(--ivory);
  margin: 0 0 32px;
}
.essay-body__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.essay-body p {
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ivory-80);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.essay-body p.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  float: left;
  line-height: 0.95;
  padding: 6px 12px 0 0;
  color: var(--gold);
}
.essay-body .pull {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ivory);
  padding: 16px 0 16px 28px;
  margin: 32px 0;
  border-left: 2px solid var(--gold);
  max-width: 600px;
}
.essay-body em.song { font-style: italic; color: var(--gold-bright); font-weight: 500; }

/* Acts preview strip — closes the overture */
.overture__preview {
  padding: 96px 56px 56px;
  border-top: 1px solid var(--ink-line);
  background: var(--ink);
}
@media (max-width: 700px) { .overture__preview { padding: 64px 24px 32px; } }
.preview-head {
  max-width: 1080px;
  margin: 0 auto 48px;
}
.preview-head h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: var(--tr-tight);
  color: var(--ivory);
  margin: 14px 0 0;
  line-height: 1.1;
}
.preview-head h3 em { font-style: italic; font-weight: 500; color: var(--gold); }
.preview-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 700px)  { .preview-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .preview-grid { grid-template-columns: repeat(4, 1fr); } }
.preview-card {
  position: relative;
  text-align: left;
  padding: 28px 26px 30px;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-top: 2px solid var(--era-accent, var(--gold));
  cursor: pointer;
  overflow: hidden;
  transition: background var(--d-fast), transform var(--d-fast);
}
.preview-card:hover { background: var(--ink-sunk); transform: translateY(-3px); }
.preview-card__numeral {
  position: absolute;
  right: -10px; bottom: -30px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 140px;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--era-accent, var(--gold));
  opacity: 0.10;
  pointer-events: none;
}
.preview-card__years {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--era-accent, var(--gold));
  margin-bottom: 14px;
  display: block;
}
.preview-card__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ivory);
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.preview-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ivory-60);
  margin: 0;
  position: relative;
  z-index: 2;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--ivory-20);
  color: var(--ivory);
  background: transparent;
  transition: background var(--d-fast), color var(--d-fast), border-color var(--d-fast);
}
.btn:hover { background: var(--ivory-05); border-color: var(--ivory-40); }
.btn--gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn--gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); }
.btn--ghost { background: transparent; }

/* ---------- Eyebrow utility ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Common animation ---------- */
/* Mount-time fade. Animations use forward fill so they end + stay at opacity:1.
   We also keyframe-start at opacity:0 only when the .anim-on class is on body,
   so static renders (screenshots, no-JS) see the final state. */
.fade-in, .fade-up { opacity: 1; transform: none; }
body.anim-on .fade-in { animation: fadeIn 680ms var(--ease-out) both; opacity: 0; }
body.anim-on .fade-up { animation: fadeUp 800ms var(--ease-out) both; opacity: 0; transform: translateY(16px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
body.anim-on .delay-1 { animation-delay: 80ms; }
body.anim-on .delay-2 { animation-delay: 200ms; }
body.anim-on .delay-3 { animation-delay: 360ms; }
body.anim-on .delay-4 { animation-delay: 540ms; }
body.anim-on .delay-5 { animation-delay: 720ms; }
