#authorize,
#result,
#error {
  display: none;
}

/* ============================================================
     TOKENS
     Palette: near-black stage floor, three saturated gel colors
     (magenta / cyan / amber) rotate down the list like lighting
     cues changing act to act. Two link colors encode destination
     (Spotify = cyan, ConcertsTO = amber) consistently throughout.
     ============================================================ */
:root {
  --bg-void: #111;
  --bg-card-transparent: #13131870;
  --bg-card: #131318;
  --bg-card-alt: #17171d;
  --bg-card-hi: #1c1c23;
  --line: #232228;
  --text: #f4e6e2;
  --text-muted: #9695a0;
  --text-faint: #86838d;

  --green: #16f334;
  --green-transparent: #16f334cc;
  --violet: #c568f3;
  --violet-transparent: #c568f3cc;
  --gold: #fae038;
  --gold-transparent: #fae038cc;

  --holder-width: 64rem;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-void);
}

body {
  margin: 0;
  padding: 0 0 6rem;
  background: var(--bg-void);
  background-image:
    radial-gradient(
      ellipse 900px 500px at 15% 0%,
      rgba(197, 104, 243, 0.07),
      transparent 60%
    ),
    radial-gradient(
      ellipse 900px 500px at 85% 0%,
      rgba(22, 243, 52, 0.05),
      transparent 60%
    ),
    repeating-radial-gradient(
      circle at 15% 50%,
      rgba(197, 104, 243, 0.05) 0vh,
      rgba(197, 104, 243, 0) 50vh,
      rgba(197, 104, 243, 0.05) 100vh
    ),
    repeating-radial-gradient(
      circle at 85% 90%,
      rgba(22, 243, 52, 0) 0vh,
      rgba(22, 243, 52, 0.04) 50vh,
      rgba(22, 243, 52, 0) 100vh
    );
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed, fixed, scroll, scroll;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#holder {
  max-width: var(--holder-width);
  margin: 0 auto;
}

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

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  letter-spacing: 0.06em;
  margin: 0 1.5rem 0.4rem;
  padding: 2.5rem 0 0;
  line-height: 0.95;
  color: var(--text);
}
h1::after {
  content: "";
  display: block;
  width: 3.5em;
  height: 0.1em;
  margin-top: 0.7rem;
  background: linear-gradient(90deg, var(--violet), var(--gold));
}

#sub-headline {
  font-family: var(--font-title);
  color: var(--text);
  /* font-size: clamp(2.6rem, 6vw, 4.5rem); */
  margin: -1.5rem 0 1.5rem clamp(12rem, 27vw, 24rem);
  font-size: 1.15rem;
  font-weight: 600;
}

#into {
  font-family: var(--font-display);
  color: var(--text);
  margin: 4.5rem 1.5rem;
  font-size: 6rem;
  font-weight: 600;
}

#into a {
  color: var(--text);
}

/* ---------------- Authorize CTA ---------------- */

#authorize {
  margin: 2.5rem 1.5rem;
}

#authorize p {
  margin: 0 0 1.5rem;
}

#authorize a {
  display: inline-block;
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #030303;
  /* background: var(--text); */
  background: #24c83c;
  color: rgb(5, 46, 10);
  border: solid 1px rgba(22, 243, 52, 0.3);
  padding: 1rem 4rem;
  border-radius: 50px;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
#authorize a:hover {
  background: #12cc2bcc;
  border: solid 1px rgba(255, 255, 255, 0.6);
  /* background: var(--violet); */
  color: var(--text);
}

#authorize a::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 1em;
  vertical-align: middle;
  /* Inline SVG Data URI */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="%231ed760" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8Z"/><path d="M406.6 231.1c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3zm-31 76.2c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm-26.9 65.6c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

/* ---------------- States ---------------- */

#loading {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 1.5rem 1.5rem;
  letter-spacing: 0.05em;
}
#loading::after {
  content: "";
  animation: blink 1.4s steps(4, jump-none) infinite;
}
@keyframes blink {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}
@media (prefers-reduced-motion: reduce) {
  #loading::after {
    animation: none;
    content: "...";
  }
}

#error {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--violet);
  background: rgba(197, 104, 243, 0.08);
  border: 1px solid rgba(197, 104, 243, 0.35);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem;
  border-radius: 5px;
}
#error:empty {
  display: none;
}

/* ---------------- Summary strip ---------------- */

#summary {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 1.6rem 1.5rem 2.2rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card-transparent);
  border-left: 10px solid var(--text-muted);
}
#summary b {
  color: var(--text);
  font-weight: 400;
}

/* ---------------- Event list ---------------- */

#events {
  list-style: none;
  margin: 0 1.5rem;
  padding: 0;
  max-width: var(--holder-width);
  border-top: 1px solid var(--line);
}

#events li {
  position: relative;
  background: var(--bg-card);
  padding: 1.1rem 1.3rem 1.1rem 1.5rem;
  border-left: 10px solid var(--green-transparent);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s ease;
}
/* zebra striping: calm, low-contrast rhythm for tracking rows
     down a long list — replaces the old per-row colored border */
#events li:nth-of-type(even) {
  background: var(--bg-card-alt);
}
#events li:hover {
  background: var(--bg-card-hi);
}

/* rotate the "lighting cue" color every 3rd item */
#events li:nth-of-type(3n + 2) {
  border-left-color: var(--violet-transparent);
}
#events li:nth-of-type(3n + 3) {
  border-left-color: var(--gold-transparent);
}

.title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 0.4rem;
  justify-content: space-between;
  gap: 0.75rem;
}

.title b {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.title button {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  border-radius: 2px;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.title button:hover {
  color: var(--violet);
  border-color: var(--violet);
}

.full-event-name {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.date-and-location {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 1rem;
}
.date-and-location .date {
  color: var(--text-muted);
}
.date-and-location .venue {
  color: var(--text-faint);
}
.date-and-location .venue::before {
  content: "· @";
  margin-right: 0.5rem;
  color: var(--text-faint);
}

.event-ctas {
  margin-top: 0.7rem;
  margin-left: -0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.event-ctas a {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: 3px;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.spotify-cta {
  color: var(--green);
  border-color: rgba(22, 243, 52, 0.3);
}
.spotify-cta:hover {
  background: rgba(22, 243, 52, 0.1);
  border-color: rgba(22, 243, 52, 0.6);
}
.concertsto-cta {
  color: var(--gold);
  border-color: rgba(250, 224, 56, 0.3);
}
.concertsto-cta:hover {
  background: rgba(250, 224, 56, 0.1);
  border-color: rgba(250, 224, 56, 0.6);
}

/* ---------------- Calendar timeline ---------------- */

#calendar-timeline {
  background: var(--bg-card-transparent);
  margin: 1.6rem 1.5rem 0;
  padding: 1rem 2rem 0;
  max-width: var(--holder-width);
}
#calendar-timeline:empty {
  display: none;
}

.timeline-empty {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  padding: 0.5rem 0;
}

.timeline-range {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

.timeline-wrapper {
  position: relative;
}

.timeline-svg {
  width: 100%;
  height: 150px;
  display: block;
  overflow: visible;
}

.timeline-axis,
.timeline-tick {
  stroke: var(--line);
  stroke-width: 1;
}

.timeline-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-faint);
  text-anchor: middle;
}

.timeline-bar {
  fill: var(--gold);
  fill-opacity: 0.9;
  transition:
    fill-opacity 0.15s ease,
    fill 0.15s ease;
}

.timeline-hit {
  fill: transparent;
  cursor: pointer;
}

/* highlight the bar directly tied to the hovered hit-area (adjacent sibling) */
.timeline-hit:hover + .timeline-bar {
  fill: var(--gold);
  fill-opacity: 0.85;
}

.timeline-today {
  stroke: var(--violet);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.timeline-today-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--violet);
  text-anchor: middle;
}

.timeline-tooltip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -112%);
  background: var(--bg-card-alt);
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  min-width: 150px;
  max-width: 220px;
  white-space: normal;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  z-index: 5;
}
.timeline-tooltip-title {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.timeline-tooltip-count {
  color: var(--gold);
  font-size: 0.68rem;
  margin-bottom: 0.35rem;
}
.timeline-tooltip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline-tooltip-list li {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.timeline-tooltip-more {
  color: var(--text-faint) !important;
  font-style: italic;
}

@media (max-width: 480px) {
  #calendar-timeline {
    margin: 1.2rem 0.9rem 0;
    padding: 0.9rem 1rem 0.5rem;
  }
}

/* focus visibility, kept for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #events {
    margin: 0 0.9rem;
  }
  #summary {
    margin: 1.2rem 0.9rem 1.8rem;
  }
  h1 {
    margin-left: 0.9rem;
  }
  #authorize {
    margin: 2rem 0.9rem;
  }
  .title {
    flex-wrap: wrap;
  }
}
