/* ==========================================================================
   MediaIslamNet — Voice of Islam landing page
   Token system: charcoal + gold (derived from brand logo), broadcast/
   waveform motif referencing the program's radio heritage.
   ========================================================================== */

:root {
  /* Color */
  --ink: #15120E;
  --charcoal: #201B15;
  --charcoal-soft: #2B241C;
  --charcoal-line: #3A3226;
  --cream: #F5EFE2;
  --cream-dim: #C9C0AC;
  --gold: #C99A3D;
  --gold-bright: #E7C170;
  --gold-dim: rgba(201, 154, 61, 0.16);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(32, 27, 21, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--charcoal-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 400;
  margin-top: 1px;
}

.main-nav { display: flex; gap: 28px; }

.main-nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--cream-dim);
  transition: color 0.2s ease;
}

.main-nav a:hover, .main-nav a:focus-visible { color: var(--gold-bright); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 64px;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.hero::before {
  /* faint geometric star motif, restrained */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.05;
  background-image:
    linear-gradient(30deg, var(--gold) 1px, transparent 1px),
    linear-gradient(150deg, var(--gold) 1px, transparent 1px),
    linear-gradient(270deg, var(--gold) 1px, transparent 1px);
  background-size: 64px 110px;
}

.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, var(--gold-dim), transparent 70%);
  z-index: -1;
}

.hero .eyebrow { margin-bottom: 22px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 92px);
  line-height: 1.02;
  margin: 0 0 18px;
  color: var(--cream);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
}

.hero p.tagline {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--cream-dim);
  font-size: 18px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-bright); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--charcoal-line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Waveform — signature element */
.waveform {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 56px;
  max-width: 420px;
  margin: 0 auto;
}

.waveform span {
  display: block;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  animation: wave 1.4s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes wave {
  0%, 100% { height: 14%; }
  50% { height: 100%; }
}

/* Randomized-feeling delays/durations for a natural waveform */
.waveform span:nth-child(1)  { animation-duration: 1.1s; animation-delay: -0.9s; }
.waveform span:nth-child(2)  { animation-duration: 1.6s; animation-delay: -0.2s; }
.waveform span:nth-child(3)  { animation-duration: 1.0s; animation-delay: -1.3s; }
.waveform span:nth-child(4)  { animation-duration: 1.4s; animation-delay: -0.6s; }
.waveform span:nth-child(5)  { animation-duration: 1.8s; animation-delay: -1.1s; }
.waveform span:nth-child(6)  { animation-duration: 1.2s; animation-delay: -0.4s; }
.waveform span:nth-child(7)  { animation-duration: 1.5s; animation-delay: -1.5s; }
.waveform span:nth-child(8)  { animation-duration: 1.0s; animation-delay: -0.7s; }
.waveform span:nth-child(9)  { animation-duration: 1.7s; animation-delay: -0.1s; }
.waveform span:nth-child(10) { animation-duration: 1.3s; animation-delay: -1.0s; }
.waveform span:nth-child(11) { animation-duration: 1.1s; animation-delay: -0.5s; }
.waveform span:nth-child(12) { animation-duration: 1.6s; animation-delay: -1.4s; }
.waveform span:nth-child(13) { animation-duration: 1.0s; animation-delay: -0.3s; }
.waveform span:nth-child(14) { animation-duration: 1.5s; animation-delay: -0.8s; }
.waveform span:nth-child(15) { animation-duration: 1.2s; animation-delay: -1.2s; }

/* ---------- Persembahan / mitra radio strip ---------- */

.persembahan {
  border-top: 1px solid var(--charcoal-line);
  border-bottom: 1px solid var(--charcoal-line);
  background: var(--charcoal-soft);
}

.persembahan .wrap {
  padding: 48px 28px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.persembahan h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 10px 0 0;
  color: var(--cream);
}

.persembahan p {
  color: var(--cream-dim);
  font-size: 15.5px;
  margin: 14px 0 0;
  max-width: 640px;
}

.persembahan strong { color: var(--gold-bright); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding: 84px 0; }

.section-head {
  margin-bottom: 40px;
  max-width: 620px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  margin: 14px 0 10px;
  color: var(--cream);
}

.section-head p {
  color: var(--cream-dim);
  font-size: 15.5px;
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ---------- Episode cards (Spotify) ---------- */

.card {
  background: var(--charcoal-soft);
  border: 1px solid var(--charcoal-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.card:hover { border-color: var(--gold); }

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--ink);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-transform: uppercase;
}

.card-meta .dot { opacity: 0.5; color: var(--cream-dim); }

.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  line-height: 1.28;
  color: var(--cream);
}

.card p.desc {
  font-size: 14px;
  color: var(--cream-dim);
  margin: 0;
  flex: 1;
}

.card audio {
  width: 100%;
  margin-top: 4px;
  height: 38px;
}

.card-link {
  font-size: 13px;
  color: var(--gold-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Video cards (YouTube) ---------- */

.video-card .card-media { aspect-ratio: 16 / 9; cursor: pointer; }

.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(21,18,14,0.05), rgba(21,18,14,0.55));
}

.play-btn svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.45));
  transition: transform 0.2s ease;
}

.video-card:hover .play-btn svg { transform: scale(1.08); }

.video-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Empty / error states ---------- */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--charcoal-line);
  border-radius: var(--radius);
  color: var(--cream-dim);
  font-size: 14.5px;
}

.empty-state strong { display: block; color: var(--cream); font-size: 16px; margin-bottom: 6px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--charcoal-line);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img { width: 34px; height: 34px; border-radius: 50%; }

.footer-brand span {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--cream);
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  text-decoration: none;
  color: var(--cream-dim);
  font-size: 14px;
}
.footer-links a:hover { color: var(--gold-bright); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--charcoal-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--cream-dim);
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .persembahan .wrap { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 620px) {
  .main-nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 48px; }
  .section { padding: 56px 0; }
  .persembahan .wrap { padding: 36px 20px; }
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}
