/* ============================================================
   TERALIS — MAIN STYLESHEET
   Paleta: Blanco #FFFFFF | Celeste #E8F4FD | Azul medio #4A9FD4 | Azul oscuro #0D2B4E
   Fuentes: Playfair Display (display) + DM Sans (cuerpo)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- VARIABLES ---- */
:root {
  --white:       #FFFFFF;
  --ice:         #F0F8FF;
  --sky-light:   #E8F4FD;
  --sky:         #C5E3F7;
  --blue-mid:    #4A9FD4;
  --blue:        #1A6FA8;
  --blue-dark:   #0D2B4E;
  --blue-ink:    #071828;
  --accent:      #2E8BC0;
  --text-main:   #0D2B4E;
  --text-soft:   #4A6580;
  --text-muted:  #7A96B0;
  --border:      #D0E8F5;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   28px;
  --radius-xl:   48px;

  --shadow-sm:   0 2px 8px rgba(13,43,78,0.07);
  --shadow-md:   0 8px 32px rgba(13,43,78,0.10);
  --shadow-lg:   0 20px 60px rgba(13,43,78,0.13);

  --transition:  0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w:       1160px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--sky-light); }
::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 3px; }

/* ---- SELECCIÓN ---- */
::selection { background: var(--sky); color: var(--blue-dark); }

/* ---- CONTENEDOR ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- LOGO EN NAV ---- */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
}
/* ===========================================================
   SLOT LOGO NAV
   Reemplaza el div.nav__logo-img por una etiqueta <img>:
   <img src="../assets/logo.png" alt="Teralis" class="nav__logo-img">
   =========================================================== */
/* Logo completo (ícono + TERALIS) en navbar */
.nav__logo-full {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Logo blanco en footer oscuro */
.footer__logo-full {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover, .nav__link.active {
  color: var(--blue-dark);
  background: var(--sky-light);
}
.nav__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: var(--blue-dark);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}
.nav__cta:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav */
.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 16px 32px 24px;
  border-top: 1px solid var(--border);
  gap: 4px;
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link { display: block; padding: 12px 0; font-size: 1rem; }
.nav__mobile .nav__cta { display: inline-block; margin-top: 8px; text-align: center; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-dark);
  color: var(--white);
  border-color: var(--blue-dark);
}
.btn-primary:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,43,78,0.22);
}
.btn-secondary {
  background: transparent;
  color: var(--blue-dark);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--blue-mid);
  background: var(--sky-light);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ============================================================
   SECCIONES COMUNES
   ============================================================ */
.section { padding: 100px 0; }
.section--ice { background: var(--ice); }
.section--sky { background: var(--sky-light); }
.section--dark {
  background: var(--blue-dark);
  color: var(--white);
}

.section__eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--blue-mid);
  flex-shrink: 0;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.section__title--white { color: var(--white); }
.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-soft);
  max-width: 580px;
  line-height: 1.7;
}
.section__subtitle--white { color: rgba(255,255,255,0.72); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sky);
}
.card__icon {
  width: 52px;
  height: 52px;
  background: var(--sky-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 10px;
}
.card__text {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ============================================================
   TAGS / BADGES
   ============================================================ */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--sky-light);
  color: var(--blue);
  border: 1px solid var(--border);
}
.tag--dark {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.2);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue));
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--blue-ink);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ===========================================================
   SLOT LOGO FOOTER
   Reemplaza el span.footer__logo-box por:
   <img src="assets/logo.png" alt="Teralis" style="width:32px;height:32px;border-radius:8px;">
   =========================================================== */
.footer__logo-box {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue-mid), var(--accent));
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: white;
}
.footer__desc {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}
.footer__rut {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-family: 'Courier New', monospace;
}
.footer__heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom-links { display: flex; gap: 20px; }
.footer__bottom-links a { color: rgba(255,255,255,0.3); transition: color var(--transition); }
.footer__bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.anim-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__desc { max-width: 100%; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .btn { padding: 12px 22px; font-size: 0.875rem; }
}
