/* ===== Sober counter — 28th.net ===== */

:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --border: #262626;
  --text: #e8e8e8;
  --muted: #888;
  --accent: #a78bfa;
  --accent-dim: #7c5dd4;
  --accent-glow: rgba(167, 139, 250, 0.4);
  --accent-soft: rgba(167, 139, 250, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ----- Noise overlay ----- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ----- Header ----- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 1.5rem;
  background: rgba(13, 13, 13, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

header:hover {
  background: rgba(13, 13, 13, 0.9);
  border-bottom-color: rgba(167, 139, 250, 0.2);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
}

.logo span {
  color: var(--accent);
}

.logo:hover {
  color: var(--text);
  transform: scale(1.02);
}

.logo:hover span {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(167, 139, 250, 0.2);
}

/* ----- Hero ----- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  isolation: isolate;
}

/* Central glow */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 600px);
  height: min(80vw, 600px);
  background: radial-gradient(
    ellipse,
    rgba(167, 139, 250, 0.18) 0%,
    rgba(124, 93, 212, 0.1) 35%,
    transparent 65%
  );
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

/* Floating orbs */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(167, 139, 250, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(124, 93, 212, 0.06) 0%, transparent 30%),
    radial-gradient(circle at 50% 20%, rgba(196, 181, 253, 0.05) 0%, transparent 20%);
  animation: float-orbs 12s ease-in-out infinite;
  z-index: -1;
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes float-orbs {
  0%, 100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  33% {
    opacity: 0.9;
    transform: translate(2%, -1%) scale(1.02);
  }
  66% {
    opacity: 1;
    transform: translate(-1%, 2%) scale(0.98);
  }
}

/* Staggered entrance */
.hero .badge {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  position: relative;
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.1s;
  animation-fill-mode: forwards;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 15vw, 8rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 2rem;
  position: relative;
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.2s;
  animation-fill-mode: forwards;
}

.audio-player {
  display: block;
  margin: 0.6rem 0 0.75rem;
  width: min(480px, 100%);
}

.hero h1 .accent {
  color: var(--accent);
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    #c4b5fd 40%,
    #e9d5ff 50%,
    #c4b5fd 60%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

/* Time breakdown — glass card */
.hero .time-breakdown {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1rem;
  position: relative;
  padding: 0.75rem 1.5rem;
  background: rgba(22, 22, 22, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 12px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.35s;
  animation-fill-mode: forwards;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero .time-breakdown:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(167, 139, 250, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero .time-breakdown .unit {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
  transition: text-shadow 0.2s ease;
}

/* Subtle pulse on seconds */
#seconds.unit {
  display: inline-block;
  animation: tick-pulse 1s ease-in-out infinite;
}

@keyframes tick-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.hero .time-breakdown .sep {
  color: var(--muted);
  font-weight: 400;
  margin: 0 0.25rem;
  opacity: 0.7;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.45s;
  animation-fill-mode: forwards;
}

.hero .start-date {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.55s;
  animation-fill-mode: forwards;
}

/* CTA button */
.hero a {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fade-up 0.8s ease forwards;
  animation-delay: 0.65s;
  animation-fill-mode: forwards;
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hero a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.1) 0%,
    transparent 50%,
    rgba(167, 139, 250, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero a:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow:
    0 0 24px var(--accent-glow),
    0 0 48px rgba(167, 139, 250, 0.15);
  transform: translateY(-2px);
}

.hero a:hover::before {
  opacity: 1;
}

.hero a:active {
  transform: translateY(0);
}

.hero .back-link {
  margin-top: 0.35rem;
}

/* ----- Footer ----- */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10;
  transition: border-color 0.3s ease;
}

footer:hover {
  border-top-color: rgba(167, 139, 250, 0.15);
}

footer p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .hero h1 .accent,
  #seconds.unit {
    animation: none;
  }

  .hero h1 .accent {
    -webkit-text-fill-color: var(--accent);
    background: none;
  }

  .hero .badge,
  .hero h1,
  .hero .time-breakdown,
  .hero .tagline,
  .hero .start-date,
  .hero a {
    animation: none;
    opacity: 1;
  }
}
