/* ==========================================================================
   Instituto Cecília Meireles — LPs Matrículas 2027
   Desenvolvido por LUMINA
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root {
  --navy: #313e80;        /* fundo das seções azuis */
  --navy-dark: #052d5c;   /* cards, FAQ */
  --blue-text: #14447c;   /* textos sobre branco */
  --orange: #fab63b;
  --green: #00a650;
  --green-hover: #008a43;
  --light: #eef1f8;       /* fundo claro de apoio */
  --navy-deep: #222b5e;   /* barra de créditos (navy mais escuro) */
  --white: #fff;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1200px;
  --gutter: 24px;
  --radius: 22px;
  --section-y: clamp(56px, 8vw, 96px);
}

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--blue-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
p + p { margin-top: 1.1em; }
a { color: inherit; }
.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(--orange); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--navy { background: var(--navy); color: var(--white); }
.section--light { background: var(--light); }
.center { text-align: center; }

/* 3. Botões -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 30px;
  font: 600 15px/1.2 var(--font); letter-spacing: .03em; text-transform: uppercase; text-align: center;
  color: var(--white); background: var(--green);
  border: 2px solid var(--green); border-radius: 12px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(0, 120, 55, .7);
  transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--green-hover); border-color: var(--green-hover); transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(0, 120, 55, .8); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.btn--outline { background: transparent; color: var(--navy-dark); border-color: var(--navy-dark); box-shadow: none; }
.btn--outline:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); box-shadow: none; }
.section--navy .btn--outline { color: var(--white); border-color: var(--white); }
.section--navy .btn--outline:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

/* 4. Header -------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 2px 18px rgba(5, 45, 92, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 92px; }
.header__logo { width: 150px; }

/* 5. Hero ---------------------------------------------------------------- */
.hero { background: #13227a; }
.hero img { width: 100%; }

/* 6. Títulos em imagem --------------------------------------------------- */
/* largura (--w) calculada no HTML para que o texto dos títulos tenha o mesmo tamanho em todas as LPs */
.title-img { width: calc(var(--w) * var(--title-scale, 1)); max-width: 100%; height: auto; }

/* 7. Blocos de texto + foto --------------------------------------------- */
.feature {
  display: grid; gap: 28px 72px; align-items: center;
  grid-template-columns: 1.35fr 1fr;
  grid-template-areas: "title media" "text media";
}
.feature--media-left { grid-template-columns: 1fr 1.35fr; grid-template-areas: "media title" "media text"; }
.feature__title { grid-area: title; align-self: end; }
.feature--media-left .feature__title { justify-self: end; }
.feature__media { grid-area: media; }
.feature__text { grid-area: text; align-self: start; }
.feature__text p { text-align: justify; }
.feature__text .lead { font-size: 17px; text-align: left; }
.feature__text .btn { margin-top: 32px; }
.tagline { font-weight: 400; }
.tagline strong { display: block; font-weight: 800; }

/* Variações usadas na LP geral */
.feature--no-title { grid-template-areas: "media text"; }
.feature__kicker { margin-bottom: 18px; font-size: 18px; font-weight: 800; line-height: 1.45; }
.feature__kicker--orange { color: var(--orange); }
.seg-title { margin-bottom: 48px; }
.seg-title img, .more-head h2 img { margin: 0 auto; }
.unit-list__label { margin-top: 24px; font-weight: 600; }
.unit-list { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 8px 0 0; padding: 0; list-style: none; }
.unit-list li { display: flex; align-items: center; gap: 8px; }
.unit-list img { width: 20px; height: auto; }

.intro { padding-bottom: calc(var(--section-y) * .75); }
.intro .container { max-width: 1100px; font-size: 17px; }
.intro p { text-align: justify; }
.intro__lead { font-size: 19px; font-weight: 700; text-align: left !important; }
.intro__slogan { font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; line-height: 1.35; text-align: left !important; }

/* Moldura das fotos: borda + bloco laranja deslocado */
.frame { position: relative; padding: 16px 16px 0 0; }
.frame::before {
  content: ""; position: absolute; top: 0; right: 0; width: calc(100% - 16px); height: calc(100% - 16px);
  background: var(--orange); border-radius: var(--radius);
}
.frame--left { padding: 16px 0 0 16px; }
.frame--left::before { right: auto; left: 0; }
.frame img {
  position: relative; width: 100%; aspect-ratio: var(--ar, 1); object-fit: cover;
  border: 6px solid var(--navy); border-radius: var(--radius);
}
.section--navy .frame img, .frame--white img { border-color: var(--white); }

/* 8. Diferenciais -------------------------------------------------------- */
.dif-title { margin: 0 auto 56px; }
.dif-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 32px; }
.dif { display: flex; flex-direction: column; align-items: center; width: calc((100% - 64px) / 3); }
.dif__icon { height: 64px; width: auto; margin-bottom: 18px; }
.dif__box {
  flex: 1; width: 100%; padding: 30px 28px 34px; text-align: center;
  background: var(--navy-dark); color: var(--white); border-radius: var(--radius);
  font-size: 15px; line-height: 1.7;
}
.dif__box h3 { margin-bottom: 8px; font-size: 16px; font-weight: 800; color: var(--orange); }
.dif--wide { width: min(100%, 880px); }
.dif--wide .dif__box { padding: 32px 48px 36px; }
.dif-cta { margin-top: 56px; text-align: center; }

/* 9. Unidades ------------------------------------------------------------ */
.units-head { display: flex; align-items: center; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; margin-bottom: 56px; }
.units-head img:first-child { height: 74px; width: auto; }
.units-head img:last-child { height: 129px; width: auto; } /* mesma altura de letra dos títulos */
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: 48px 64px; }
.unit { display: flex; flex-direction: column; align-items: center; text-align: center; }
.unit__sub { margin: 14px 0 18px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.unit__photo { width: 100%; aspect-ratio: 452 / 263; object-fit: cover; border-radius: 18px; box-shadow: 0 18px 36px -22px rgba(5, 45, 92, .55); }
.unit__addr { margin: 14px 0 0; font-size: 14px; }
.unit .btn { margin-top: 18px; }
.units-cta { margin-top: 48px; text-align: center; }
.units--3 { grid-template-columns: repeat(3, minmax(0, 360px)); gap: 48px 40px; }
.units--3 .unit__sub { min-height: 2.9em; display: flex; align-items: center; }

/* Destaque da unidade do segmento (Castelo 2) */
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 72px; align-items: center; }
.spot__copy { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.spot__copy .perto--svg { width: min(100%, calc(432px * var(--title-scale, 1))); }
.spot .unit { max-width: 480px; justify-self: center; width: 100%; }
.spot-lead { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; font-weight: 300; color: var(--navy); }
.spot-lead strong { font-weight: 800; }

/* "Além do segmento" */
.more-head { max-width: 860px; margin: 0 auto 56px; text-align: center; }
.more-head h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; font-weight: 800; text-transform: uppercase; color: var(--navy); }
.section--navy .more-head h2 { color: var(--white); }
.more-head p { margin-top: 16px; font-size: 17px; }

/* 10. FAQ ---------------------------------------------------------------- */
.faq { display: grid; grid-template-columns: 5fr 7fr; gap: 48px 64px; align-items: start; }
.faq__aside { display: flex; flex-direction: column; align-items: center; gap: 40px; position: sticky; top: 124px; }
.faq__aside .frame { width: 100%; }
.faq__aside-cta { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; font-size: 17px; }
.faq__label { margin-bottom: 18px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.faq__list { display: grid; gap: 12px; }
.faq__item { background: var(--navy-dark); border-radius: 14px; overflow: hidden; }
.faq__item summary {
  position: relative; display: block; padding: 18px 64px 18px 24px;
  font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--white);
  cursor: pointer; list-style: none; transition: background-color .2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: rgba(255, 255, 255, .06); }
.faq__item summary::before, .faq__item summary::after {
  content: ""; position: absolute; right: 26px; top: 50%; width: 16px; height: 2.5px;
  background: var(--orange); border-radius: 2px; transition: transform .25s;
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
.faq__answer { padding: 0 24px 22px; color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 1.75; }

/* 11. Rodapé ------------------------------------------------------------- */
.footer { padding: 56px 0; background: var(--navy); color: var(--white); }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 48px; font-size: 16px; line-height: 1.8; }
.footer__grid h4 { margin-bottom: 6px; font-size: 17px; font-weight: 800; color: var(--orange); }
.footer__grid p { margin: 0; }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; }

.credits {
  padding: 18px 0; background: var(--navy-deep); color: var(--white); text-align: center;
  font-size: 14px; font-weight: 700; line-height: 1.7; letter-spacing: .02em; text-transform: uppercase;
}
.credits p { margin: 0; }
.credits__heart { display: inline-block; width: 15px; height: 14px; margin-left: 4px; vertical-align: -1px; }

/* 12. WhatsApp flutuante ------------------------------------------------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: grid; place-items: center; width: 60px; height: 60px;
  background: #25d366; border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float img { width: 32px; height: 32px; }

/* 13. Responsivo --------------------------------------------------------- */
@media (max-width: 1024px) {
  .dif { width: calc((100% - 32px) / 2); }
  .feature, .feature--media-left { gap: 28px 40px; }
}

@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .feature, .feature--media-left { grid-template-columns: 1fr; grid-template-areas: "title" "media" "text"; }
  .feature__title, .feature--media-left .feature__title { justify-self: center; }
  .feature__media { width: min(100%, 460px); justify-self: center; }
  .feature__media .frame img { aspect-ratio: 4 / 4.2; }
  .feature__text p { text-align: left; }
  .feature__text .btn { width: 100%; }
  .spot, .faq { grid-template-columns: 1fr; }
  .faq__aside { position: static; }
  .faq__aside .frame { display: none; }
  .units-head { flex-direction: column; text-align: center; }
  .units--3 { grid-template-columns: minmax(0, 420px); }
  .units--3 .unit__sub { min-height: 0; }
  .feature--no-title { grid-template-areas: "media" "text"; }
  .intro p { text-align: left; }
  .units-head img:first-child { height: auto; width: min(100%, 420px); }
  .units-head img:last-child { height: auto; width: min(80%, 320px); }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --radius: 18px; }
  .header__inner { min-height: 72px; }
  .header__logo { width: 112px; }
  .header .btn { min-height: 42px; padding: 9px 14px; font-size: 12.5px; }
  :root { --title-scale: .72; }
  .dif-title { margin-bottom: 40px; }
  .dif { width: 100%; }
  .dif--wide .dif__box { padding: 30px 24px 34px; }
  .units { grid-template-columns: minmax(0, 420px); }
  .btn { width: 100%; }
  .header .btn { width: auto; }
  .faq__item summary { padding: 16px 56px 16px 20px; font-size: 15px; }
  .faq__answer { padding: 0 20px 20px; }
  .credits { font-size: 12px; }
}

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