/* ════════════════════════════════════════════
   ROMA·ARTE·RADAR — neon nightcrawler aesthetic
   ════════════════════════════════════════════ */

:root {
  --bg: #0a0a12;
  --bg-2: #11111d;
  --panel: #14141f;
  --ink: #f2f2f7;
  --ink-dim: #9a9ab0;
  --neon: #00ff9d;
  --neon-dim: rgba(0, 255, 157, 0.35);
  --hot: #ff2d78;
  --violet: #8b5cf6;
  --amber: #ffb800;
  --cyan: #22d3ee;

  --c-museum: #ffb800;
  --c-contemporary: #ff2d78;
  --c-street: #00ff9d;
  --c-photo: #22d3ee;
  --c-festival: #a78bfa;
  --c-performance: #ff6b35;
  --c-conference: #4d7cff;
  --c-meetup: #ffe14d;
  --c-tech: #00e0ff;
  --c-business: #2dffb3;
  --c-popular: #ff4dd2;
  --c-other: #9a9ab0;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(0, 255, 157, 0.07), transparent);
}

.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.hidden { display: none !important; }

/* ───────────────────────────── sale banner (the radar is for sale) */

.sale-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.55rem clamp(0.8rem, 3vw, 2rem);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background:
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255, 45, 120, 0.07) 18px 36px),
    linear-gradient(90deg, rgba(255, 45, 120, 0.22), rgba(255, 184, 0, 0.14) 50%, rgba(255, 45, 120, 0.22));
  border-bottom: 1px solid rgba(255, 45, 120, 0.55);
  transition: filter 0.2s;
}
.sale-banner:hover { filter: brightness(1.25); }
.sale-siren {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 12px var(--hot);
  animation: blink 0.9s ease-in-out infinite;
  flex: none;
}
.sale-lead {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--hot);
}
.sale-dark { color: var(--ink-dim); }
.sale-count { color: var(--amber); font-weight: 800; font-size: 0.82rem; }
.sale-offer { font-weight: 700; }
.sale-cta {
  color: var(--neon);
  font-weight: 700;
  border: 1px solid var(--neon-dim);
  border-radius: 999px;
  padding: 0.14rem 0.65rem;
  transition: all 0.18s;
}
.sale-banner:hover .sale-cta { background: var(--neon); color: var(--bg); box-shadow: 0 0 16px rgba(0, 255, 157, 0.5); }
@media (max-width: 640px) { .sale-dark, .sale-offer { display: none; } }

/* ───────────────────────────── ticker */

.ticker {
  background: var(--neon);
  color: #062b1c;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.ticker-track {
  display: inline-block;
  animation: ticker 40s linear infinite;
  will-change: transform;
}
.ticker-track span { margin-right: 3rem; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ───────────────────────────── hero */

.hero { padding: 1.2rem clamp(1rem, 4vw, 3rem) 2.2rem; }

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.radar-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.radar-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
  animation: blink 1.6s ease-in-out infinite;
}
.radar-dot.scanning { background: var(--hot); box-shadow: 0 0 12px var(--hot); animation-duration: 0.4s; }
.radar-dot.offline { background: var(--hot); box-shadow: 0 0 12px var(--hot); animation: none; }
body.offline .radar-online { color: var(--hot); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.radar-online { color: var(--neon); font-weight: 700; }
.radar-freq { color: var(--ink-dim); display: none; }
@media (min-width: 640px) { .radar-freq { display: inline; } }

.lang-toggle {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--violet);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.lang-toggle:hover { background: var(--violet); box-shadow: 0 0 24px rgba(139, 92, 246, 0.6); transform: scale(1.05); }
.lang-now { color: var(--ink-dim); }
.lang-toggle:hover .lang-now { color: rgba(255,255,255,.7); }
.lang-next { color: var(--neon); }
.lang-arrow { opacity: 0.6; }

.hero-main {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  flex-wrap: wrap;
}

/* radar scope */
.radar-scope {
  position: relative;
  width: clamp(150px, 22vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  flex: none;
  background:
    radial-gradient(circle, rgba(0, 255, 157, 0.06) 0%, transparent 70%),
    var(--bg-2);
  border: 1px solid var(--neon-dim);
  box-shadow: 0 0 40px rgba(0, 255, 157, 0.15), inset 0 0 30px rgba(0, 255, 157, 0.05);
}
.scope-rings, .scope-rings::before, .scope-rings::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--neon-dim);
}
.scope-rings { inset: 18%; }
.scope-rings::before { inset: 24%; }
.scope-rings::after { inset: 55%; }
.scope-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 255, 157, 0.5), transparent 18%);
  animation: sweep 4s linear infinite;
  will-change: transform;
}
.scope-sweep.fast { animation-duration: 0.8s; background: conic-gradient(from 0deg, rgba(255, 45, 120, 0.55), transparent 22%); }
@keyframes sweep { to { transform: rotate(360deg); } }
.scope-blip {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 10px var(--hot);
  animation: blip 4s ease-out infinite;
}
.scope-blip.b1 { top: 28%; left: 62%; }
.scope-blip.b2 { top: 60%; left: 30%; animation-delay: 1.4s; }
.scope-blip.b3 { top: 44%; left: 75%; animation-delay: 2.6s; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
@keyframes blip { 0% { opacity: 0; transform: scale(0.4); } 12% { opacity: 1; transform: scale(1.25); } 55% { opacity: 0.85; } 100% { opacity: 0; transform: scale(0.7); } }

.hero-text { flex: 1; min-width: min(100%, 340px); }

.site-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  background: linear-gradient(95deg, var(--neon) 0%, var(--cyan) 35%, var(--violet) 70%, var(--hot) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 255, 157, 0.25));
}

.tagline {
  margin-top: 0.7rem;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 700;
}
.sub-tagline { margin-top: 0.3rem; color: var(--ink-dim); font-size: 0.95rem; }

.scan-bar {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.scan-info {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.82rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  flex-wrap: wrap;
}
.scan-label { color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; }
.scan-value { color: var(--neon); font-weight: 700; }
.scan-sep { color: var(--ink-dim); }

.scan-now {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--neon);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
  transition: all 0.18s;
}
.scan-now:hover { transform: scale(1.06) rotate(-1deg); box-shadow: 0 0 34px rgba(0, 255, 157, 0.7); }
.scan-now:disabled { opacity: 0.55; cursor: wait; transform: none; }

/* ───────────────────────────── filters */

main { padding: 0 clamp(1rem, 4vw, 3rem) 3rem; max-width: 1280px; margin: 0 auto; }

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0 1.6rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.chip {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--chip-c, var(--ink-dim));
  color: var(--chip-c, var(--ink-dim));
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 4px 18px color-mix(in srgb, var(--chip-c, var(--ink-dim)) 35%, transparent); }
.chip.active {
  background: var(--chip-c, var(--ink));
  color: var(--bg);
  box-shadow: 0 0 18px color-mix(in srgb, var(--chip-c, var(--ink)) 55%, transparent);
}

/* ───────────────────────────── sections */

.section { margin-top: 1.4rem; }
.section-head { margin-bottom: 1.1rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 600;
}
.section-sub { color: var(--ink-dim); font-size: 0.9rem; margin-top: 0.25rem; }

.live-title { display: flex; align-items: center; gap: 0.6rem; color: var(--hot); }
.pulse-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.6);
  animation: pulse 1.8s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(255, 45, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0); }
}

/* ───────────────────────────── event cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.card {
  --cat: var(--c-other);
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  animation: cardIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.card:nth-child(odd) { animation-delay: 0.05s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; } }
.card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--cat);
  box-shadow: 0 0 14px var(--cat);
}
.card:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  border-color: var(--cat);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5), 0 0 22px color-mix(in srgb, var(--cat) 28%, transparent);
}

.card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cat-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat);
  border: 1px solid var(--cat);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
}
.badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: var(--bg);
}
.badge.free { background: var(--neon); }
.badge.ending { background: var(--hot); animation: blink 1.2s 5; }
.badge.new { background: var(--cyan); }

.card-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}
.card-venue { font-size: 0.85rem; font-weight: 700; color: var(--ink); opacity: 0.9; }
.card-venue .area { color: var(--cat); }
.card-dates { font-size: 0.8rem; color: var(--ink-dim); }
.card-dates .left { color: var(--amber); font-weight: 700; }
.card-desc { font-size: 0.88rem; line-height: 1.5; color: var(--ink-dim); flex: 1; }
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.3rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.card-price { font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.card-link {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cat);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline wavy; }

/* ───────────────────────────── live list */

.live-section {
  margin-top: 3rem;
  border: 1px solid rgba(255, 45, 120, 0.25);
  border-radius: 22px;
  padding: 1.4rem;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 45, 120, 0.025) 14px 28px),
    var(--bg-2);
}
.live-list { display: flex; flex-direction: column; gap: 0.6rem; }
.ping {
  --cat: var(--c-other);
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  background: rgba(255, 255, 255, 0.025);
  border-left: 3px solid var(--cat);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  animation: cardIn 0.4s ease both;
  flex-wrap: wrap;
}
.ping-time { color: var(--hot); font-weight: 700; font-size: 0.72rem; flex: none; }
.ping-title { font-weight: 700; }
.ping-title a { color: var(--ink); text-decoration: none; }
.ping-title a:hover { color: var(--cat); }
.ping-meta { color: var(--ink-dim); font-size: 0.74rem; }
.ping-cat { color: var(--cat); text-transform: uppercase; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; }

/* ───────────────────────────── about + footer */

.about {
  margin-top: 3rem;
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.12), rgba(0, 255, 157, 0.07));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 22px;
  padding: 1.6rem;
}
.about p { margin-top: 0.6rem; color: var(--ink-dim); line-height: 1.6; max-width: 70ch; }

.empty {
  color: var(--ink-dim);
  font-style: italic;
  padding: 2rem 0;
  text-align: center;
  font-size: 1rem;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 3rem;
  padding: 1.6rem clamp(1rem, 4vw, 3rem) 2.4rem;
  color: var(--ink-dim);
  font-size: 0.82rem;
  text-align: center;
}
.footer-sig { margin-top: 0.6rem; color: var(--neon-dim); letter-spacing: 0.2em; font-size: 0.7rem; }

/* language switch flash */
.lang-flash { animation: langFlash 0.45s ease; }
@keyframes langFlash { 0% { opacity: 0.3; filter: hue-rotate(40deg); } 100% { opacity: 1; } }

/* mobile: keep the sticky filter bar fully opaque so cards can't shine through */
@media (max-width: 700px) {
  .filters { background: var(--bg); padding-bottom: 0.8rem; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.8); }
}

/* scan status / error message */
.scan-status { font-size: 0.8rem; color: var(--hot); font-weight: 700; min-height: 1em; }
.scan-status:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .ticker-track { animation: none; }
}
