@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap');

:root {
  --bg: #eff3f8;
  --bg-2: #f8fbff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(26, 58, 105, 0.10);
  --line-strong: rgba(26, 58, 105, 0.18);
  --text: #10284d;
  --muted: #567092;
  --brand: #14396d;
  --brand-2: #2f6eb5;
  --navy: #0b1f3f;
  --accent: #66b8ff;
  --success: #25d366;
  --warning: #f3b63f;
  --shadow: 0 18px 60px rgba(18, 46, 84, 0.10);
  --shadow-soft: 0 10px 30px rgba(18, 46, 84, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  background:
    linear-gradient(rgba(16, 40, 77, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 40, 77, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f6f8fc 0%, #eef3f8 38%, #f8fbff 100%);
  background-size: 40px 40px, 40px 40px, auto;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 84px 0 0 0;
  background: url('assets/logosinfondotp.svg') center 170px / min(820px, 66vw) no-repeat;
  opacity: 0.18;
  filter: saturate(1.05);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(130, 182, 255, 0.18), transparent 34%);
  pointer-events: none;
  z-index: -3;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

/* =========================
   NAVBAR
========================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 31, 63, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(4, 14, 30, 0.18);
}

.navbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-text span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220, 232, 255, 0.78);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.nav-links a {
  color: rgba(232, 241, 255, 0.84);
  padding: 12px 16px;
  border-radius: 999px;
  transition: 0.24s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 1;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
}

.nav-mobile-cta {
  display: none;
}

/* =========================
   BOTONES
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.24s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.nav-cta {
  background: linear-gradient(135deg, #6ea3d4, #4f7ea8);
  color: #ffffff;
  border: 1px solid rgba(125, 170, 220, 0.32);
  box-shadow: 0 10px 24px rgba(20, 57, 109, 0.16);
}

.topbar .nav-cta {
  height: 48px;
  min-height: 48px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  text-align: center;
  line-height: 1;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
  flex: 0 0 auto;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary:hover,
.nav-cta:hover {
  background: linear-gradient(135deg, #5f93c2, #446f95);
  box-shadow: 0 14px 28px rgba(20, 57, 109, 0.20);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.65);
  color: var(--brand);
  border-color: rgba(34, 72, 118, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.email-btn {
  background: linear-gradient(135deg, #f3b63f, #e0a02c);
  color: #14253f;
  border-color: rgba(174, 123, 19, 0.24);
}

.email-btn:hover {
  background: linear-gradient(135deg, #e9ad3d, #d3931f);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #16af52);
  color: #fff;
  border-color: rgba(14, 129, 58, 0.24);
}

.whatsapp-btn:hover {
  background: linear-gradient(135deg, #22c85f, #12974a);
}

/* =========================
   TEXTOS AUXILIARES
========================= */

.smallcaps,
.eyebrow,
.tag,
.label,
.tagline {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #55709a;
}

.tag,
.label,
.tagline {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(26, 58, 105, 0.07);
  border: 1px solid rgba(26, 58, 105, 0.08);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

main {
  overflow: clip;
}

/* =========================
   HERO / PAGE HERO
========================= */

.hero {
  padding: 38px 0 18px;
}

.page-hero {
  padding: 22px 0 6px;
}

.section {
  padding: 18px 0 34px;
}

.section + .section {
  padding-top: 8px;
}

.page-hero + .section,
.hero + .section {
  padding-top: 0;
}

.hero-grid,
.two-col,
.contact-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 26px;
  align-items: stretch;
}

.hero .container,
.page-hero .container {
  position: relative;
  z-index: 1;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(1.4rem, 2.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
  max-width: 100%;
  width: 100%;
  text-wrap: normal;
}

.hero .lead,
.page-hero p {
  max-width: 100%;
  margin: 0;
}

.hero .lead,
.page-hero p,
.section-header p,
.panel p,
.card p,
.service-card p,
.project-card p,
.hero-card p,
.contact-card p,
.form-note,
.band span,
li,
label {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}

.hero-actions,
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

/* =========================
   TARJETAS / PANELS
========================= */

.hero-card,
.panel,
.card,
.service-card,
.project-card,
.contact-card,
.form-card,
.metric,
.logo-panel,
.band,
.media-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.76));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.panel,
.contact-card,
.form-card,
.media-card,
.logo-panel {
  padding: 28px;
}

.card,
.service-card,
.project-card,
.metric {
  padding: 24px;
}

.band {
  padding: 22px 24px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-card h3,
.panel h3,
.card h3,
.service-card h3,
.project-card h3,
.contact-card h3,
.form-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.2;
  margin: 8px 0 12px;
}

/* =========================
   GRIDS
========================= */

.hero-stats,
.grid-3,
.service-grid,
.project-grid,
.metric-grid {
  display: grid;
  gap: 18px;
}

.hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.grid-3,
.service-grid,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-stat,
.metric {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.mini-stat strong,
.metric strong {
  display: block;
  color: var(--brand);
  margin-bottom: 6px;
  font-size: 1rem;
}

/* =========================
   HEADERS DE SECCIÓN
========================= */

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-header h2 {
  margin: 10px 0 0;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.1;
}

.section-header > p {
  max-width: 42ch;
}

/* =========================
   LISTAS
========================= */

.bullet-list,
.service-list,
.contact-list {
  margin: 16px 0 0;
  padding-left: 18px;
}

.bullet-list li,
.service-list li,
.contact-list li {
  margin-bottom: 8px;
}

.contact-list a {
  color: var(--brand-2);
}

/* =========================
   ABOUT / MEDIA
========================= */

.logo-panel,
.media-card {
  display: grid;
  place-items: center;
  min-height: 100%;
}

.media-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 18px;
}

.logo-panel img {
  width: min(100%, 320px);
  opacity: 0.95;
}

.project-card .meta {
  color: #6a82a5;
  margin: 8px 0 14px;
}

.highlight {
  background: linear-gradient(135deg, rgba(26, 58, 105, 0.88), rgba(54, 102, 164, 0.86));
  border-color: rgba(255, 255, 255, 0.10);
}

.highlight strong,
.highlight span {
  color: #f6fbff;
}

/* =========================
   FORMULARIO
========================= */

.form-card form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(26, 58, 105, 0.15);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 110, 181, 0.44);
  box-shadow: 0 0 0 4px rgba(79, 138, 205, 0.12);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.wa-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.wa-text small {
  opacity: 0.8;
  font-size: 0.72rem;
}

/* =========================
   FOOTER
========================= */

footer {
  padding: 28px 0 42px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #597292;
  font-size: 0.92rem;
}

.footer-grid a {
  color: var(--brand);
}

/* =========================
   HOVER
========================= */

.reveal-up {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.reveal-up:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 50px rgba(18, 46, 84, 0.14);
}

/* =========================
   LARGE TABLET / SMALL DESKTOP
========================= */

@media (max-width: 1200px) {
  .topbar .nav-cta {
    padding: 0 22px;
    font-size: 0.92rem;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text span {
    font-size: 0.66rem;
  }
}

/* =========================
   TABLET
========================= */

@media (max-width: 1100px) {
  .grid-3,
  .service-grid,
  .project-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero h1,
  .page-hero h1 {
    max-width: 100%;
    width: 100%;
    font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  }

  .navbar {
    gap: 14px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding: 10px 12px;
  }
}

/* =========================
   MOBILE NAV / STACK
========================= */

@media (max-width: 920px) {
  body::before {
    background: url('assets/logosinfondotp.svg') center 140px / min(420px, 72vw) no-repeat;
    opacity: 0.11;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    min-height: 78px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 10px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text span {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar .nav-cta {
    display: none !important;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 26, 52, 0.98), rgba(13, 36, 70, 0.97));
    border: 1px solid rgba(122, 167, 241, 0.14);
    box-shadow: 0 16px 34px rgba(5, 16, 34, 0.22);
    z-index: 30;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-mobile-cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 6px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #5b8db8, #4f7fa8);
    border: 1px solid rgba(79, 127, 168, 0.35);
    color: #f6fbff !important;
    font-weight: 600;
    text-align: center;
  }

  .hero-grid,
  .two-col,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px 0 14px;
  }

  .page-hero {
    padding: 18px 0 6px;
  }

  .section {
    padding: 16px 0 28px;
  }

  .hero h1,
  .page-hero h1 {
    max-width: 100%;
    width: 100%;
    font-size: clamp(1.25rem, 5.4vw, 2rem);
    line-height: 1.08;
    margin: 8px 0 14px;
  }

  .hero .lead,
  .page-hero p {
    max-width: 100%;
  }

  .metric-grid,
  .hero-stats,
  .grid-3,
  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-header,
  .band,
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 22px), var(--max));
  }

  .hero-card,
  .panel,
  .contact-card,
  .form-card,
  .media-card,
  .logo-panel,
  .card,
  .service-card,
  .project-card,
  .metric,
  .band {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-actions,
  .btn-row,
  .band {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn-row .btn,
  .hero-actions .btn,
  .band .btn {
    width: 100%;
  }

  .hero {
    padding: 24px 0 12px;
  }

  .page-hero {
    padding: 16px 0 4px;
  }

  .section {
    padding: 14px 0 24px;
  }
}

/* =========================
   VERY SMALL DEVICES
========================= */

@media (max-width: 420px) {
  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand-text strong {
    font-size: 0.84rem;
  }

  .brand-text span {
    font-size: 0.52rem;
    letter-spacing: 0.06em;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.15rem, 7vw, 1.7rem);
  }

  .hero .lead,
  .page-hero p,
  .section-header p,
  .panel p,
  .card p,
  .service-card p,
  .project-card p,
  .hero-card p,
  .contact-card p,
  .form-note,
  .band span,
  li,
  label {
    font-size: 0.95rem;
  }
}
