/* ============================================================
   Aqua Monitor IoT — Stylesheet compartido entre páginas
   ============================================================ */

:root {
  --aqua-50:  #e6fbff;
  --aqua-100: #caf0f8;
  --aqua-200: #90e0ef;
  --aqua-300: #48cae4;
  --aqua-400: #00b4d8;
  --aqua-500: #0096c7;
  --aqua-600: #0077b6;
  --aqua-700: #023e8a;
  --aqua-800: #03045e;
  --teal:  #06b6a4;
  --coral: #ff6b6b;
  --amber: #ffb43a;
  --green: #22c55e;
  --violet: #a78bfa;
  --bg:        #060e1a;
  --bg-soft:   #0a1628;
  --bg-elev:   #10213a;
  --bg-card:   #0e1e36;
  --border:    rgba(144, 224, 239, 0.10);
  --border-strong: rgba(144, 224, 239, 0.22);
  --text:      #e8f1fb;
  --text-soft: #93a8c0;
  --text-mute: #5d738f;
  --primary:   var(--aqua-300);
  --primary-fg: #051628;
  --font-display: 'Fraunces', serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --max: 1240px;
  --easing: cubic-bezier(.4,.0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--aqua-300); color: var(--primary-fg); }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(0,180,216,.15), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 60%, rgba(6,182,164,.08), transparent 60%);
  z-index: -1;
}
/* Fish canvas sits at z-index 0 (set inline by JS), content above */
section, footer { position: relative; z-index: 1; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(6, 14, 26, .72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--aqua-300), var(--aqua-600));
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0,180,216,.3);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand .accent { color: var(--aqua-300); font-weight: 700; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s var(--easing);
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--aqua-300); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all .25s var(--easing);
  white-space: nowrap;
}
.btn-primary { background: var(--aqua-300); color: var(--primary-fg); }
.btn-primary:hover {
  background: var(--aqua-200);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,180,216,.35);
}
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--aqua-300); background: rgba(72,202,228,.05); }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-text {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}
.btn-text:hover { color: var(--aqua-300); }
.menu-toggle { display: none; }

/* ============================================================
   PAGE HEADER (para páginas internas)
   ============================================================ */
.page-header {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.breadcrumb a { color: var(--text-mute); transition: color .2s; }
.breadcrumb a:hover { color: var(--aqua-300); }
.breadcrumb .sep { margin: 0 10px; opacity: 0.5; }
.page-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--aqua-300);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 60px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.page-title em { font-style: italic; color: var(--aqua-300); font-weight: 400; }
.page-lead {
  font-size: 19px;
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ============================================================
   COMMON SECTION STYLES
   ============================================================ */
section { padding: 80px 0; position: relative; }
.section-head {
  text-align: center;
  margin-bottom: 60px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--aqua-300);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
h2 em { font-style: italic; color: var(--aqua-300); font-weight: 400; }
h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.section-sub { font-size: 17px; color: var(--text-soft); line-height: 1.6; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
.form-row { grid-column: span 2; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
  margin-bottom: 8px;
}
.form-label .req { color: var(--coral); margin-left: 3px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all .2s var(--easing);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--aqua-300);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(72,202,228,.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-brand .brand { margin-bottom: 16px; }
.foot-brand p {
  font-size: 13px;
  color: var(--text-mute);
  max-width: 280px;
  line-height: 1.55;
}
.foot-col h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--aqua-300);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 13px;
  color: var(--text-mute);
  padding: 5px 0;
  transition: color .2s var(--easing);
}
.foot-col a:hover { color: var(--aqua-300); }
.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-mute);
}
.foot-bottom .credits a {
  color: var(--aqua-300);
  font-weight: 500;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--easing), transform .8s var(--easing);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   UTILITY CARDS
   ============================================================ */
.card {
  background: linear-gradient(165deg, var(--bg-card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all .3s var(--easing);
}
.card:hover {
  border-color: var(--border-strong);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}
.legal-content h2 {
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 19px;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}
.legal-content p { margin-bottom: 14px; }
.legal-content ul, .legal-content ol {
  margin-bottom: 14px;
  padding-left: 24px;
}
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--text); }
.legal-content .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* TABLET / MOBILE-LARGE */
@media (max-width: 960px) {
  /* ---- NAVBAR MÓVIL ---- */
  .nav-links {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 14, 26, 0.98);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s var(--easing), opacity .25s var(--easing);
    z-index: 99;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 8px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-links a:last-child { border-bottom: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    transition: all .2s var(--easing);
    z-index: 101;
    position: relative;
  }
  .menu-toggle:hover,
  .menu-toggle.open {
    border-color: var(--aqua-300);
    color: var(--aqua-300);
  }
  .nav-actions .btn-text { display: none; }
  body.menu-open { overflow: hidden; }

  /* ---- LAYOUT GENERAL ---- */
  section { padding: 60px 0; }
  .page-header { padding: 50px 0 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { grid-column: span 1; }
}

/* MOBILE (≤ 720px) — ajustes finos de padding y tipografía */
@media (max-width: 720px) {
  /* Wrap con padding más controlado */
  .wrap { padding: 0 20px; }

  /* Navbar más compacto */
  .nav-inner { height: 64px; }
  .nav-links { top: 64px; max-height: calc(100vh - 64px); }
  .brand { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .btn-lg { padding: 11px 18px; font-size: 14px; }

  /* Page header ajustado */
  .page-header { padding: 36px 0 28px; }
  h1.page-title { font-size: clamp(28px, 7vw, 38px); line-height: 1.1; }
  .page-lead { font-size: 16px; line-height: 1.5; }
  .breadcrumb { font-size: 11px; margin-bottom: 14px; }
  .page-eyebrow { font-size: 11px; margin-bottom: 12px; }

  /* Secciones más compactas */
  section { padding: 48px 0; }
  h2 { font-size: clamp(24px, 6.5vw, 34px); line-height: 1.15; }
  h3 { font-size: 20px; }
  .section-head { margin-bottom: 36px; }
  .section-sub { font-size: 15px; line-height: 1.55; }

  /* Cards más compactos */
  .card { padding: 22px; border-radius: 16px; }

  /* Forms */
  .form-grid { gap: 14px; }
  .form-input, .form-select, .form-textarea { font-size: 16px; }
  /* font-size 16px en inputs previene el auto-zoom de iOS Safari */

  /* Footer */
  .foot-grid { gap: 28px; margin-bottom: 28px; }
  .foot-brand p { font-size: 13px; }
  .foot-bottom { font-size: 11px; flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Legal content */
  .legal-content { font-size: 14px; line-height: 1.65; }
  .legal-content h2 { font-size: 22px; margin-top: 36px; }
  .legal-content h3 { font-size: 17px; margin-top: 22px; }
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .4);
  transition: all .25s var(--easing);
  animation: wp-bounce-in .5s var(--easing) both;
}
.whatsapp-float:hover {
  background: #20bd5a;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37, 211, 102, .5);
  color: #fff;
}
.whatsapp-float svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.whatsapp-float .wp-label {
  white-space: nowrap;
}
@keyframes wp-bounce-in {
  0%   { opacity: 0; transform: translateY(40px) scale(.85); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 98;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--aqua-300);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s var(--easing), transform .3s var(--easing), border-color .2s var(--easing), background .2s var(--easing);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover {
  border-color: var(--aqua-300);
  background: var(--aqua-300);
  color: var(--primary-fg);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 180, 216, .3);
}
.scroll-top svg {
  width: 18px;
  height: 18px;
  transition: transform .2s var(--easing);
}
.scroll-top:hover svg {
  transform: translateY(-1px);
}
/* Push slightly to the right on mobile so it doesn't overlap the WhatsApp button */
@media (max-width: 480px) {
  .scroll-top {
    bottom: 18px;
    left: 16px;
    width: 40px;
    height: 40px;
  }
  .scroll-top svg {
    width: 16px;
    height: 16px;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* SMALL MOBILE (≤ 480px) */
@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 18px;
    right: 16px;
    padding: 12px 16px;
    font-size: 13px;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(37, 211, 102, .35);
  }
  .whatsapp-float svg {
    width: 20px;
    height: 20px;
  }
  .wrap { padding: 0 16px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  h1.page-title { font-size: clamp(26px, 8vw, 32px); }
  .page-lead { font-size: 15px; }
  h2 { font-size: clamp(22px, 7vw, 28px); }
  .nav-actions { gap: 6px; }
  .btn { padding: 8px 12px; font-size: 12px; }

  /* CTA buttons más compactos */
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .cta-buttons .btn { width: 100%; justify-content: center; }
}
