:root {
  --bg-900: #0a1f29;
  --bg-850: #0d2430;
  --bg-800: #102a38;
  --bg-700: #123244;
  --text-100: #e8faf6;
  --text-90: #d6f5ee;
  --text-80: #c3eee6;
  --muted: #8fbdb2;
  --accent: #18c29c;
  --accent-900: #0b2c26;
  --accent-800: #129a7d;
  --danger: #f87171;
  --warning: #fbbf24;
  --ok: #34d399;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg-900);
  color: var(--text-100);
  font: 400 16px/1.6 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-800);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 18px;
}

.tagline {
  color: var(--text-80);
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 31, 41, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--bg-800);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.navbar .brand {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

/* Tamaño logo UNIFICADO */
.navbar .brand img {
  height: 48px;
  /* desktop default */
  width: auto;
  /* preserva proporción */
  margin-right: 8px;
}

.navbar .links a {
  color: var(--text-100);
  opacity: .9;
  margin-left: 20px;
  position: relative;
  transition: color .2s ease;
}

.navbar .links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.navbar .links a:hover {
  opacity: 1;
  color: var(--text-100);
}

.navbar .links a:hover::after {
  transform: scaleX(1);
}

.navbar .links a[aria-current="page"] {
  color: var(--accent);
}

.navbar .links a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* HERO más claro con nodos animados */
.hero {
  position: relative;
  padding: 104px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 40% 8%, rgba(24, 194, 156, .14) 0%, rgba(24, 194, 156, 0) 55%),
    linear-gradient(180deg, rgba(10, 31, 41, .15) 0%, rgba(10, 31, 41, .35) 50%, rgba(10, 31, 41, .55) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/hero-nodes-anim.svg") center/cover no-repeat;
  /* ruta FIX */
  opacity: .65;
  mix-blend-mode: screen;
  filter: brightness(1.15) saturate(1.2);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 70% 18%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .05) 70%, rgba(0, 0, 0, .12) 100%);
  pointer-events: none;
}

.hero-title {
  font-size: 48px;
  line-height: 1.1;
  margin: 10px 0 12px;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .35);
}

.hero-subtitle {
  color: var(--text-90);
  max-width: 720px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, filter .2s ease, background-color .2s ease, border-color .2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #06251f;
  box-shadow: 0 6px 16px rgba(24, 194, 156, .25);
}

.btn-primary:hover {
  filter: brightness(.96);
  box-shadow: 0 10px 24px rgba(24, 194, 156, .32);
}

.btn-outline {
  border-color: var(--accent);
  color: var(--text-100);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-900);
  border-color: var(--accent);
}

/* GRID/CARD */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .35);
  border-color: var(--accent-800);
}

.card:focus-within {
  outline: 2px solid rgba(24, 194, 156, .65);
  outline-offset: 3px;
}

.card h3 {
  margin: 0 0 10px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.footer {
  padding: 22px 0;
  text-align: center;
  border-top: 1px solid var(--bg-800);
  color: var(--text-80);
}

label {
  display: block;
  font-weight: 600;
  margin: 10px 0 6px;
}

input,
textarea,
select {
  width: 100%;
  background: var(--bg-850);
  color: var(--text-100);
  border: 1px solid var(--bg-700);
  border-radius: 10px;
  padding: 12px 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 194, 156, .2);
}

.contact-form .btn {
  margin-top: 10px;
}

/* Cookies */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(16, 42, 56, .96);
  border: 1px solid var(--bg-700);
  box-shadow: var(--shadow);
}

.cookie-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--text-90);
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text-100);
  cursor: pointer;
}

.cookie-accept {
  background: var(--accent);
  color: #06251f;
  border: none;
  font-weight: 700;
}

.cookie-btn:hover {
  filter: brightness(.95);
}

/* Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(24, 194, 156, .7);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    opacity: .25;
  }
}

/* Responsive */
@media (max-width:980px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .navbar .brand img {
    height: 44px;
  }

  /* logo igual en todas */
}

@media (max-width:640px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 36px;
  }

  .navbar {
    padding: 12px 16px;
  }

  .navbar .brand img {
    height: 40px;
  }

  /* logo igual en todas */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section {
    padding: 56px 0;
  }
}

/* iOS/Android: suprimir contornos raros en cards */
@media (hover: none) and (pointer: coarse) {
  .card:focus-within {
    outline: none;
    outline-offset: 0;
  }

  .btn:focus,
  .btn:focus-visible,
  a:focus,
  a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 194, 156, .25);
    border-radius: 10px;
  }
}

.cta,
.cta.card,
.cta-panel {
  outline: none !important;
  outline-offset: 0 !important;
}

.cta .hero-buttons,
.cta-panel .hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta .hero-buttons .btn,
.cta-panel .hero-buttons .btn {
  flex: 1 1 220px;
}

.cta,
.cta-panel {
  overflow: hidden;
  border-radius: 16px;
}

.cta.card,
.cta-panel.card {
  border: 1px solid rgba(24, 194, 156, .35);
  outline: none !important;
  outline-offset: 0 !important;
}

@media (max-width: 640px) {

  .cta .hero-buttons .btn,
  .cta-panel .hero-buttons .btn {
    flex: 1 1 100%;
  }
}

/* Evita que el mix-blend del hero afecte a elementos ajenos (navbar, etc.) */
.hero {
  isolation: isolate;
}

/* Quita el destello azul de tap en iOS/Android */
a,
.btn {
  -webkit-tap-highlight-color: transparent;
}

/* Un pelín más de respiro bajo el navbar en pantallas pequeñas */
@media (max-width:640px) {
  .navbar {
    border-bottom-color: rgba(255, 255, 255, .06);
  }
}

/*[logo_and_cta_overrides]*/
/* Logo navbar: tamaño unificado por CSS (sin atributos inline) */
.navbar .brand img {
  height: 48px;
  width: auto;
}

@media (max-width:980px) {
  .navbar .brand img {
    height: 44px;
  }
}

@media (max-width:640px) {
  .navbar .brand img {
    height: 36px;
  }
}

/* CTA buttons: compactos en desktop; 100% en móvil */
.cta .hero-buttons .btn,
.cta-panel .hero-buttons .btn {
  flex: 0 0 auto;
  min-width: 160px;
}

@media (max-width:640px) {

  .cta .hero-buttons .btn,
  .cta-panel .hero-buttons .btn {
    flex: 1 1 100%;
  }
}


/* --- About media layout (Santiago image) --- */
.about-intro {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: start;
}

.about-intro .about-copy>*:first-child {
  margin-top: 0;
}

.about-media img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.about-media figcaption {
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--muted);
}

@media (max-width: 992px) {
  .about-intro {
    grid-template-columns: 1fr;
  }
}


/* Subtle badge for foundation year */
.meta-badge {
  display: inline-block;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--bg-800);
  border: 1px solid var(--bg-700);
  color: var(--muted);
  font-size: .85rem;
  line-height: 1;
  margin-bottom: .75rem;
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}

.about-intro .about-media {
  max-width: clamp(460px, 36vw, 560px);
  width: 100%;
  margin-left: auto;
  margin-bottom: .5rem;
}

.about-intro .about-media img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  /* altura estable */
  object-fit: cover;
  /* recorte agradable si cambia el ratio */
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.about-intro .about-media figcaption {
  margin-top: .4rem;
  font-size: .95rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 992px) {
  .about-intro {
    grid-template-columns: 1fr;
  }

  .about-intro .about-media {
    max-width: 100%;
    margin: 1rem 0 0;
  }
}