:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --brand-cyan: #23bcc7;
  --brand-blue: #356ac3;
  --brand-green: #00a181;
  --brand-orange: #f98503;
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 12% -10%, #1f3d7a 0%, var(--bg) 35%), var(--bg);
  color: var(--text);
  font-family: "Sora", "Space Grotesk", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.wrap {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--brand-cyan);
}

.cta {
  text-decoration: none;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue));
  color: #041520;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  border: 1px solid var(--line);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: 0.8rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle:focus-visible,
.cta:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.main-nav a:focus-visible,
.search-wrap input:focus-visible,
.location-link:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.hero {
  padding: 4.5rem 0 2rem;
}

.pill {
  display: inline-block;
  margin: 0;
  font-weight: 600;
  color: var(--brand-cyan);
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  max-width: 16ch;
  margin: 0.5rem 0 0;
}

.main-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text);
  margin: 0;
  align-self: center;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  text-decoration: none;
  border-radius: 0.8rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.btn-primary {
  background: var(--brand-blue);
  color: #f8fafc;
}

.btn-secondary {
  border: 1px solid var(--line);
}

.section {
  padding: 2.5rem 0 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.section-head p {
  color: var(--muted);
  margin-top: 0.3rem;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.news-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.agenda-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.prism-conecta-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.card {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}

.card h3 {
  margin: 0.3rem 0;
}

.card p {
  margin: 0;
}

.meta {
  color: var(--brand-orange);
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}

.agenda-date {
  color: var(--brand-green);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.search-wrap input {
  width: min(350px, 90vw);
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  color: var(--text);
  padding: 0.6rem 0.75rem;
}

.search-wrap input::placeholder {
  color: var(--muted);
}

.status {
  color: var(--muted);
}

.status-warning {
  color: var(--brand-orange);
  font-weight: 600;
}

.location-card {
  display: grid;
  gap: 0.65rem;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.location-map-card {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.location-map-frame-wrap {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
}

.location-map-frame {
  width: 100%;
  min-height: 340px;
  border: 0;
  display: block;
}

.location-title {
  margin: 0;
  font-weight: 700;
  color: var(--brand-cyan);
}

.location-checklist {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.link-stack {
  display: grid;
  gap: 0.45rem;
}

.location-link {
  color: var(--brand-cyan);
  font-weight: 600;
}

.location-link.secondary {
  color: var(--brand-green);
}

.signup-card {
  background: linear-gradient(150deg, color-mix(in srgb, var(--surface) 82%, transparent), color-mix(in srgb, var(--brand-blue) 22%, var(--surface)));
}

.microcopy {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.6rem 0;
}

.footer-credits {
  font-size: 0.72rem;
  margin-top: 0.6rem;
}

.footer-credits a {
  color: inherit;
  text-underline-offset: 2px;
}

.footer-credits a:hover {
  color: var(--brand-cyan);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .topbar-row {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.65rem 0;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }

  .topbar-actions {
    width: 100%;
    justify-content: center;
  }

  .section-row {
    flex-direction: column;
    align-items: start;
  }

  .location-map-frame {
    min-height: 280px;
  }
}

.logo-image {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================
   Privacy Modal
   ===================== */
.privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.privacy-overlay[hidden] {
  display: none;
}

.privacy-modal {
  background: #0c1535;
  border: 1px solid #1e3a6e;
  border-radius: 1.25rem;
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  color: #e2e8f0;
}

.privacy-modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.75rem;
}

.privacy-modal-desc {
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.privacy-options {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
}

.privacy-option-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 0.875rem;
  user-select: none;
}

.privacy-option-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #356ac3;
  flex-shrink: 0;
  cursor: pointer;
}

.privacy-actions {
  display: flex;
  gap: 0.75rem;
}

.privacy-btn-reject {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: "Sora", "Space Grotesk", sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.privacy-btn-reject:hover {
  background: #e2e8f0;
}

.privacy-btn-reject:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.privacy-btn-accept {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  border: 2px solid #0b1120;
  background: #356ac3;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: "Sora", "Space Grotesk", sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 0 #0b1120;
  transition: box-shadow 0.1s, transform 0.1s;
}

.privacy-btn-accept:hover {
  background: #4278d4;
}

.privacy-btn-accept:active {
  box-shadow: 0 1px 0 #0b1120;
  transform: translateY(3px);
}

.privacy-btn-accept:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

/* Floating gear button */
.privacy-floating-btn {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 199;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: box-shadow 0.2s, color 0.2s;
}

.privacy-floating-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  color: #356ac3;
}

.privacy-floating-btn:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

/* Map placeholder states */
.map-placeholder-pending,
.map-placeholder-blocked {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.map-placeholder-pending p,
.map-placeholder-blocked p {
  margin: 0.25rem 0;
}

@media (max-width: 480px) {
  .privacy-modal {
    padding: 1.5rem 1.25rem;
  }

  .privacy-actions {
    flex-direction: column;
  }
}
