/* ==========================================================
   Escola São José de Cluny — folha de estilos
   Mobile-first. Paleta: azul, branco e azul claro.
   ========================================================== */

:root {
  --navy-900: #0a2247;
  --navy-800: #0e2f63;
  --blue-600: #1d4f9f;
  --blue-400: #5b8fd6;
  --sky-200: #bcd5f2;
  --mist-50: #f3f7fc;
  --white: #ffffff;
  --ink: #13233f;
  --muted: #51627f;
  --line: #dce6f4;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(10, 34, 71, 0.06), 0 8px 24px rgba(10, 34, 71, 0.08);
  --header-h: 72px;

  /* FOTOGRAFIA DO HERO: basta colocar hero-escola.jpg em assets/images/.
     Enquanto não existir, aparece o ilustrativo hero-placeholder.svg. */
  --hero-image: url("../assets/images/hero-escola.jpg"), url("../assets/images/hero-placeholder.svg");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }

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

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--white); color: var(--navy-900); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.6rem; border-radius: var(--radius);
  font: 500 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--blue-600); color: var(--white); }
.btn--solid:hover { background: var(--navy-800); }
.btn--light { background: var(--white); color: var(--navy-900); }
.btn--light:hover { background: var(--sky-200); }
.btn--outline { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn--outline:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); }

/* ---------- Cabeçalho ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: var(--white);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.header.is-solid, .header.is-open {
  background: var(--white); color: var(--navy-900);
  box-shadow: 0 1px 0 var(--line);
}
.header__bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand__logo { height: 44px; width: auto; }
.brand__logo--dark { display: none; }
.header.is-solid .brand__logo--light, .header.is-open .brand__logo--light { display: none; }
.header.is-solid .brand__logo--dark, .header.is-open .brand__logo--dark { display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font: 500 1.1rem/1.2 var(--font-display); }
.brand__place { font-size: .75rem; opacity: .8; }

/* Menu móvel */
.burger {
  display: grid; gap: 5px; width: 44px; height: 44px; padding: 12px 10px;
  background: none; border: 0; color: inherit; cursor: pointer; align-content: center;
}
.burger span { display: block; height: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
.header.is-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--white); color: var(--navy-900);
  padding: 0 1.25rem; max-height: 0; overflow: hidden; visibility: hidden;
  border-bottom: 1px solid var(--line);
  transition: max-height .3s ease, padding .3s ease, visibility .3s;
}
.header.is-open .nav { max-height: 85vh; padding: .5rem 1.25rem 1.5rem; visibility: visible; }
.nav__list a {
  display: block; padding: .9rem 0; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.nav__list a.is-active { color: var(--blue-600); }

@media (min-width: 960px) {
  .burger { display: none; }
  .nav {
    position: static; background: none; color: inherit; border: 0;
    padding: 0; max-height: none; overflow: visible; visibility: visible;
    display: flex; align-items: center; gap: 2rem;
  }
  .nav__list { display: flex; gap: 1.6rem; }
  .nav__list a { padding: .4rem 0; border: 0; font-size: .92rem; position: relative; }
  .nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
  }
  .nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); }
  .nav__list a.is-active { color: inherit; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; color: var(--white); overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  background: var(--hero-image); background-size: cover; background-position: center;
}
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 34, 71, .92) 0%, rgba(10, 34, 71, .68) 45%, rgba(14, 47, 99, .5) 100%);
}
.hero__content { position: relative; padding-block: calc(var(--header-h) + 3rem) 4.5rem; }
.hero__title { font-size: clamp(2.6rem, 8vw, 5.25rem); font-weight: 500; max-width: 14ch; }
.hero__place { margin-top: 1rem; font-size: 1.05rem; color: var(--sky-200); }
.hero__lead {
  margin-top: 1.5rem; max-width: 34rem;
  font: 400 clamp(1.2rem, 2.6vw, 1.6rem)/1.4 var(--font-display);
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .85rem; }
.hero__actions .btn { flex: 1 1 14rem; max-width: 18rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero__media { animation: heroZoom 18s ease-out forwards; }
  @keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
  .hero__content > * { opacity: 0; animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
  .hero__place { animation-delay: .12s; }
  .hero__lead { animation-delay: .24s; }
  .hero__actions { animation-delay: .36s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Secções ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--mist { background: var(--mist-50); }
.section--navy { background: var(--navy-900); color: var(--white); }
.section__head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.section__head p { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }
.section--navy .section__head p { color: var(--sky-200); }

/* Identificador de texto de exemplo */
.ph {
  display: inline-block; margin: .6rem 0 .4rem; padding: .15rem .6rem;
  font-size: .75rem; font-weight: 500; color: var(--blue-600);
  background: var(--mist-50); border: 1px dashed var(--blue-400); border-radius: 999px;
}
.section--mist .ph { background: var(--white); }
.section--navy .ph { color: var(--sky-200); background: transparent; border-color: rgba(188, 213, 242, .5); }

/* ---------- Sobre ---------- */
.about { display: grid; gap: 2.5rem; }
.about__main h3 { font-size: 1.9rem; }
.about__main p { margin-top: 1rem; max-width: 36rem; color: var(--muted); font-size: 1.05rem; }
.about__side { display: grid; gap: 1.25rem; }
.pillar {
  background: var(--mist-50); border-left: 3px solid var(--blue-600);
  padding: 1.5rem 1.75rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.pillar h3 { font-size: 1.4rem; }
.pillar p { color: var(--muted); }
.about__main p + p, .pillar p + p { margin-top: .9rem; }
.pillar p { font-size: .98rem; }
.pillar h3 { margin-bottom: .6rem; }
.values { display: grid; gap: 1rem; color: var(--muted); font-size: .98rem; }
.values strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: .1rem; }
@media (min-width: 900px) {
  .about { grid-template-columns: 1.1fr 1fr; gap: 5rem; align-items: start; }
}

/* Princípios gerais */
.principles {
  margin-top: clamp(3rem, 6vw, 5rem); display: grid; gap: 2rem;
  background: var(--mist-50); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 3rem);
}
.principles h3 { font-size: 1.9rem; margin-bottom: .8rem; }
.principles p { color: var(--muted); font-size: 1.02rem; }
.principles p + p { margin-top: 1rem; }
.principles .principles__aim { color: var(--navy-900) !important; font: 500 1.35rem/1.35 var(--font-display); padding-left: 1.1rem; border-left: 3px solid var(--blue-600); }
.principles__list { display: grid; gap: .75rem; align-content: start; }
.principles__list li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1.1rem; color: var(--ink); font-size: .96rem;
}
@media (min-width: 900px) { .principles { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }

/* Direção */
.director {
  margin-top: 2rem; display: flex; align-items: center; gap: 1.5rem;
  background: var(--navy-900); color: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.75rem;
}
.director__emblem { flex: none; padding-right: 1.5rem; border-right: 1px solid rgba(188, 213, 242, .3); }
.director__emblem img { height: 68px; width: auto; }
.director__role { font-size: .92rem; color: var(--sky-200); }
.director h3 { margin-top: .2rem; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.director__school { margin-top: .3rem; color: rgba(255, 255, 255, .75); font-size: .95rem; }
@media (min-width: 640px) { .director { gap: 2.5rem; padding: 2.25rem 2.75rem; } .director__emblem { padding-right: 2.5rem; } .director__emblem img { height: 84px; } }

/* ---------- História (timeline) ---------- */
.timeline { position: relative; display: grid; gap: 2.5rem; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: rgba(188, 213, 242, .4);
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: ""; position: absolute; left: -2rem; top: .45rem; width: 13px; height: 13px;
  background: var(--navy-900); border: 2px solid var(--sky-200); border-radius: 50%;
}
.timeline__item > .timeline__when { margin-top: 0; font-size: .9rem; color: var(--sky-200); }
.timeline__item h3 { margin-top: .25rem; font-size: 1.6rem; }
.timeline__item > p { margin-top: .6rem; max-width: 30rem; color: rgba(255, 255, 255, .78); }
.timeline__item p + p { margin-top: .8rem; }
.history-intro { display: grid; gap: 1rem; max-width: 62rem; margin-bottom: clamp(3rem, 6vw, 5rem); color: rgba(255, 255, 255, .82); font-size: 1.05rem; }
.events { margin-top: 1.2rem; max-width: 30rem; }
.timeline__item:nth-child(odd) .events { margin-left: auto; }
.events li { padding: .9rem 0; border-top: 1px solid rgba(188, 213, 242, .25); }
.events strong { display: block; font-weight: 600; color: var(--white); }
.events p { margin-top: .25rem; font-size: .95rem; }

@media (min-width: 900px) {
  .history-intro { grid-template-columns: 1fr 1fr; gap: 1.2rem 3rem; }
  .timeline { padding-left: 0; gap: 3.5rem; }
  .timeline::before { left: 50%; }
  .timeline__item { width: calc(50% - 3rem); }
  .timeline__item::before { left: auto; top: .6rem; }
  .timeline__item:nth-child(odd) { text-align: right; }
  .timeline__item:nth-child(odd)::before { right: -3.5rem; }
  .timeline__item:nth-child(odd) p { margin-left: auto; }
  .timeline__item:nth-child(even) { margin-left: auto; }
  .timeline__item:nth-child(even)::before { left: -3.5rem; }
}

/* ---------- Cursos ---------- */
.cards { display: grid; gap: 1.5rem; }
.card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.75rem; border-top: 3px solid var(--blue-600);
}
.card h3 { font-size: 1.45rem; }
.card__desc { margin-top: .75rem; color: var(--muted); }
.card__meta { margin-top: 1.1rem; display: grid; gap: .35rem; font-size: .92rem; }
.card__meta div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.card__meta dt { color: var(--muted); }
.card__meta dd { margin: 0; font-weight: 500; }
.card__more { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.card__more[hidden] { display: none; }
.card__toggle {
  align-self: flex-start; margin-top: auto; padding: 0; background: none; border: 0; cursor: pointer;
  font: 500 .95rem/1 var(--font-body); color: var(--blue-600);
  border-bottom: 1.5px solid var(--sky-200);
}
.card__toggle:hover { color: var(--navy-800); border-color: var(--navy-800); }
.card__body { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Localização ---------- */
.map { height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; border: 0; }
.map__empty {
  height: 100%; display: grid; place-content: center; text-align: center; padding: 1rem; color: var(--muted);
  background: repeating-linear-gradient(45deg, var(--mist-50), var(--mist-50) 14px, var(--white) 14px, var(--white) 28px);
}
@media (min-width: 960px) { .map { height: 440px; } }

/* ---------- Rodapé ---------- */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .8); padding-top: 4rem; }
.footer__grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
.footer__logo { height: 58px; width: auto; margin-bottom: 1rem; }
.footer__name { font: 500 1.5rem/1.2 var(--font-display); color: var(--white); }
.footer__title { font-weight: 600; color: var(--white); margin-bottom: .9rem; }
.footer li { padding-block: .2rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer__social { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .6rem; }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, .14); padding-block: 1.5rem; font-size: .88rem; }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Movimento discreto (ativado por js/app.js) ---------- */
.header__progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--blue-400); transform: scaleX(var(--s, 0)); transform-origin: left; opacity: 0; transition: opacity .25s;
}
.header.is-solid .header__progress, .header.is-open .header__progress { opacity: 1; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (min-width: 900px) {
  .timeline__item.reveal:nth-child(odd) { transform: translateX(-22px); }
  .timeline__item.reveal:nth-child(even) { transform: translateX(22px); }
  .timeline__item.reveal.is-visible { transform: none; }
}

.timeline::after {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px;
  background: var(--sky-200); transform-origin: top; transform: scaleY(var(--p, 0));
}
@media (min-width: 900px) { .timeline::after { left: 50%; } }
.timeline__item::before { transition: background-color .4s; }
.timeline__item.is-passed::before { background: var(--sky-200); }

.card { transition: box-shadow .25s; }
.card.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms; }
.card:hover { box-shadow: 0 2px 4px rgba(10, 34, 71, .06), 0 14px 32px rgba(10, 34, 71, .12); }
