:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --text: #152033;
  --muted: #5b667a;
  --brand: #0f4c5c;
  --brand-2: #0284c7;
  --border: #d9e2ec;
  --shadow: 0 20px 50px rgba(21, 32, 51, 0.1);
  --wrap: 1080px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-symbol { width: 2.6rem; height: 2.6rem; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.05; font-family: Montserrat, sans-serif; }
.brand-balora { font-size: 0.92rem; font-weight: 700; }
.brand-soluciones { font-size: 0.74rem; font-weight: 600; color: var(--brand); }
.brand-wordmark small { font-size: 0.58rem; color: var(--muted); font-weight: 500; }
.header-end { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.socials { display: flex; align-items: center; gap: 0.4rem; }
.social-link {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.social-link:hover { color: var(--brand); border-color: var(--brand-2); background: #eef6fa; }
.social-link-wa:hover { color: #16a34a; border-color: #86efac; background: #f0fdf4; }
.social-link svg { width: 1rem; height: 1rem; fill: currentColor; }
.socials-footer { margin-top: 0.75rem; }
.socials-footer .social-link { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
.socials-footer .social-link:hover { color: #fff; border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.08); }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--brand); }
.menu-btn { display: none; border: 0; background: none; cursor: pointer; }
.menu-btn span { display: block; width: 1.2rem; height: 2px; margin: 0.28rem auto; background: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.2rem; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--brand-2); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.85rem; }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-light { background: #fff; color: var(--brand); }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; background: linear-gradient(180deg, #f8fbfd 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2rem; align-items: center; }
.kicker {
  margin: 0 0 0.6rem; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-2);
}
h1 {
  margin: 0 0 1rem; font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 400; line-height: 1.1;
}
h1 em { font-style: italic; color: var(--brand); }
.lead { font-size: 1.05rem; color: var(--text); max-width: 52ch; }
.sub { color: var(--muted); max-width: 52ch; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 1.5rem 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: #eef6fa; color: var(--brand); font-size: 0.78rem; font-weight: 700;
}

/* Screenshots */
.shot-wrap { margin: 0; }
.shot-frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.shot-frame-app {
  background: #0b1120;
  border-color: #1e293b;
}
.shot-frame-app img {
  width: 100%;
  height: auto;
}
.shot-wrap figcaption { margin-top: 0.5rem; font-size: 0.78rem; color: var(--muted); text-align: center; }
.shot-wrap-lg { max-width: 920px; margin-inline: auto; }

/* Strip */
.strip { background: var(--brand); color: #fff; padding: 1.25rem 0; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.strip strong { display: block; font-size: 1.6rem; }
.strip span { font-size: 0.82rem; opacity: 0.9; }

/* SENCE — solo enlace oficial (sin logo: ver Ord. Circ. SENCE Nº009) */
.sence-note {
  background: #f8fafc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.sence-note-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem;
}
.sence-note p { margin: 0; font-size: 0.82rem; color: var(--muted); max-width: 72ch; }
.sence-official-link {
  font-size: 0.82rem; font-weight: 700; color: var(--brand-2); white-space: nowrap;
}
.sence-official-link:hover { text-decoration: underline; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { max-width: 680px; margin-bottom: 2rem; }
.section-title.center { margin-inline: auto; text-align: center; }
.section-title h2 { margin: 0 0 0.6rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-title p { margin: 0; color: var(--muted); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: 0 8px 24px rgba(21,32,51,0.04);
}
.card h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--brand); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.about-grid .section-title { margin-bottom: 0; }
.values { display: grid; gap: 0.85rem; }
.value-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: 0 8px 24px rgba(21,32,51,0.04);
}
.value-icon {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 8px; background: #eef6fa; color: var(--brand);
  font-size: 0.9rem; margin-bottom: 0.5rem;
}
.value-card h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--brand); }
.value-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.service {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.service-featured {
  grid-column: span 2; border-color: var(--brand-2);
  box-shadow: var(--shadow); background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
}
.service-slot {
  border-style: dashed; background: rgba(255,255,255,0.65);
}
.service-tag {
  display: inline-block; margin-bottom: 0.65rem; font-size: 0.62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: #eef6fa; color: var(--brand); padding: 0.2rem 0.55rem; border-radius: 999px;
}
.service-tag-muted { background: #f1f5f9; color: var(--muted); }
.service h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--brand); }
.service p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.92rem; }
.service ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.tab {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 0.5rem 1rem; font: inherit; font-size: 0.85rem; font-weight: 700;
  color: var(--muted); cursor: pointer;
}
.tab.active, .tab:hover { border-color: var(--brand-2); color: var(--brand); background: #eef6fa; }

/* Modules */
.modules { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.module {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem;
}
.module span {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 8px; background: #eef6fa; color: var(--brand);
  font-size: 0.75rem; font-weight: 800; margin-bottom: 0.65rem;
}
.module-wide { grid-column: span 2; }

@media (max-width: 1100px) {
  .modules { grid-template-columns: repeat(3, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .service-featured { grid-column: span 2; }
}

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.price {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.price-featured { border-color: var(--brand-2); box-shadow: var(--shadow); }
.pill {
  position: absolute; top: 0.85rem; right: 0.85rem;
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  background: #eef6fa; color: var(--brand); padding: 0.2rem 0.5rem; border-radius: 999px;
}
.amount { font-size: 1.5rem; font-weight: 800; margin: 0.25rem 0 0.75rem; }
.amount small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.price ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.note { margin-top: 1rem; text-align: center; font-size: 0.85rem; color: var(--muted); }

/* CTA */
.cta { background: linear-gradient(135deg, #0f4c5c, #0284c7); color: #fff; padding: 3.5rem 0; }
.cta-inner { text-align: center; max-width: 640px; margin-inline: auto; }
.cta h2 { margin: 0 0 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta p { color: rgba(255,255,255,0.9); margin-bottom: 1.25rem; }

/* Contact */
.contact-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.contact-box { margin-top: 1rem; padding: 1rem; background: var(--bg-alt); border-radius: 12px; }
.contact-box strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.contact-box a { color: var(--brand-2); font-weight: 700; }
.form {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem;
}
.form label { display: grid; gap: 0.3rem; margin-bottom: 0.7rem; font-size: 0.82rem; font-weight: 700; }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; background: #fff;
}
.form-msg { min-height: 1rem; font-size: 0.85rem; margin: 0; }
.form-msg.ok { color: #059669; }
.form-msg.err { color: #dc2626; }

/* Footer */
.footer { background: #0d1b24; color: rgba(255,255,255,0.75); padding: 2.5rem 0 1.25rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand strong { color: #fff; font-size: 1rem; }
.footer-brand p { margin: 0.35rem 0 0; }
.footer-heading {
  display: block; color: #fff; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.65rem;
}
.footer-links { display: grid; gap: 0.35rem; }
.footer-links a:hover { color: #fff; }
.footer a { color: rgba(255,255,255,0.85); }
.footer-bottom { padding-top: 1rem; text-align: center; }
.footer .small { font-size: 0.82rem; opacity: 0.7; }

@media (max-width: 900px) {
  .hero-grid, .cards-3, .modules, .pricing, .contact-grid, .strip-grid,
  .about-grid, .services, .footer-grid { grid-template-columns: 1fr; }
  .service-featured { grid-column: auto; }
  .menu-btn { display: block; }
  .header-end {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.75rem;
    background: #fff; border-bottom: 1px solid var(--border); padding: 1rem;
  }
  .header-end.open { display: flex; }
  .nav { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .socials { justify-content: center; }
  .header-inner { position: relative; }
}
