/* What's Nuevo — Radar design system
   Modern, sleek, fun: dark base, electric accents, glassy cards. */

:root {
  --bg: #0b0d12;
  --bg-2: #10131b;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-hover: rgba(255, 255, 255, 0.07);
  --ink: #f2f4f8;
  --muted: #9aa3b2;
  --faint: #626b7a;
  --coral: #ff4d6d;
  --violet: #8b5cf6;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --grad: linear-gradient(92deg, #ff4d6d 0%, #8b5cf6 55%, #2dd4bf 100%);
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ambient glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% -5%, rgba(255, 77, 109, 0.13), transparent 60%),
    radial-gradient(700px 350px at 85% 0%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(500px 400px at 50% 110%, rgba(45, 212, 191, 0.08), transparent 60%);
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.75);
  border-bottom: 1px solid var(--card-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
}
.brand {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.brand span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.08em;
  margin-right: -0.08em;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  padding: 7px 12px; border-radius: 10px; text-decoration: none;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--card); text-decoration: none; }
.nav-links a.active { color: var(--ink); background: var(--card-hover); }
.nav-links a.cta {
  color: #fff; background: var(--coral); font-weight: 600;
  margin-left: 6px;
}
.nav-links a.cta:hover { background: #e6435f; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 58px 20px 34px; }
.hero .kicker {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem;
  font-weight: 700; color: var(--teal);
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.05;
  margin: 12px 0 12px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  /* gradient-clipped text renders only inside the span's box, and the negative
     letter-spacing on h1 lets the last glyph poke past it — pad the box out,
     then pull the following text back so spacing looks unchanged */
  padding-right: 0.08em;
  margin-right: -0.08em;
}
.hero p { color: var(--muted); font-size: 1.06rem; max-width: 620px; margin: 0 auto; }

/* ---------- Controls ---------- */
.controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: center; padding: 8px 0 26px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  border: 1px solid var(--card-border); background: var(--card);
  color: var(--muted); font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--ink); background: var(--card-hover); }
.chip.on { color: #0b0d12; background: var(--ink); border-color: var(--ink); font-weight: 600; }
.chip.loc { color: var(--teal); border-color: rgba(45, 212, 191, 0.35); }
.chip.loc.on { background: var(--teal); border-color: var(--teal); color: #06231f; }

/* ---------- Grid & cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px; padding-bottom: 60px;
}
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, background .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); background: var(--card-hover); border-color: rgba(255,255,255,0.16); }

/* ---------- Flip cards ---------- */
.flipcard { cursor: pointer; perspective: 1200px; padding: 0; background: transparent; border: none; }
.flipcard:hover { transform: translateY(-3px); background: transparent; }
.flip-inner {
  display: grid; transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  height: 100%;
}
.flipcard.flipped .flip-inner { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background .15s, border-color .15s;
  min-width: 0;
}
.flipcard:hover .face { background: var(--card-hover); border-color: rgba(255,255,255,0.16); }
.face.back { transform: rotateY(180deg); }
.thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 10px; background: var(--bg-2);
}
.desc.clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.flip-hint {
  font-size: 0.68rem; color: var(--faint); text-align: right;
  margin-top: auto; padding-top: 4px; user-select: none;
}
.back-links { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.back-links .abtn { justify-content: center; padding: 10px 12px; }
.abtn.primary {
  color: #fff; background: var(--coral); border-color: var(--coral); font-weight: 700;
}
.abtn.primary:hover { background: #e6435f; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 4px 9px; border-radius: 999px;
}
.badge.status-just_opened { background: rgba(255, 77, 109, 0.16); color: #ff7d94; }
.badge.status-opening_soon { background: rgba(139, 92, 246, 0.18); color: #ab8bfa; }
.badge.status-rumored { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.badge.status-open { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.badge.status-event { background: rgba(45, 212, 191, 0.15); color: #5eead4; }
.badge.cat { background: transparent; border: 1px solid var(--card-border); color: var(--faint); }
.badge.trending {
  background: linear-gradient(92deg, rgba(255,77,109,0.22), rgba(251,191,36,0.22));
  color: #fda4af; border: 1px solid rgba(255,77,109,0.35);
}
.badge.dist { background: rgba(45, 212, 191, 0.1); color: var(--teal); }

.card h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.02em; }
.card .meta { color: var(--faint); font-size: 0.82rem; font-weight: 500; }
.card .meta b { color: var(--muted); font-weight: 600; }
.card .desc { color: var(--muted); font-size: 0.92rem; flex: 1; }
.vibes { display: flex; flex-wrap: wrap; gap: 5px; }
.vibe { font-size: 0.72rem; color: var(--faint); background: rgba(255,255,255,0.04); padding: 3px 8px; border-radius: 6px; }

.card .actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.abtn {
  font-family: var(--font); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--card-border); background: transparent; color: var(--muted);
  padding: 7px 12px; border-radius: 10px; transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.abtn:hover { color: var(--ink); border-color: rgba(255,255,255,0.25); }
.abtn.saved { color: var(--coral); border-color: rgba(255, 77, 109, 0.45); background: rgba(255, 77, 109, 0.08); }
.abtn.following { color: var(--violet); border-color: rgba(139, 92, 246, 0.45); background: rgba(139, 92, 246, 0.08); }
.card .src { font-size: 0.75rem; color: var(--faint); }
.card .src a { color: var(--faint); border-bottom: 1px dotted var(--faint); }
.card .src a:hover { color: var(--teal); text-decoration: none; border-color: var(--teal); }

.empty {
  grid-column: 1 / -1; text-align: center; color: var(--faint);
  padding: 60px 20px; font-size: 0.95rem;
}

/* ---------- Page headers ---------- */
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 44px 0 6px; }
.page-sub { color: var(--muted); margin-bottom: 30px; }

/* ---------- Weekly issue ---------- */
.intro-note {
  background: var(--card); border: 1px solid var(--card-border);
  border-left: 3px solid var(--teal); border-radius: 12px;
  padding: 18px 22px; margin: 0 0 34px; color: var(--muted); font-size: 0.98rem;
}
.section { margin-bottom: 38px; }
.section h2 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 700; color: var(--coral);
  padding-bottom: 10px; border-bottom: 1px solid var(--card-border); margin-bottom: 16px;
}
.row-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 10px;
}
.row-card .name { font-weight: 700; font-size: 1.05rem; }
.row-card .hood {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--teal); margin-left: 8px; font-weight: 600;
}
.row-card .desc { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.row-card .src { font-size: 0.74rem; margin-top: 6px; }
.row-card .src a { color: var(--faint); }

/* ---------- Archive ---------- */
.archive-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 14px; transition: all .15s;
}
.archive-item:hover { background: var(--card-hover); transform: translateY(-2px); text-decoration: none; }
.archive-item .date {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--teal); font-weight: 700;
}
.archive-item h3 { font-size: 1.25rem; margin: 6px 0 6px; letter-spacing: -0.02em; }
.archive-item p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Prose / about ---------- */
.prose { max-width: 700px; }
.prose p { margin-bottom: 16px; color: var(--muted); font-size: 1.02rem; }
.prose strong { color: var(--ink); }
.prose h2 { font-size: 1.3rem; margin: 30px 0 10px; letter-spacing: -0.02em; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; background: var(--coral); color: #fff; border: none;
  padding: 12px 22px; border-radius: 12px; font-family: var(--font);
  font-weight: 700; font-size: 0.92rem; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: #e6435f; text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 1px solid var(--card-border); color: var(--ink); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.3); background: var(--card); }

.subscribe-box {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 36px; text-align: center; margin: 30px 0 60px;
}
.subscribe-box h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.subscribe-box form { display: flex; gap: 10px; max-width: 430px; margin: 20px auto 0; }
input[type="email"], input[type="text"], input[type="url"], input[type="date"],
input[type="datetime-local"], input[type="password"], input[type="number"], select, textarea {
  flex: 1; width: 100%;
  padding: 11px 14px; border: 1px solid var(--card-border); border-radius: 10px;
  font-size: 0.95rem; font-family: var(--font);
  background: var(--bg-2); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(139, 92, 246, 0.5); border-color: transparent; }
.form-note { font-size: 0.8rem; color: var(--faint); margin-top: 14px; }

/* ---------- Map page ---------- */
#map { height: calc(100vh - 130px); min-height: 480px; border-radius: var(--radius); border: 1px solid var(--card-border); }
.map-wrap { padding: 20px 0 40px; }
.leaflet-popup-content-wrapper { background: #161a24; color: var(--ink); border-radius: 12px; font-family: var(--font); }
.leaflet-popup-tip { background: #161a24; }
.leaflet-popup-content a { color: var(--teal); }

/* ---------- Admin ---------- */
.admin-panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.admin-panel h3 { margin-bottom: 12px; font-size: 1.05rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.admin-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 4px; }
.tag-pending { color: var(--amber); } .tag-ok { color: var(--teal); } .tag-no { color: var(--coral); }
.unsaved-banner {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fcd34d; border-radius: 10px;
  padding: 12px 14px; font-size: 0.88rem; line-height: 1.5;
}
.review-thumb {
  width: 76px; height: 76px; object-fit: cover; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--card-border); background: var(--bg-2);
  cursor: zoom-in;
}
.img-preview {
  max-width: 260px; max-height: 180px; object-fit: contain;
  border-radius: 10px; border: 1px solid var(--card-border); margin-top: 8px;
}
.img-broken {
  color: var(--coral); font-size: 0.8rem; margin-top: 6px;
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--card-border); padding: 30px 20px 40px;
  text-align: center; color: var(--faint); font-size: 0.82rem; margin-top: 40px;
}
footer.site a { color: var(--muted); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1c2130; color: var(--ink); border: 1px solid var(--card-border);
  padding: 11px 20px; border-radius: 12px; font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; transition: all .25s; z-index: 99; pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 8px; font-size: 0.8rem; }
  .subscribe-box form { flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
}
