/* ==========================================================================
   Nymexa — Design Tokens
   ========================================================================== */
:root {
  --color-navy: #0B1F3A;
  --color-navy-soft: #142a4d;
  --color-steel: #6B7A8F;
  --color-steel-light: #A7B2C0;
  --color-white: #FFFFFF;
  --color-bg-alt: #F4F6F9;
  --color-border: #E2E6EC;
  --color-accent: #6FE3FF;
  --color-accent-dark: #2FB8D9;

  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 24px 64px rgba(11, 31, 58, 0.16);

  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);

  --container-width: 1180px;
  --header-height: 76px;
}

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

html {
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: #F5F7FA;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(11, 31, 58, 0.10), transparent 45%),
    radial-gradient(circle at 88% 34%, rgba(111, 227, 255, 0.14), transparent 42%),
    radial-gradient(rgba(107, 122, 143, 0.35) 1.4px, transparent 1.4px);
  background-size: auto, auto, 26px 26px;
  background-attachment: fixed;
  background-repeat: no-repeat, no-repeat, repeat;
}

img { max-width: 100%; display: block; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}

.btn-cta {
  background: var(--color-accent);
  color: var(--color-navy);
  box-shadow: 0 4px 14px rgba(111, 227, 255, 0.35);
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(111, 227, 255, 0.45);
}

.btn-lg { padding: 17px 34px; font-size: 1rem; }
.btn-nav { padding: 11px 22px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Visible focus ring for keyboard users on any interactive element that
   doesn't already define its own :focus-visible treatment. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-nav-desktop { flex-shrink: 0; }

.brand-mark { height: 36px; width: 36px; object-fit: contain; }

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

.brand-name-inverse { color: var(--color-white); }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 36px;
}

.site-nav ul {
  display: flex;
  gap: 32px;
}

.site-nav a:not(.btn) {
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--color-navy);
  position: relative;
  padding-bottom: 4px;
}

.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-dark);
  transition: width var(--transition-base);
}

.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn):focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--color-navy);
  padding: 128px 0 96px;
}

.hero-inner { max-width: 860px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-steel);
  margin-bottom: 18px;
}

.eyebrow-inverse { color: var(--color-accent); }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.hero-subtitle {
  margin-top: 28px;
  font-size: 1.2rem;
  color: var(--color-steel-light);
  max-width: 640px;
}

.hero-actions { margin-top: 40px; }

.hero-stats {
  margin-top: 72px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 32px;
}

.hero-stats li { display: flex; flex-direction: column; gap: 4px; }

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-white);
}

.hero-stats .stat-label {
  color: var(--color-steel-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-steel);
}

/* ==========================================================================
   Sections (generic)
   ========================================================================== */
.section { padding: 112px 0; }
.section-alt { background: rgba(244, 246, 249, 0.32); }

.section-heading {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

.section-lead {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--color-steel);
}

.grid { display: grid; gap: 28px; }

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

/* ==========================================================================
   Leak Cards (Problema)
   ========================================================================== */
.leak-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.leak-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.leak-index {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 18px;
}

.leak-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.leak-card p {
  font-size: 0.92rem;
  color: var(--color-steel);
}

/* ==========================================================================
   System Cards (Servicios)
   ========================================================================== */
.system-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.system-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.system-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-navy);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.system-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  line-height: 1.35;
}

.system-card p {
  font-size: 0.94rem;
  color: var(--color-steel);
}

.system-benefits {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.system-benefits li {
  position: relative;
  padding-left: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
}

.system-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  background: var(--color-accent-dark);
  border-radius: 2px;
}

/* ==========================================================================
   Agenda before/after (Resultados — modelo ilustrativo)
   ========================================================================== */
.agenda-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.agenda-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.agenda-panel-highlight {
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-md);
}

.agenda-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-steel);
  margin-bottom: 28px;
}

.agenda-panel-highlight .agenda-panel-title {
  color: var(--color-accent-dark);
}

.agenda-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 190px;
}

.agenda-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.agenda-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-steel);
}

.agenda-bar-track {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 34px;
  height: 140px;
  background: var(--color-bg-alt);
  border-radius: 6px;
  overflow: hidden;
}

.agenda-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-steel);
  border-radius: 6px 6px 0 0;
}

.agenda-bar-fill-after {
  background: var(--color-accent-dark);
}

/* Bar heights as classes rather than inline style="" — this site's CSP
   (style-src with no 'unsafe-inline') blocks inline style attributes. */
.h-56 { height: 56px; }
.h-63 { height: 63px; }
.h-77 { height: 77px; }
.h-84 { height: 84px; }
.h-98 { height: 98px; }
.h-109 { height: 109px; }
.h-112 { height: 112px; }
.h-119 { height: 119px; }
.h-123 { height: 123px; }
.h-129 { height: 129px; }

.agenda-day {
  font-size: 0.78rem;
  color: var(--color-steel);
}

.agenda-total {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-steel);
}

.agenda-total strong {
  color: var(--color-navy);
  font-size: 1.2rem;
}

/* ==========================================================================
   Timeline (Metodología)
   ========================================================================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}

.timeline-step {
  position: relative;
  padding: 32px 24px 24px;
  border-top: 3px solid var(--color-navy);
}

.timeline-marker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-accent-dark);
  margin-bottom: 16px;
}

.timeline-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}

.timeline-step p {
  font-size: 0.92rem;
  color: var(--color-steel);
}

/* ==========================================================================
   ROI Highlight
   ========================================================================== */
.roi {
  background: var(--color-navy);
  padding: 100px 0;
}

.roi-inner {
  max-width: 800px;
  text-align: center;
  margin-inline: auto;
}

.roi h2 {
  color: var(--color-white);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.4;
}

.roi-highlight {
  margin-top: 28px;
  color: var(--color-accent);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-navy);
}

.contact-points {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-points li {
  padding-left: 26px;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-steel);
}

.contact-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
}

.contact-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
}

.form-row input {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-navy);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-row input:focus {
  outline: none;
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 3px rgba(111, 227, 255, 0.25);
}

.form-row input[aria-invalid="true"] {
  border-color: #C0392B;
}

.form-error {
  font-size: 0.8rem;
  color: #C0392B;
  min-height: 1em;
}

/* Honeypot: positioned off-screen rather than display:none, since some
   spam bots specifically skip display:none fields but still fill this. */
.form-row-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row-consent {
  gap: 6px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-steel);
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent-dark);
  flex-shrink: 0;
}

.consent-label a {
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: underline;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-height: 1.2em;
}

.form-status.success { color: #1E7B4D; }
.form-status.error { color: #C0392B; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-navy);
  color: var(--color-steel-light);
  padding: 56px 0 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 320px;
  font-size: 0.88rem;
}

.footer-legal {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.88rem;
  color: var(--color-steel-light);
}

.footer-legal a:hover { color: var(--color-accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-steel);
}

/* ==========================================================================
   Scroll-reveal animation hook (JS toggles .is-visible)
   ========================================================================== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .agenda-compare { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .btn-nav-desktop { display: none; }
  .btn-nav-mobile { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 18px;
  }

  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }

  .grid-5, .grid-4, .timeline { grid-template-columns: 1fr; }

  .hero-stats { gap: 32px; }
}

/* ==========================================================================
   Secondary pages (legal, 404)
   ========================================================================== */
.legal-content {
  max-width: 760px;
}

.legal-content h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--color-navy);
  margin-top: 8px;
}

.legal-content .section-lead {
  margin-top: 18px;
  margin-bottom: 40px;
}

.legal-content article {
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
}

.legal-content article:first-of-type {
  border-top: none;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.legal-content article p {
  font-size: 0.95rem;
  color: var(--color-steel);
}

.legal-content article p + p {
  margin-top: 12px;
}

.legal-content article p a {
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: underline;
}

.legal-note {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--color-steel);
  font-style: italic;
}

.not-found {
  padding: 140px 0;
}

.not-found-inner {
  max-width: 560px;
  text-align: left;
}

.not-found-inner h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 800;
  color: var(--color-navy);
  margin-top: 8px;
}

.not-found-inner .section-lead {
  margin: 18px 0 32px;
}
