@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --red: #e10613;
  --red-deep: #b10510;
  --red-soft: #f8ecec;
  --gold: #8a7349;
  --gold-soft: #f3eee4;
  --teal: #3a5a48;
  --teal-soft: #e8eee9;
  --green: #3a5a48;
  --green-soft: #e8eee9;
  --sky: #5c5f66;
  --sky-soft: #f1f1f0;
  --amber: #8a7349;
  --amber-soft: #f3eee4;
  --navy: #1a1b1d;
  --ink: #1a1b1d;
  --muted: #6b6e75;
  --line: #e6e2db;
  --paper: #fffdf9;
  --bg: #f4f1ea;
  --sand: #ebe6dc;
  --radius: 6px;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans), "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
main a:not(.btn):not(.card):not(.chip):not(.action-card) {
  color: var(--red);
  font-weight: 650;
}

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); padding-bottom: 76px; }
.page-wrap main { flex: 1; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.eyebrow {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow.gold, .eyebrow.teal, .eyebrow.sky, .eyebrow.green, .eyebrow.violet {
  background: transparent;
  color: var(--muted);
}

.section { padding: 72px 0; }
.section.band, .section.band-gold, .section.band-teal, .section.band-sky, .section-tight.band { background: transparent; }
.section-tight { padding: 56px 0; }
.section h2, .page-title {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 10px 0 14px;
}
h1, h2, h3 { letter-spacing: -0.02em; }
h3 { font-size: 18px; font-weight: 700; margin: 8px 0 8px; }
.lead { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 540px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-teal { background: #128c7e; color: #fff; }
.btn-sky, .btn-gold, .btn-dark { background: var(--ink); color: #fff; }
.btn-ghost, .hero .btn-ghost, .btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-on-photo {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.8);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
a.card, button.card { text-decoration: none; }
a.card:hover, button.card:hover { border-color: #cfc8bb; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.quick-card, .quick-grid .action-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px; border-radius: var(--radius); text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); font-weight: 700;
}
.quick-card span { font-size: 13px; font-weight: 500; color: var(--muted); }
.quick-red, .quick-gold, .quick-teal, .quick-sky { background: var(--paper); color: var(--ink); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 234, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header::before { display: none; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-text span { display: block; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; }
.footer-logo { height: 64px; width: auto; display: block; margin-bottom: 14px; }
.red-band-logo { height: 64px; width: auto; display: block; margin-bottom: 16px; }
.login-logo { height: 72px; width: auto; display: block; margin: 0 auto 16px; }
.nav-desktop { display: none; gap: 2px; align-items: center; }
.nav-desktop a {
  text-decoration: none; font-size: 14px; color: var(--ink);
  font-weight: 600; padding: 8px 12px;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--red); }
.menu-btn {
  background: transparent; border: 1px solid var(--ink); color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
}
.mobile-nav { display: none; flex-direction: column; padding: 8px 0 18px; }
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line);
  color: var(--ink); font-weight: 600;
}
.mobile-nav .btn { margin-top: 14px; }

.hero-app { padding: 28px 0 8px; }
.hero-app-grid { display: grid; gap: 28px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .12em; padding: 0; text-transform: uppercase;
}
.hero-app h1 {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 500; line-height: .95; margin: 14px 0 12px;
}
.hero-app .lead { font-size: 18px; max-width: 480px; }
.hero-flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 13px; font-weight: 700; }
.hero-flow span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; height: 420px; object-fit: cover; object-position: center top;
  border-radius: var(--radius); display: block;
}
.hero-chip {
  position: absolute; left: 16px; bottom: 16px;
  background: #fff; color: var(--red); font-weight: 800;
  padding: 10px 14px; border-radius: 999px; font-size: 13px;
}

.hero-territory {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  color: #fff;
}
.hero-territory-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.hero-territory-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,16,18,.78) 0%, rgba(16,16,18,.18) 42%, rgba(16,16,18,.08) 100%);
}
.hero-territory-copy {
  position: relative;
  z-index: 1;
  padding: 48px 0 56px;
}
.hero-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.hero-territory h1 {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  margin: 0 0 10px;
  max-width: 16ch;
  color: #fff;
}
.hero-name {
  margin: 0;
  font-size: 18px;
  color: rgba(255,255,255,.88);
}

.photo-row { display: grid; gap: 3px; }
.photo-row img { width: 100%; height: 220px; object-fit: cover; display: block; }

.feature-gestion { display: grid; gap: 28px; align-items: center; }
.feature-gestion img { width: 100%; height: 360px; object-fit: cover; display: block; border-radius: var(--radius); }
.feature-gestion .tag { margin: 8px 0 0; }

.quiet-cta { padding: 64px 0 80px; }
.quiet-cta h2 {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  margin: 0 0 8px;
}
.muted-note { margin-top: 20px; color: var(--muted); font-size: 14px; }

.hero-bleed { display: none; }
.mark-3 { display: none; }
.photo-break { display: none; }

.red-band { background: transparent; padding: 24px 0 72px; color: var(--ink); }
.red-band .container { background: transparent; border-radius: 0; padding: 0; }
.red-band h2 { color: var(--ink); margin-top: 8px; }
.red-band .lead { color: var(--muted); }
.red-band .eyebrow { background: transparent; color: var(--muted); }
.btn-on-red { background: var(--red); color: #fff; }
.btn-on-red-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

.portrait-panel {
  background: #111; min-height: 480px; display: flex; align-items: end; justify-content: center;
  border-radius: var(--radius); overflow: hidden;
}
.portrait-panel img { width: min(420px, 100%); display: block; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.stat strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }
.stat span { color: var(--muted); font-size: 13px; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gallery-grid img, .lightbox-thumb {
  width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); cursor: pointer;
}
.lightbox {
  position: fixed; inset: 0; background: rgba(16,17,20,.92); z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox img { max-width: min(920px, 100%); max-height: 86vh; border-radius: var(--radius); }

.site-footer { background: var(--navy); color: #fff; padding: 56px 0 28px; }
.footer-grid { display: grid; gap: 32px; }
.footer-grid a { text-decoration: none; color: #c4c1bb; }
.footer-grid a:hover { color: #fff; }
.footer-text { color: #c4c1bb; max-width: 340px; }
.footer-phone { color: #fff; font-weight: 600; margin-top: 12px; }
.footer-links { display: grid; gap: 8px; margin-top: 12px; }
.footer-legal { margin-top: 28px; color: #777; font-size: 13px; }

.wa-float {
  position: fixed; right: 16px; bottom: 86px; z-index: 60;
  background: #128c7e; color: #fff; width: 54px; height: 54px; border-radius: 999px;
  display: grid; place-items: center;
  text-decoration: none; font-size: 13px; font-weight: 800;
}

.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18); text-decoration: none; font-size: 11px; font-weight: 800; color: #fff;
}
.socials a.fb, .socials a.ig, .socials a.tt, .socials a.yt, .socials a.x, .socials a.wa { background: transparent; color: inherit; }

.form { display: grid; gap: 8px; }
.form input, .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font: inherit; background: #fff;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225, 6, 19, .12);
}
.form input[type="checkbox"] { width: 18px; height: 18px; padding: 0; box-shadow: none; flex-shrink: 0; }
.form input[type="file"] { background: var(--bg); padding: 10px; }
.form label {
  display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px;
}
.form-grid { display: grid; gap: 14px; }
.card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.card li { margin: 6px 0; }

.admin-shell { display: grid; min-height: 100vh; }
.admin-side { background: var(--navy); color: #fff; padding: 24px 18px; }
.admin-side a {
  display: block; color: #c9cdd4; text-decoration: none; padding: 10px 12px;
  border-radius: 8px; font-size: 14px;
}
.admin-side a.active, .admin-side a:hover { background: var(--red); color: #fff; }
.admin-main { padding: 28px 20px; background: var(--bg); }

.cards-3, .cards-2, .split { display: grid; gap: 14px; }
.prose p { margin: 0 0 14px; line-height: 1.8; color: #3f4550; }

.tag {
  display: inline-block; padding: 4px 0; border-radius: 0;
  background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.tag.soft { background: transparent; color: var(--muted); }
.tag-amber, .tag.amber, .tag-sky, .tag.sky, .tag-green, .tag.green, .tag-teal, .tag.teal, .tag-gold, .tag.gold, .tag-violet {
  background: transparent; color: var(--muted);
}

.poll-bar { margin-top: 12px; height: 4px; border-radius: 0; background: var(--sand); overflow: hidden; }
.poll-bar > div { height: 100%; background: var(--red); }
.poll-amber, .poll-teal, .poll-green, .poll-sky { background: var(--paper); }

.page-hero, .page-hero.gold, .page-hero.teal, .page-hero.sky, .page-hero.green {
  padding: 40px 0 8px; background: transparent; border: 0;
}
.page-hero .container {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.page-hero p { color: var(--muted); max-width: 640px; margin: 0; }
.page-hero + .section { padding-top: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chip {
  display: inline-flex; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  text-decoration: none; background: transparent; border: 1px solid var(--line); color: var(--ink);
}
.chip:hover { border-color: var(--ink); }

.steps { display: grid; gap: 12px; margin: 8px 0 28px; }
.step {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
  border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
}
.step b {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  color: #fff; background: var(--red); flex-shrink: 0; font-size: 13px;
}
.step:nth-child(1) b, .step:nth-child(2) b, .step:nth-child(3) b { background: var(--red); }
.step p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.choice {
  padding: 16px; text-align: left; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; width: 100%; font: inherit;
}
.choice p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.choice.on-green, .choice.on-sky, .choice.on-red { border-color: var(--red); background: var(--red-soft); }

.quote { padding: 28px; border-radius: var(--radius); background: var(--paper); border-left: 3px solid var(--red); }
.quote p { font-family: var(--font-display), Georgia, serif; font-size: 26px; line-height: 1.35; margin: 0; font-weight: 500; }

.tone-red, .tone-gold, .tone-teal, .tone-sky, .tone-green, .tone-amber, .tone-violet { border-top: 0; }
.result-head { padding: 16px 18px; background: var(--navy); color: #fff; font-weight: 800; }
.photo-ph { background: var(--sand); min-height: 160px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.privacy { background: var(--red-soft); border: 1px solid #ead4d4; border-radius: var(--radius); padding: 14px; font-size: 13px; line-height: 1.6; color: #6b1a20; }

.cat-barrio, .cat-plaza, .cat-salud, .cat-club, .cat-deporte, .cat-educacion, .cat-institucion, .cat-turismo { border-top: 0; border-left: 3px solid var(--red); }
.cat-plaza { border-left-color: #64748b; }
.cat-salud { border-left-color: #475569; }
.cat-club, .cat-turismo { border-left-color: var(--gold); }
.cat-deporte { border-left-color: var(--green); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.action-card { padding: 22px; text-decoration: none; min-height: 168px; display: flex; flex-direction: column; }
.action-card p { color: var(--muted); font-weight: 500; margin: 0; }
.action-icon {
  width: 36px; height: 36px; border-radius: 999px; background: transparent; color: var(--red);
  border: 1px solid var(--red);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 10px;
}
.map-block { margin-top: 16px; }
.citizen-map, .picker-map { height: 480px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.picker-map { height: 360px; cursor: crosshair; }
.location-picker { display: grid; gap: 8px; }
.location-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.location-picker-head label { margin: 0; }
.location-hint { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.location-ok { margin: 0; font-size: 13px; color: var(--green); font-weight: 700; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; }
.map-dot.outline { background: rgba(225, 6, 19, 0.2); border: 2px solid var(--red); }
.map-dot.barrio { background: #fff; border: 2px solid var(--red); }
.map-dot.report { background: var(--red); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.mobile-dock {
  display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55;
  background: rgba(244, 241, 234, .94); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 16px;
  justify-content: space-around; padding: 8px 6px;
}
.mobile-dock a {
  text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted);
  padding: 8px 6px; border-radius: 10px;
}
.mobile-dock a.active { color: var(--red); background: transparent; }
.mobile-dock .dock-main { background: var(--red); color: #fff !important; padding: 8px 14px; }

@media (min-width: 980px) {
  .page-wrap { padding-bottom: 0; }
  .mobile-dock { display: none; }
  .wa-float { bottom: 22px; }
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
  .hero-app-grid { grid-template-columns: 1fr 1fr; gap: 48px; min-height: 520px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 230px 1fr; }
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-2 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .photo-row { grid-template-columns: 1.15fr 1fr 1fr; }
  .photo-row img { height: 280px; }
  .feature-gestion { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .feature-gestion img { height: 440px; }
}
