/* =====================================================================
   Preu Tesla, estilo Marca: la base compartida del sitio nuevo (/web/sitio/).

   Sale del análisis de preuniversitariotesla.cl (30-sep-2026) y del
   muestrario /web/estilos/. Las reglas que no se negocian:
   - Fondo blanco. Los ocho colores del patrón facetado, nada más.
   - Degradados de a DOS colores, horizontales. Cada bloque toma una pareja.
   - Triángulos solo en los bordes: cinta facetada, confeti en el filo,
     marco quebrado o rombo alrededor de una foto. Nunca detrás de un texto.
   - Esquinas casi rectas, sin vidrio ni brillos.
   Cada página trae su propio CSS de secciones; esto es lo común.
   ===================================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/web/herramientas/fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/web/herramientas/fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/web/herramientas/fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/web/herramientas/fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Pirulen Tesla'; font-display: swap; src: url('/web/herramientas/fonts/pirulen.ttf') format('truetype'); }

:root {
  --magenta: #9d0067; --morado: #5712ac; --lila: #7c4aa8; --azul: #007fd7; --navy: #0b2578;
  --verde: #67ab00; --oro: #f4b300; --rojo: #e0330a;
  --tinta: #1f2033; --texto: #3a3b4c; --suave: #6b6c80; --linea: #e6e4ec; --gris: #f5f7f9;
  --ancho: min(100% - 2.5rem, 1200px);
  --radio: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sombra: 0 10px 30px rgba(20, 22, 58, 0.08), 0 2px 6px rgba(20, 22, 58, 0.05);
  /* parejas de degradado */
  --par-mm: linear-gradient(90deg, var(--magenta), var(--morado));
  --par-vo: linear-gradient(90deg, var(--verde), var(--oro));
  --par-mn: linear-gradient(90deg, var(--morado), var(--navy));
  --par-an: linear-gradient(90deg, var(--azul), var(--navy));
  --par-mr: linear-gradient(90deg, var(--magenta), var(--rojo));
  --par-or: linear-gradient(90deg, var(--oro), var(--rojo));
  --par-va: linear-gradient(90deg, var(--verde), var(--azul));
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body { margin: 0; background: #fff; color: var(--texto); font-family: 'Inter', system-ui, sans-serif; font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(157, 0, 103, 0.18); }
.env { width: var(--ancho); margin-inline: auto; }
.saltar { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 4px; }
.saltar:focus { left: 8px; }

/* ---------- tipografía ---------- */
.pirulen { font-family: 'Pirulen Tesla', 'Inter', sans-serif; font-weight: 400; letter-spacing: 0.02em; }
.etiqueta { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--verde); padding: 5px 12px; border-radius: 3px; letter-spacing: 0.01em; }
.etiqueta--magenta { background: var(--magenta); }
.etiqueta--navy { background: var(--navy); }
.titulo { font-size: clamp(30px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; color: var(--navy); text-wrap: balance; }
.titulo em, .titulo-2 em { font-style: normal; color: var(--magenta); }
.titulo-2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--navy); text-wrap: balance; }
.bajada { font-size: clamp(16px, 1.3vw, 18.5px); color: var(--texto); max-width: 60ch; margin-top: 14px; }
.suave { color: var(--suave); }

/* ---------- botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 4px; font-weight: 700; font-size: 15.5px; color: #fff; background: var(--rojo); transition: transform 0.2s var(--ease), filter 0.2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--navy { background: var(--navy); }
.btn--verde { background: var(--verde); }
.btn--borde { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn svg { width: 18px; height: 18px; }

/* ---------- triángulos (los pinta marca.js) ---------- */
.cinta { display: block; width: 100%; height: 12px; }
.confeti { display: block; width: 100%; height: clamp(60px, 9vw, 120px); pointer-events: none; }
.confeti--abajo { transform: scaleY(-1); }

/* ---------- banda de título en Pirulen ---------- */
.banda { color: #fff; padding: clamp(14px, 1.8vw, 20px) 0; background: var(--par-mr); }
.banda__t { font-family: 'Pirulen Tesla', sans-serif; font-size: clamp(16px, 2.5vw, 32px); letter-spacing: 0.02em; line-height: 1.2; }
.banda__s { font-size: clamp(14px, 1.2vw, 17px); font-weight: 600; opacity: 0.95; margin-bottom: 4px; }
.banda__h { margin: 0; font: inherit; }
.banda__h > span { display: block; }
.banda__h .banda__s { margin: 4px 0 0; }
.banda__h .banda__s:first-child { margin: 0 0 4px; }
.migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; opacity: 0.92; }
.migas a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.banda--vo { background: var(--par-vo); }
.banda--an { background: var(--par-an); }
.banda--mm { background: var(--par-mm); }
.banda--oa { background: linear-gradient(90deg, var(--oro), var(--azul)); }
.banda--mr { background: var(--par-mr); }
.banda--or { background: var(--par-or); }
.banda--mn { background: var(--par-mn); }
.banda--va { background: var(--par-va); }

/* Franja de WhatsApp (Sedes): título, bajada y botón en una línea en escritorio. */
.franja-wsp { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; text-align: center; }
.franja-wsp__s { font-size: clamp(15px, 1.3vw, 18px); font-weight: 600; }
.franja-wsp__btn { color: #0b6b3a; box-shadow: none; }

/* ---------- secciones ---------- */
.sec { padding: clamp(56px, 8vw, 110px) 0; position: relative; }
.sec--gris { background: radial-gradient(120% 80% at 50% 0%, #fff, #eeeef2); }
.sec__cab { display: grid; gap: 6px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec__cab--centro { text-align: center; justify-items: center; }

/* ---------- tarjeta con pareja de degradado (las cifras de la web) ---------- */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cifra { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 4px; color: #fff; background: var(--par, var(--par-mm)); }
.cifra__i { width: 46px; height: 46px; border-radius: 6px; background: rgba(255, 255, 255, 0.94); display: grid; place-items: center; color: var(--c, var(--magenta)); }
.cifra__i svg { width: 26px; height: 26px; }
.cifra b { display: block; font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.cifra span { display: block; font-size: 13.5px; line-height: 1.35; opacity: 0.96; }

/* ---------- tarjeta blanca con barra de color abajo ---------- */
.tarjeta { position: relative; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 26px 24px 30px; overflow: hidden; }
.tarjeta::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--par, var(--par-mm)); }
.tarjeta h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.015em; color: var(--c, var(--morado)); line-height: 1.25; }
.tarjeta p { margin-top: 8px; font-size: 15px; color: var(--texto); }
.tarjeta__i { width: 64px; height: 64px; border-radius: 4px; display: grid; place-items: center; color: #fff; background: var(--par, var(--par-mm)); margin-bottom: 16px; }
.tarjeta__i svg { width: 34px; height: 34px; }

/* ---------- foto en rombo con borde verde y lluvia de triángulos ---------- */
.rombo { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.rombo__lluvia { position: absolute; inset: -9%; width: 118%; height: 118%; }
.rombo__borde { position: absolute; inset: 7%; background: var(--verde); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rombo__foto { position: absolute; inset: calc(7% + 9px); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); overflow: hidden; background: var(--gris); }
.rombo__foto img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- foto con marco quebrado (triángulos en el borde) ---------- */
.quebrado { position: relative; }
.quebrado img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.quebrado__marco { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); pointer-events: none; }

/* ---------- encabezado ---------- */
/* Encabezado doble: la franja gris de arriba mide --alto-top y el encabezado
   se pega con top negativo igual a ese alto. Al bajar, la franja sube con la
   página y queda fija solo la barra del logo; sin JS y sin que nada salte. */
.cab { --alto-top: 44px; position: sticky; top: calc(var(--alto-top) * -1); z-index: 50; background: #fff; transition: box-shadow 0.25s; }
.cab__top { height: var(--alto-top); background: #ececec; }
.cab__top-env { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cab__top a { display: inline-flex; align-items: center; gap: 8px; font-family: 'Pirulen Tesla', sans-serif; font-size: clamp(10px, 2.7vw, 13px); letter-spacing: 0.02em; color: #111; white-space: nowrap; }
.cab__top a:hover { color: var(--magenta); }
.cab__top svg { width: 22px; height: 22px; flex: none; }
@media (max-width: 520px) { .cab__top a { font-size: clamp(8.5px, 2.35vw, 11px); gap: 6px; } .cab__top svg { width: 18px; height: 18px; } }
@media (max-width: 380px) { .cab { --alto-top: 40px; } }
.cab.con-sombra { box-shadow: 0 6px 24px rgba(20, 22, 58, 0.08); }
.cab__barra { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 11px; line-height: 1; color: #111; flex: none; }
.logo__t { display: block; width: auto; height: 46px; flex: none; }
.logo__txt { display: grid; }
.logo__a { font-family: 'Pirulen Tesla', sans-serif; font-size: 11.5px; letter-spacing: 0.03em; }
.logo__b { font-family: 'Pirulen Tesla', sans-serif; font-size: 30px; letter-spacing: 0.01em; margin-top: 3px; }
.menu { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); margin-left: auto; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.menu a { position: relative; padding: 6px 0; }
.menu a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--par-mr); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.menu a:hover::after, .menu a[aria-current="page"]::after { transform: scaleX(1); }
.menu a[aria-current="page"] { color: var(--magenta); }
.cab__cta { min-height: 42px; padding: 9px 18px; font-size: 14.5px; }
.hamburguesa { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 4px; color: var(--navy); }
.hamburguesa svg { width: 28px; height: 28px; margin: auto; }
.panel { position: fixed; inset: 0; z-index: 60; background: #fff; display: flex; flex-direction: column; padding: 18px 22px 30px; overflow-y: auto; }
.panel[hidden] { display: none; }
.panel__cab { display: flex; justify-content: space-between; align-items: center; }
.panel__links { display: grid; gap: 4px; margin-top: 26px; }
.panel__links a { font-size: 22px; font-weight: 800; color: var(--navy); padding: 10px 0; border-bottom: 1px solid var(--linea); }
.panel .btn { margin-top: 22px; }
@media (max-width: 1040px) {
  .menu, .cab__cta { display: none; }
  .hamburguesa { display: grid; }
}

/* ---------- pie navy ---------- */
.pie { background: var(--navy); color: #fff; }
.pie__grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 34px; padding: 56px 0 30px; }
.pie .logo { color: #fff; }
.pie .logo__b { font-size: 44px; }
.pie .logo__t { height: 64px; }
.pie__lema { margin-top: 14px; font-size: 17px; max-width: 24ch; }
.pie h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.pie ul a:hover { color: var(--oro); }
.pie__redes { display: flex; gap: 12px; margin-top: 18px; }
.pie__redes a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 4px; color: var(--oro); background: rgba(255, 255, 255, 0.06); transition: background 0.2s; }
.pie__redes a:hover { background: rgba(255, 255, 255, 0.14); }
.pie__redes svg { width: 24px; height: 24px; }
.pie__apps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pie__apps a { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 6px 14px 6px 11px; border-radius: 10px; color: #fff; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); transition: background 0.2s; }
.pie__apps a:hover { background: rgba(0, 0, 0, 0.55); }
.pie__apps svg { width: 22px; height: 22px; flex: none; }
.pie__apps span { display: grid; font-weight: 700; font-size: 15px; line-height: 1.1; }
.pie__apps small { font-size: 10.5px; font-weight: 500; opacity: 0.85; }
.pie__base { border-top: 1px solid rgba(255, 255, 255, 0.2); padding: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13.5px; opacity: 0.85; }
@media (max-width: 860px) { .pie__grid { grid-template-columns: 1fr 1fr; } .pie__marca { grid-column: 1 / -1; } }
/* En el celular, dos columnas: en una sola el pie eran tres pantallas. */
@media (max-width: 480px) { .pie__grid { grid-template-columns: 1fr 1fr; gap: 26px 16px; } .pie__grid a { overflow-wrap: anywhere; } }

/* ---------- botón flotante de WhatsApp ---------- */
.wsp { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease); }
.wsp:hover { transform: scale(1.06); }
.wsp svg { width: 30px; height: 30px; }

/* ---------- entrada al hacer scroll (la maneja marca.js) ---------- */
.js [data-sube] { opacity: 0; transform: translateY(26px); }
.js [data-sube].visto { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-sube] { opacity: 1; transform: none; }
}

/* ---------- bloque del formulario de Contactos CRM ----------
   El formulario lo dibuja /tesla-formulario.js (estilo «degradado», el
   magenta a morado del cotizador de la web original). */
.agenda { display: grid; gap: clamp(22px, 3vw, 40px); align-items: stretch; }
@media (min-width: 980px) { .agenda { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.agenda__lado { display: grid; align-content: start; gap: 16px; }
.contacto-fila { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radio); background: #fff; box-shadow: var(--sombra); }
.contacto-fila i { width: 46px; height: 46px; border-radius: 4px; display: grid; place-items: center; color: #fff; background: var(--par, var(--par-mm)); }
.contacto-fila i svg { width: 24px; height: 24px; }
.contacto-fila b { display: block; color: var(--navy); font-size: 15.5px; }
.contacto-fila span { font-size: 14px; color: var(--suave); }

/* ---------- preguntas frecuentes ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }
.faq details { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; font-weight: 800; color: var(--navy); font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; color: #fff; background: var(--par-mr); font-size: 20px; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--texto); }

/* ---------- testimonios en video (Vimeo en un diálogo) ---------- */
.videos { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; scrollbar-width: thin; }
.video { position: relative; flex: none; width: clamp(170px, 20vw, 230px); aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; scroll-snap-align: start; box-shadow: var(--sombra); background: var(--navy); }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.video:hover img { transform: scale(1.05); }
.video::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 37, 120, 0.85)); }
.video__play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 58px; height: 58px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--magenta); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
.video__play svg { width: 22px; height: 22px; margin-left: 3px; }
.video__nombre { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; color: #fff; font-weight: 800; font-size: 16px; line-height: 1.2; text-align: left; }
.visor { width: min(92vw, 420px); padding: 0; border: 0; border-radius: 10px; background: #000; overflow: visible; }
.visor::backdrop { background: rgba(8, 10, 30, 0.82); }
.visor__marco { position: relative; aspect-ratio: 9 / 16; max-height: 86vh; }
.visor iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; display: block; }
.visor__cerrar { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 4px; background: #fff; color: var(--navy); display: grid; place-items: center; }
.visor__cerrar svg { width: 22px; height: 22px; }

/* ---------- logos (convenios, universidades) ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(18px, 3vw, 40px); }
.logos img { height: clamp(40px, 5vw, 60px); width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.8; transition: filter 0.3s, opacity 0.3s; }
.logos img:hover { filter: none; opacity: 1; }

/* ---------- fondo animado «Arctic Mesh» (componentes/arctic-mesh.js) ----------
   Hielo casi sin color, hecho para texto oscuro. El lienzo va detrás del
   contenido de la sección; con movimiento reducido queda un cuadro quieto. */
.con-hielo { position: relative; isolation: isolate; }
.con-hielo > canvas[data-arctic-mesh] { position: absolute; inset: 0; z-index: -1; }
