:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --accent: #0284c7;      /* Azul Celeste / Sky Blue brillante */
  --accent-light: #e0f2fe;/* Celeste suave para fondos */
  --accent2: #0369a1;     /* Azul profundo para contraste */
  --accent3: #0ea5e9;     /* Celeste intermedio */
  --text: #0f172a;        /* Gris oscuro para legibilidad */
  --muted: #64748b;       /* Gris medio para textos secundarios */
  --border: rgba(2, 132, 199, 0.15);
  --glow: 0 10px 30px rgba(2, 132, 199, 0.1);
}

*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  scroll-behavior: smooth; 
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: .4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-links { 
  display: flex; 
  gap: 2rem; 
  align-items: center;
}
.nav-links a {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { 
  color: var(--accent); 
}

.nav-school-link {
  background: var(--accent-light);
  color: var(--accent2) !important;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(2, 132, 199, 0.2);
  transition: all 0.2s !important;
}
.nav-school-link:hover {
  background: var(--accent);
  color: #ffffff !important;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 6rem 4rem;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(2, 132, 199, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(2, 132, 199, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent-light);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  color: var(--accent2);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp .6s ease both;
  
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.4); }
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.02em;
  animation: fadeUp .6s .1s ease both;
}
h1 .accent { color: var(--accent); }
h1 .small { font-size: 55%; font-weight: 400; display: block; color: var(--muted); letter-spacing: .02em; margin-top: .5rem; }

.hero-desc {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  animation: fadeUp .6s .2s ease both;
}
.hero-desc strong { color: var(--text); }

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  animation: fadeUp .6s .3s ease both;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: .85rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: .85rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(2, 132, 199, 0.02); }

/* ── BASTÓN VISUAL ── */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn .8s .4s ease both;
}

.cane-wrapper {
  position: relative;
  width: 280px;
  height: 520px;
}
.cane-svg { width: 100%; height: 100%; }

.pulse-ring {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: sonar 2s ease-out infinite;
}
.pulse-ring:nth-child(2) { animation-delay: .6s; }
.pulse-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes sonar {
  0% { transform: translateX(-50%) scale(.5); opacity: .8; }
  100% { transform: translateX(-50%) scale(3); opacity: 0; }
}

.esp-chip {
  position: absolute;
  top: 45%; right: -30px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: .6rem .9rem;
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  color: var(--accent2);
  letter-spacing: .05em;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.1);
  white-space: nowrap;
}
.esp-chip::before {
  content: '●';
  color: #22c55e;
  margin-right: .4rem;
  animation: pulse 1.5s infinite;
}

.sensor-tag {
  position: absolute;
  top: 30%; left: -50px;
  background: var(--surface);
  border: 1px solid var(--accent3);
  border-radius: 8px;
  padding: .6rem .9rem;
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  color: var(--accent2);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat { text-align: center; }
.stat-value { font-size: 2.2rem; font-weight: 900; color: var(--accent); line-height: 1; }
.stat-label { font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: .3rem; }

/* ── SECTIONS ── */
section { padding: 6rem 6rem; }
.section-label { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--accent); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1rem; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.section-desc { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 560px; }

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.feature-card { background: var(--surface); border: 1px solid rgba(2, 132, 199, 0.1); border-radius: 12px; padding: 2rem; position: relative; overflow: hidden; transition: border-color .3s, transform .3s, box-shadow .3s; }
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--glow); }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .3s; }
.feature-card:hover::before { opacity: 1; }

.feature-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1.2rem; }
.icon-cyan { background: var(--accent-light); }
.icon-blue { background: rgba(14, 165, 233, 0.1); }
.icon-green { background: rgba(34, 197, 94, 0.1); }

.feature-title { font-size: 1rem; font-weight: 800; margin-bottom: .5rem; }
.feature-desc { font-size: .85rem; color: var(--muted); line-height: 1.6; }

/* ── SPECS ── */
.specs-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.specs-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.specs-table { margin-top: 2rem; border-radius: 10px; overflow: hidden; border: 1px solid rgba(2, 132, 199, 0.15); }
.spec-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid rgba(0,0,0,.04); transition: background .2s; }
.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: rgba(2, 132, 199, 0.02); }
.spec-key { padding: .9rem 1.2rem; font-family: 'Space Mono', monospace; font-size: .75rem; color: var(--muted); border-right: 1px solid rgba(0,0,0,.04); }
.spec-val { padding: .9rem 1.2rem; font-size: .85rem; font-weight: 700; color: var(--text); }
.spec-val.highlight { color: var(--accent2); }

/* ── DIAGRAMA ── */
.diagram-box { margin-top: 2rem; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; position: relative; }
.diagram-title { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 15rem; }
.flow-nodes { display: flex; flex-direction: column; gap: 0; align-items: center; }
.flow-node { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .7rem 1.5rem; font-size: .8rem; font-weight: 700; text-align: center; width: 220px; position: relative; }
.flow-node.sensor-node { border-color: var(--accent3); color: var(--accent2); }
.flow-node.main { background: var(--accent-light); border-color: var(--accent); color: var(--accent2); }
.flow-arrow { width: 2px; height: 28px; background: linear-gradient(to bottom, var(--accent), transparent); margin: 0 auto; }
.flow-arrow.branch-arrow { background: linear-gradient(to bottom, var(--accent3), transparent); }
.flow-row { display: flex; gap: 1.5rem; justify-content: center; width: 100%; }
.flow-node.output { background: #ffffff; border-color: rgba(2, 132, 199, 0.2); color: var(--accent); width: 140px; font-size: .75rem; }

.logic-box { margin-top: 1.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.logic-list { display: flex; flex-direction: column; gap: .6rem; }
.logic-item { display: flex; align-items: center; gap: .8rem; }
.logic-item span { font-size: .8rem; color: var(--muted); }
.logic-item strong { color: var(--text); }
.circle-indicator { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.circle-indicator.green { background: #22c55e; }
.circle-indicator.light-blue { background: #0ea5e9; }
.circle-indicator.blue { background: #0284c7; }
.circle-indicator.danger { background: #ef4444; }

/* ── PASOS ── */
.how-section { background: linear-gradient(to bottom, transparent, var(--accent-light), transparent); }
.how-header { text-align: center; max-width: 600px; margin: 0 auto 1rem; }
.text-center { margin: 0 auto; text-align: center; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; position: relative; }
.steps::before { content: ''; position: absolute; top: 28px; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent3), transparent); opacity: .3; }
.step { text-align: center; padding: 1.5rem 1rem; }
.step-num { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.2rem; font-weight: 900; font-family: 'Space Mono', monospace; color: var(--accent); position: relative; z-index: 1; transition: all .3s; }
.step:hover .step-num { border-color: var(--accent); box-shadow: 0 0 20px rgba(2, 132, 199, 0.2); background: var(--accent-light); }
.step-title { font-weight: 800; font-size: .9rem; margin-bottom: .5rem; }
.step-desc { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ── INTEGRANTES Y EQUIPO (ACTUALIZADO) ── */
.team-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.school-badge { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.5rem; }
.school-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--accent2), var(--accent3)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.school-name { font-size: .95rem; font-weight: 800; }
.school-sub { font-size: .75rem; color: var(--muted); margin-top: .15rem; font-family: 'Space Mono', monospace; }

.section-subtitle { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--accent2); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; border-left: 3px solid var(--accent); padding-left: 0.5rem; }

/* Profesor */
.teacher-section { margin-bottom: 3rem; }
.teacher-card { background: var(--surface); border: 1px solid rgba(2, 132, 199, 0.2); border-left: 5px solid var(--accent); border-radius: 12px; padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1.5rem; box-shadow: var(--glow); max-width: 500px; }
.teacher-avatar { font-size: 2rem; background: var(--accent-light); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.teacher-info .member-name { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.teacher-info .member-role { font-size: 0.8rem; color: var(--muted); font-family: 'Space Mono', monospace; margin-top: 0.2rem; }

/* Alumnos */
.students-section { margin-bottom: 3rem; }
.team-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.team-card { background: var(--surface); border: 1px solid rgba(2, 132, 199, 0.1); border-radius: 12px; padding: 1.5rem; text-align: center; transition: all .3s; }
.team-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(2, 132, 199, 0.08); }
.member-name { font-weight: 800; font-size: 0.95rem; color: var(--text); margin-top: 0.5rem; }
.team-role { font-size: .75rem; color: var(--muted); margin-top: .25rem; font-family: 'Space Mono', monospace; }
.avatar { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto .4rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--surface2); border: 1px solid rgba(2, 132, 199, 0.1); }

/* Motivación */
.motivation-box { margin-top: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; border-left: 4px solid var(--accent); }
.motivation-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.motivation-title { font-size: 1.3rem; font-weight: 900; margin-bottom: .8rem; }
.motivation-desc { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.motivation-desc strong { color: var(--text); }
.badge-column { display: flex; flex-direction: column; gap: .8rem; }

.info-badge { background: var(--bg); border: 1px solid rgba(2, 132, 199, 0.1); border-radius: 8px; padding: 1rem; display: flex; align-items: center; gap: .8rem; }
.badge-emoji { font-size: 1.5rem; }
.badge-text { font-size: .85rem; color: var(--muted); }

/* ── FOOTER ── */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 6rem; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: 'Space Mono', monospace; font-size: .8rem; color: var(--accent); }
.footer-copy { font-size: .75rem; color: var(--muted); text-align: center; }
.footer-copy strong { color: var(--text); }
.footer-year { font-size: .7rem; font-family: 'Space Mono', monospace; color: var(--muted); display: inline-block; margin-top: 0.25rem; }
.footer-version { font-size: .7rem; color: var(--muted); font-family: 'Space Mono', monospace; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 7rem 2rem 3rem; }
  .hero-visual { display: none; }
  .stats-bar { grid-template-columns: repeat(2,1fr); padding: 2rem; }
  section { padding: 4rem 2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .specs-layout { grid-template-columns: 1fr; gap: 2rem; }
  .team-cards { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
  .steps::before { display: none; }
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem; }
  .team-header { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
  .motivation-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .team-cards { grid-template-columns: 1fr; }
  .teacher-card { flex-direction: column; text-align: center; padding: 1.5rem; }
}

/* ── CARTEL DE VERIFICACIÓN EXITOSA (TOAST) ── */
#toast-verificacion {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--surface);
  border-left: 5px solid #22c55e;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(150%); /* Oculto fuera de la pantalla */
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#toast-verificacion.mostrar {
  transform: translateX(0); /* Entra a la pantalla */
}

.toast-icon {
  font-size: 1.8rem;
}

.toast-text h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.toast-text p {
  color: var(--muted);
  font-size: 0.85rem;
}