/* =========================================================
   Liceo Santa Catalina Labouré — Acceso institucional
   HTML5 + CSS3 + JS vanilla. Sin dependencias.
   Fuente: docs/mockups/login-institucional/styles.css
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  /* Paleta tomada del escudo */
  --liceo-green-dark: #0b4a32;
  --liceo-green: #17803f;
  --liceo-green-vivid: #1f9a4a;
  --liceo-blue: #1f6fd1;
  --liceo-yellow: #f4c21b;
  --liceo-bg: #f4f7f5;
  --liceo-text: #12241b;
  --liceo-muted: #5d6b64;

  --liceo-white: #ffffff;
  --liceo-line: #d7dfdb;
  --liceo-green-soft: #e3f2e7;
  --liceo-blue-soft: #e2edfb;
  --liceo-yellow-soft: #fdf3cf;

  /* Tipografía (sin CDN: pilas del sistema) */
  --font-display: "Merriweather", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Radios, sombras y tiempos */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 24px 60px -20px rgba(11, 74, 50, .35), 0 6px 18px rgba(18, 36, 27, .08);
  --shadow-btn: 0 6px 16px -6px rgba(23, 128, 63, .6);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Espaciado lateral */
  --gutter: clamp(16px, 4vw, 72px);

  /* FOTO REAL DEL HERO: se define inline en institucional-shell.blade.php via asset() */
  --hero-photo: none;

  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--liceo-text);
  background: var(--liceo-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

ul { margin: 0; padding: 0; list-style: none; }

svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--liceo-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1520px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-sm);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }

.btn--primary {
  color: var(--liceo-white);
  background: var(--liceo-green);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--liceo-green-dark); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

.btn--block { width: 100%; min-height: 50px; }

/* ---------- 4. Header ---------- */
.site-header {
  position: relative;
  z-index: 5;
  background: var(--liceo-white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  min-width: 0;
}
.brand__logo { width: clamp(64px, 6.4vw, 104px); height: auto; flex-shrink: 0; }

.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__small,
.brand__name {
  font-family: var(--font-display);
  color: var(--liceo-green-dark);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.08;
}
.brand__small { font-size: clamp(1rem, 1.45vw, 1.45rem); letter-spacing: .02em; }
.brand__name  { font-size: clamp(1.1rem, 1.8vw, 1.8rem); letter-spacing: .01em; }
.brand__tagline {
  margin-top: 8px;
  font-size: clamp(.62rem, .78vw, .8rem);
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--liceo-green-dark);
}
.brand__tagline i { font-style: normal; color: var(--liceo-green); margin-inline: .25em; }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }

.site-nav__link {
  position: relative;
  padding: 10px 10px;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--liceo-text);
  transition: color .2s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: var(--liceo-green);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.site-nav__link:hover { color: var(--liceo-green); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--liceo-green-dark); font-weight: 700; }

.btn--header { min-height: 46px; padding-inline: 28px; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(36px, 4.6vw, 80px) clamp(110px, 9vw, 150px);
}

/* Fondo: marcador provisional o fotografía real */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #e2eef0;
  background-image: var(--hero-photo);
  background-size: cover;
  background-position: center 40%;
}
.hero__bg.has-photo {
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
}
.hero__placeholder { width: 100%; height: 100%; display: block; stroke: none; }
.hero__bg.has-photo .hero__placeholder { display: none; }

/* Velo claro para legibilidad del texto (izquierda) */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 38%, rgba(255,255,255,.18) 62%, rgba(255,255,255,0) 80%),
    linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 30%);
}

/* Borde curvo bajo el header */
.hero::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 26px;
  background: var(--liceo-white);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  z-index: 1;
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  grid-template-areas:
    "intro  login"
    "values login";
  column-gap: clamp(32px, 5vw, 110px);
  row-gap: 34px;
  align-items: start;
}

.hero__intro { grid-area: intro; max-width: 900px; }
.values      { grid-area: values; }
.hero__login { grid-area: login; justify-self: end; width: 100%; max-width: 420px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  font-size: clamp(.78rem, .95vw, .95rem);
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--liceo-green-dark);
}
.eyebrow__line { width: 52px; height: 4px; border-radius: 4px; background: var(--liceo-yellow); flex-shrink: 0; }
.eyebrow__accent { color: var(--liceo-blue); }

.hero__title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 3.7vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--liceo-green-dark);
  text-wrap: balance;
}
.hero__title-al { font-size: .72em; font-weight: 700; }

.hero__lead {
  margin: 0;
  max-width: 36em;
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  line-height: 1.5;
  color: #25352d;
}

/* ---------- 6. Valores ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  max-width: 820px;
}
.value { display: flex; align-items: flex-start; gap: 14px; }
.value__icon {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -8px rgba(18, 36, 27, .35);
}
.value__icon svg { width: 30px; height: 30px; }
.value__icon--green  { background: var(--liceo-green-soft);  color: var(--liceo-green-dark); }
.value__icon--blue   { background: var(--liceo-blue-soft);   color: var(--liceo-blue); }
.value__icon--yellow { background: var(--liceo-yellow-soft); color: #e0a800; }

.value__text { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.value__text strong { font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--liceo-text); }
.value__text span   { font-size: .84rem; line-height: 1.35; color: var(--liceo-muted); }

/* ---------- 7. Tarjeta de login ---------- */
.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(22px, 2vw, 30px) clamp(22px, 2.2vw, 32px) 24px;
  background: var(--liceo-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-card__logo { width: clamp(96px, 8vw, 140px); }

.login-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 2vw, 2rem);
  color: var(--liceo-text);
  line-height: 1.1;
}
.login-card__subtitle { margin: -6px 0 6px; color: var(--liceo-muted); font-size: .95rem; line-height: 1.4; }

.field { position: relative; width: 100%; }
.field__icon {
  position: absolute;
  left: 16px; top: 50%;
  width: 20px; height: 20px;
  transform: translateY(-50%);
  color: var(--liceo-muted);
  pointer-events: none;
  transition: color .2s var(--ease);
}
.field__input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 48px;
  border: 1.5px solid var(--liceo-line);
  border-radius: var(--radius-sm);
  background: var(--liceo-white);
  font: 400 .98rem var(--font-body);
  color: var(--liceo-text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__input::placeholder { color: #7b8781; }
.field__input:hover { border-color: #b7c4be; }
.field__input:focus {
  outline: none;
  border-color: var(--liceo-green);
  box-shadow: 0 0 0 4px rgba(23, 128, 63, .16);
}
.field:focus-within .field__icon { color: var(--liceo-green); }
.field__input--pass { padding-right: 52px; }
.field__input[aria-invalid="true"] { border-color: #c0392b; }

.field__toggle {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--liceo-muted);
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.field__toggle:hover { color: var(--liceo-green); background: var(--liceo-green-soft); }
.field__toggle svg { width: 20px; height: 20px; }
.field__toggle .icon-eye-off { display: none; }
.field__toggle[aria-pressed="true"] .icon-eye { display: none; }
.field__toggle[aria-pressed="true"] .icon-eye-off { display: block; }

.login-card .btn--block { margin-top: 6px; }

/* Recuérdame — no está en el mockup; se integra de forma discreta porque
   el backend (AuthenticatesUsers) sí soporta el campo `remember`. */
.login-card__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: -4px;
  font-size: .88rem;
  color: var(--liceo-muted);
  cursor: pointer;
  text-align: left;
}
.login-card__remember input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--liceo-green);
  cursor: pointer;
}

.login-card__notice {
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--liceo-yellow-soft);
  border: 1px solid #f0d67a;
  color: #5a4600;
  font-size: .88rem;
  line-height: 1.35;
}
.login-card__notice.is-visible { animation: notice-in .3s var(--ease); }

.login-card__forgot {
  color: var(--liceo-blue);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 6px;
  transition: color .2s var(--ease);
}
.login-card__forgot:hover { color: #164f96; text-decoration: underline; text-underline-offset: 3px; }

.login-card__sep {
  width: 100%;
  margin: 8px 0 4px;
  border: 0;
  border-top: 1px solid var(--liceo-line);
}

.login-card__help { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--liceo-muted); }
.login-card__help strong { color: var(--liceo-text); font-weight: 600; }

/* ---------- 8. Banda inferior ---------- */
.band {
  position: relative;
  z-index: 1;
  margin-top: clamp(-120px, -8vw, -70px);
  color: var(--liceo-white);
  background: var(--liceo-green-dark);
}
.band__wave {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(60px, 7vw, 120px);
  display: block;
  stroke: none;
}

.band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: 22px 36px;
}

.band__motto { display: flex; align-items: flex-start; gap: 16px; }
.band__quote {
  font-family: var(--font-display);
  font-size: 4.2rem;
  line-height: .8;
  color: var(--liceo-green-vivid);
}
.band__motto p {
  position: relative;
  margin: 8px 0 0;
  padding-bottom: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.35;
}
.band__motto p::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 3px;
  border-radius: 3px;
  background: var(--liceo-yellow);
}

.band__pillars { display: flex; align-items: center; }
.band__pillars li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: clamp(18px, 2.6vw, 44px);
  font-size: 1.08rem;
  font-weight: 500;
}
.band__pillars li + li { border-left: 1px solid rgba(255, 255, 255, .28); }
.band__pillars li:last-child { padding-right: 0; }
.band__pillars svg { width: 34px; height: 34px; stroke-width: 1.6; }
.band__pillars li:last-child svg { color: #6fd08c; }

/* ---------- 9. Animación de carga (ligera) ---------- */
.reveal { animation: rise .7s var(--ease) both; }
.reveal--2 { animation-delay: .12s; }
.reveal--3 { animation-delay: .2s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes notice-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 10. Responsive ---------- */

/* Laptop 1366 y menores */
@media (max-width: 1400px) {
  .value__icon { width: 54px; height: 54px; }
  .value__icon svg { width: 26px; height: 26px; }
}

/* Tablet horizontal 1024 */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); column-gap: 32px; }
  .values { grid-template-columns: 1fr; max-width: 420px; gap: 16px; }
  .value__text { padding-top: 6px; }
  .band__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .band__pillars li:first-child { padding-left: 0; }
}

/* Tablet vertical / móvil: una columna */
@media (max-width: 820px) {
  .site-header__inner { padding-block: 8px; }
  .site-nav__link { display: none; }   /* solo queda el botón */
  .btn--header { padding-inline: 16px; }

  .hero { padding-block: 36px 110px; }
  .hero__bg.has-photo {
    background-size: cover;
    background-position: center 40%;
  }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.75) 45%, rgba(255,255,255,.55) 100%);
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "login"
      "values";
    row-gap: 32px;
  }
  .hero__login { justify-self: center; }
  .values { max-width: none; }
}

/* Móvil 390 */
@media (max-width: 560px) {
  .brand { gap: 10px; }
  .brand__tagline { font-size: .56rem; letter-spacing: .12em; margin-top: 5px; }
  .btn--header span { display: none; }     /* botón compacto con icono */
  .btn--header { width: 46px; padding: 0; }
  .btn--header .icon { width: 22px; height: 22px; }

  .eyebrow { letter-spacing: .18em; gap: 12px; }
  .eyebrow__line { width: 36px; }

  .login-card { padding: 24px 20px; }

  .band__motto { gap: 10px; }
  .band__quote { font-size: 3.2rem; }
  .band__pillars { flex-direction: column; align-items: flex-start; gap: 14px; }
  .band__pillars li { padding-inline: 0; }
  .band__pillars li + li { border-left: 0; }
}
