:root {
  --red: #ef3340;
  --blue: #0033a0;
  --white: #ffffff;
  --green: #2e7d32;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-text { font-weight: 700; letter-spacing: 0.2px; }
.flag { width: 18px; height: 12px; display: inline-block; }
.flag.red { background: var(--red); }
.flag.white { background: var(--white); border: 1px solid #ddd; margin: 0 1px; }
.flag.blue { background: var(--blue); }

.nav { display: flex; gap: 16px; align-items: center; }
.nav a { color: var(--text); opacity: 0.9; font-weight: 500; }
.nav a:hover { opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform .04s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--red), var(--blue)); color: var(--white) !important; box-shadow: var(--shadow); }
.btn-primary:hover { filter: saturate(1.1) brightness(1.02); }
.btn-ghost { background: #f8fafc; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f1f5f9; }

/* Hero */
.hero { padding: 48px 0 16px; background: linear-gradient(180deg, #fff, #fff 60%, #f8fafc); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; position: relative; }
.badge-free { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #fef2f2; color: #991b1b; font-weight: 600; font-size: 12px; margin-bottom: 12px; border: 1px solid #fee2e2; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 10px; }
.hero .muted { color: var(--muted); font-weight: 500; }
.lead { font-size: clamp(16px, 2vw, 20px); margin: 0 0 6px; }
.sublead { color: var(--muted); margin: 0 0 16px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art { position: relative; min-height: 280px; }
.terere-img { position: absolute; right: 24px; bottom: 16px; width: min(40vw, 260px); height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.12)); border-radius: 12px; }
/* flag-band removido por decisión de diseño */

.rotator { display: inline-block; min-width: 160px; color: var(--blue); font-weight: 700; }
.fade { animation: fade 700ms ease; }
@keyframes fade { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 10px; }
.section-intro { color: var(--muted); margin: 0 0 20px; }

/* Video */
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Form */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field.checkbox { flex-direction: row; align-items: center; gap: 10px; }
.form-field label { font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline: none;
  font: inherit;
  background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 51, 160, .1); }
.hint { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; flex-direction: row; align-items: center; gap: 10px; grid-column: 1 / -1; flex-wrap: wrap; }
.form-actions .legal { flex-basis: 100%; }
.legal { color: var(--muted); font-size: 12px; margin: 0; }

/* Inline submit status */
.submit-status { font-size: 12px; line-height: 1.4; }
.submit-status.is-info { color: var(--blue); }
.submit-status.is-success { color: var(--green); }
.submit-status.is-error { color: var(--red); }

.wa-qr { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: 12px; padding: 12px; background: #f8fafc; }
.wa-qr.hidden { display: none; }
.qr-box { width: 180px; height: 180px; background: #fff; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; object-fit: cover; }
.qr-cta p { margin: 0 0 8px; color: var(--muted); }

/* Community */
.community-section p { margin: 0 0 12px; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.project-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.project-title { font-size: 18px; margin: 0; color: var(--text); }
.project-city { font-size: 12px; color: var(--muted); background: #f1f5f9; padding: 4px 8px; border-radius: 999px; }
.project-desc { margin: 0; color: #374151; }
.project-meta { font-size: 12px; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span { font-size: 12px; background: #f3f4f6; border: 1px solid var(--border); padding: 4px 8px; border-radius: 999px; }
.project-actions { margin-top: 4px; }
.project-actions a { font-size: 14px; color: var(--blue); font-weight: 600; }
.project-actions a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.footer-nav { display: flex; gap: 14px; }
.footer-inner p { margin: 0; font-size: 14px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { position: static; min-height: 0; }
  .terere-img { position: absolute; right: 8px; top: -20px; width: 100px; bottom: auto; }
  .hero-copy { padding-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .wa-qr { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  /* Compacción de banderas y menú en mobile */
  .brand { gap: 8px; }
  .flag { width: 16px; height: 10px; }
  .flag.white { margin: 0 0.5px; }
  .nav { display: none; }
}


