@font-face {
  font-family: "Kar Da Raa Bendre";
  src: url("../assets/fonts/KarDaRaaBendre.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --glass: rgba(12, 10, 8, 0.55);
  --glass-border: rgba(255, 240, 220, 0.12);
  --text: rgba(255, 248, 240, 0.95);
  --text-muted: rgba(255, 240, 220, 0.6);
  --accent: #e8a04c;
  --live: #5cdb7a;
  --player-radius: 20px;
  --font-display: "Kar Da Raa Bendre", serif;
  --font-serif: "Instrument Serif", "Georgia", serif;
  --font-ui: "Sora", system-ui, sans-serif;
  --font-kannada: var(--font-display);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--text);
  background: #1a1208;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background scene ── */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene__bg {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.scene__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.scene__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, rgba(10, 8, 5, 0.38) 0%, transparent 72%),
    linear-gradient(
      180deg,
      rgba(10, 8, 5, 0.35) 0%,
      rgba(10, 8, 5, 0.02) 42%,
      rgba(10, 8, 5, 0.1) 62%,
      rgba(10, 8, 5, 0.78) 100%
    );
  pointer-events: none;
}

/* ── Coffee steam animation ── */
.steam {
  position: absolute;
  bottom: 18%;
  left: 8%;
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 1;
}

.steam span {
  display: block;
  width: 8px;
  height: 40px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.35), transparent);
  border-radius: 50%;
  filter: blur(4px);
  animation: rise 3s ease-in-out infinite;
}

.steam span:nth-child(2) {
  animation-delay: 0.8s;
  height: 50px;
}

.steam span:nth-child(3) {
  animation-delay: 1.6s;
  height: 35px;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(0) scaleX(1);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scaleX(1.4);
  }
}

/* ── Top bar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
}

.topbar__clock {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  color: rgba(255, 240, 220, 0.65);
  font-variant-numeric: tabular-nums;
}

.topbar__live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  background: rgba(12, 10, 8, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: rgba(255, 240, 220, 0.55);
}

.topbar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.topbar__links {
  display: flex;
  gap: 1rem;
}

.topbar__link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: rgba(255, 240, 220, 0.5);
  text-decoration: none;
  transition: color 0.25s ease;
}

.topbar__link:hover {
  color: rgba(255, 248, 240, 0.92);
}

/* ── Hero ── */
.hero {
  position: fixed;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
  width: min(90%, 36rem);
  animation: heroIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 400;
  font-style: normal;
  line-height: 0.88;
  letter-spacing: 0.01em;
  color: rgba(255, 252, 248, 0.97);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.18);
  margin-bottom: 0;
}

.hero__divider {
  width: 2rem;
  height: 1px;
  margin: 0.35rem auto 0.5rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 220, 180, 0.55) 50%,
    transparent
  );
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.6vw, 1.38rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-transform: lowercase;
  color: rgba(255, 235, 210, 0.72);
  max-width: 22em;
  margin: 0 auto;
  text-wrap: balance;
}

/* ── Player (glass pill) ── */
.player {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(760px, calc(100% - 2rem));
}

.player__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 1.1rem 0.55rem 0.65rem;
  border-radius: 999px;
  background: rgba(48, 28, 18, 0.42);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.player__cover {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.player__cover.is-changing {
  opacity: 0.55;
  transform: scale(0.95);
}

.player__center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.1rem;
}

.player__title {
  font-size: 0.92rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-serif), var(--font-display), var(--font-ui);
  color: rgba(255, 255, 255, 0.97);
  letter-spacing: 0.02em;
}

.player__artist {
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.player__progress {
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.player__progress-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.player__progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.1s linear;
}

.player__progress.is-dragging .player__progress-fill {
  transition: none;
}

.player__progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  margin-left: -5px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transition: left 0.1s linear;
}

.player__progress.is-dragging .player__progress-thumb {
  transition: none;
}

.player__time {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.42);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding-left: 0.25rem;
}

.player__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  border-radius: 50%;
  transition: opacity 0.15s, transform 0.1s;
}

.player__btn:hover {
  opacity: 1;
  color: #fff;
}

.player__btn:active {
  transform: scale(0.88);
}

.player__btn--play {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.96);
  color: rgba(20, 12, 8, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.player__btn--play:hover {
  background: #fff;
  color: #000;
}

.player__icon-wrap {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}

.player__icon {
  position: absolute;
  inset: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.player__icon--play {
  left: 1px;
}

.player__icon--hidden {
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}

/* ── Hidden YouTube iframe ── */
.yt-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  top: -9999px;
  left: -9999px;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .topbar {
    padding: 1rem;
  }

  .topbar__links {
    gap: 0.6rem;
  }

  .topbar__link span,
  .topbar__link svg {
    display: none;
  }

  .topbar__link {
    font-size: 0.7rem;
  }

  .player {
    bottom: 1rem;
    width: calc(100% - 1.25rem);
  }

  .player__inner {
    gap: 0.65rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  }

  .player__cover {
    width: 44px;
    height: 44px;
  }

  .hero__title {
    font-size: clamp(3.2rem, 16vw, 4.5rem);
    margin-bottom: 0;
  }

  .hero__divider {
    margin: 0.25rem auto 0.4rem;
  }

  .hero__subtitle {
    font-size: clamp(0.95rem, 4.2vw, 1.1rem);
    line-height: 1.5;
    max-width: 18em;
  }

  .player__title {
    font-size: 0.82rem;
  }

  .player__artist {
    font-size: 0.68rem;
  }

  .player__btn--play {
    width: 36px;
    height: 36px;
  }

  .player__btn {
    width: 28px;
    height: 28px;
  }

  .player__time {
    font-size: 0.62rem;
  }

  .player__controls {
    gap: 0.15rem;
  }

  .steam {
    left: 5%;
    bottom: 22%;
  }
}
