/* =========================================================
   Academia dos Estudos — protótipo
   Estética inspirada em mentes-criativas.pt
   ========================================================= */

:root {
  --orange: #E98515;
  --orange-dark: #C96F0C;
  --navy: #1E2A78;
  --navy-deep: #161F57;
  --pink: #E6117E;
  --ink: #2b2b33;
  --muted: #6b6f80;
  --bg-soft: #f4f5f8;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 40px -20px rgba(22, 31, 87, .35);
  --maxw: 1180px;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Baloo 2", var(--font-body);
  --font-script: "Caveat", "Segoe Script", cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  animation: pageFade .55s ease both;
}
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--navy); font-weight: 700; }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .82rem;
  font-weight: 700;
  color: var(--pink);
}
.eyebrow--orange { color: var(--orange); }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--orange); }
.section-lead { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 600;
  padding: .85em 1.6em; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--pink { background: var(--pink); color: #fff; }
.btn--pink:hover { background: #c60d6b; }
.btn--outline { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn--outline-light:hover { background: #fff; color: var(--navy); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #eceef4;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 84px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-text { display: block; }
.brand-text b {
  display: block;
  font-family: var(--font-script);
  font-size: 1.5rem; line-height: .95; color: var(--orange); font-weight: 700;
  white-space: nowrap;
}
.brand-text > span {
  display: block; font-family: var(--font-head);
  font-size: .54rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--orange-dark); font-weight: 600; white-space: nowrap;
}
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 20px; }
.nav a {
  font-family: var(--font-head); font-weight: 500; color: var(--navy);
  font-size: .94rem; position: relative; padding: 6px 0; white-space: nowrap;
}
.nav a:hover { color: var(--orange); }
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .8em; }
.submenu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid #eceef4; border-radius: 14px;
  box-shadow: var(--shadow); padding: 10px; min-width: 220px;
  display: none; flex-direction: column; gap: 2px;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { display: flex; }
.submenu a { padding: 9px 12px; border-radius: 9px; font-size: .92rem; }
.submenu a:hover { background: var(--bg-soft); }
.header-cta { margin-left: 8px; }
.header-actions { display: none; }
.header-actions a {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--navy);
}
.header-actions a:active { color: var(--orange); }
.header-actions svg { width: 23px; height: 23px; }
.nav-toggle {
  margin-left: auto; display: none; background: none; border: 0;
  width: 42px; height: 42px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: relative;
  width: 26px; height: 3px; border-radius: 3px; background: var(--navy);
}
.nav-toggle span::before { position: absolute; top: -8px; }
.nav-toggle span::after { position: absolute; top: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 82vh; display: grid; place-items: center;
  text-align: center; color: #fff; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media img { animation: heroZoom 22s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.09); } }
@media (prefers-reduced-motion: reduce) { .hero__media img { animation: none; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,24,45,.20), rgba(20,24,45,.42)),
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(15,18,40,.42), rgba(15,18,40,0) 75%);
}
.hero__inner { max-width: 780px; padding: 40px 22px; text-shadow: 0 2px 18px rgba(10,12,30,.45); }
.hero__welcome { font-family: var(--font-script); font-size: clamp(1.6rem, 4vw, 2.4rem); }
.hero__title {
  font-family: var(--font-script); color: #fff;
  font-size: clamp(3rem, 9vw, 5.6rem); line-height: .95; margin: .1em 0 .3em;
}
.hero__tag {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .22em;
  font-size: clamp(.8rem, 1.6vw, 1rem); font-weight: 600;
}
.hero__cta { margin-top: 30px; }

/* ---------- about teaser ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.split p { color: var(--muted); margin-bottom: 14px; }
.split .btn { margin-top: 12px; }

/* ---------- services grid ---------- */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; margin-top: 46px; }
.cards .card { flex: 1 1 280px; max-width: 340px; }
.card {
  background: #fff; border: 1px solid #eceef4; border-radius: var(--radius);
  padding: 34px 26px; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--navy); color: #fff;
}
.card__icon svg { width: 38px; height: 38px; }
.card h3 { color: var(--navy); font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }
.card--highlight { border-color: var(--orange); }
.card--highlight .card__icon { background: var(--orange); }
.card__badge {
  display: inline-block; margin-top: 12px; font-size: .8rem; font-weight: 600;
  color: var(--orange-dark); background: #fdf1e3; border-radius: 999px; padding: 4px 12px;
}

/* ---------- band ---------- */
.band {
  position: relative; color: #fff; text-align: center;
  padding: 110px 0; overflow: hidden;
}
.band__media { position: absolute; inset: 0; z-index: -2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; }
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,24,52,.20), rgba(20,24,52,.42)),
    radial-gradient(ellipse 60% 62% at 50% 50%, rgba(15,18,42,.36), rgba(15,18,42,0) 78%);
}
.band .wrap { position: relative; }
.band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); text-shadow: 0 2px 22px rgba(8,10,26,.55); }
.band p { font-family: var(--font-script); font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 6px; text-shadow: 0 2px 18px rgba(8,10,26,.5); }
.band .btn { margin-top: 26px; }

/* ---------- advantages ---------- */
.adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 46px; }
.adv__item { text-align: center; }
.adv__icon {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; background: var(--orange); color: #fff;
}
.adv__icon svg { width: 44px; height: 44px; }
.adv__item p { color: var(--navy); font-weight: 500; }

/* ---------- testimonials ---------- */
.tst { background: #14162b; color: #fff; }
.tst h2 { color: #fff; font-family: var(--font-script); font-size: clamp(2rem, 4vw, 2.8rem); }
.tst__viewport { max-width: 820px; margin: 34px auto 0; position: relative; overflow: hidden; }
.tst__track { display: flex; transition: transform .5s ease; }
.tst__slide { min-width: 100%; padding: 10px 30px; }
.tst__slide blockquote {
  font-size: 1.15rem; line-height: 1.7; font-style: italic; color: #f2f2f7;
}
.tst__stars { color: #ffcf3f; margin-top: 14px; letter-spacing: 3px; }
.tst__nav { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.tst__dot {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .3);
}
.tst__dot[aria-current="true"] { background: var(--pink); }
.tst__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}
.tst__arrow:hover { background: var(--pink); }
.tst__arrow--prev { left: -6px; }
.tst__arrow--next { right: -6px; }

/* ---------- contacts ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
.contact-card {
  background: #fff; border: 1px solid #eceef4; border-radius: var(--radius);
  padding: 34px 26px; text-align: center; box-shadow: var(--shadow);
}
.contact-card .ic {
  width: 64px; height: 64px; margin: 0 auto 16px; color: var(--pink);
  display: grid; place-items: center;
}
.contact-card .ic svg { width: 42px; height: 42px; }
.contact-card h3 { color: var(--navy); margin-bottom: 10px; }
.contact-card p, .contact-card a { color: var(--muted); font-size: .98rem; }
.contact-card a:hover { color: var(--orange); }
.contact-actions { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.contact-actions a {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pink); color: #fff;
  transition: transform .15s ease, background .2s ease;
}
.contact-actions a:hover { transform: translateY(-2px); background: #c60d6b; color: #fff; }
.contact-actions svg { width: 22px; height: 22px; }

/* ---------- form ---------- */
.formsec .split { align-items: start; }
.formsec h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.formsec .lead { color: var(--muted); margin: 8px 0 22px; }
.field { width: 100%; margin-bottom: 14px; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: 14px 16px;
  border: 1px solid #dfe2ec; border-radius: 12px; background: var(--bg-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 6px 0 18px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }

/* ---------- map ---------- */
.map iframe { width: 100%; height: 420px; border: 0; display: block; filter: saturate(1.05); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #cfd3ec; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; }
.site-footer a { color: #cfd3ec; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.socials { display: flex; gap: 12px; margin-top: 14px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: grid; place-items: center;
}
.socials a:hover { background: var(--orange); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .85rem;
}

/* ---------- generic page header / banner (sub pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--navy), var(--navy-deep));
  color: #fff; text-align: center; padding: 96px 0; min-height: 360px;
  display: flex; flex-direction: column; justify-content: center;
}
.page-hero__media { position: absolute; inset: 0; z-index: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(20,24,52,.18), rgba(20,24,52,.40)),
    radial-gradient(ellipse 65% 60% at 50% 50%, rgba(15,18,42,.34), rgba(15,18,42,0) 78%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); text-shadow: 0 2px 22px rgba(8,10,26,.55); }
.page-hero p { color: #eef0fa; margin-top: 8px; text-shadow: 0 1px 14px rgba(8,10,26,.55); }

/* galeria em mosaico — cada foto mantém as suas proporções */
.gallery { columns: 3; column-gap: 16px; margin-top: 40px; }
.gallery img {
  width: 100%; margin: 0 0 16px; display: block; break-inside: avoid;
  border-radius: 14px; box-shadow: var(--shadow);
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 540px) { .gallery { columns: 1; } }

/* ---------- disciplinas ---------- */
.subjects {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 780px; margin: 40px auto 0;
}
.subject {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border: 1px solid #eceef4; border-radius: 14px;
  padding: 15px 18px; font-family: var(--font-head); font-weight: 500; color: var(--navy);
}
.subject .ic {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-soft); color: var(--orange);
  display: grid; place-items: center;
}
.subject .ic svg { width: 24px; height: 24px; }
@media (max-width: 720px) { .subjects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .subjects { grid-template-columns: 1fr; } }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.value { background: #fff; border: 1px solid #eceef4; border-radius: var(--radius); padding: 28px; text-align: center; }
.value .ic { width: 60px; height: 60px; margin: 0 auto 12px; color: var(--orange); }

/* ---------- reveal on scroll / load ----------
   O estado escondido só se aplica quando o JS está ativo (html.js);
   sem JS o conteúdo aparece na mesma. */
.js .reveal,
.js .reveal-left,
.js .reveal-right {
  opacity: 0;
  transition: opacity 1.4s ease, transform 1.9s cubic-bezier(.16,.84,.3,1);
}
.js .reveal       { transform: translateY(44px); }
.js .reveal-left  { transform: translateX(-90px); }
.js .reveal-right { transform: translateX(90px); }
.js .reveal.is-in,
.js .reveal-left.is-in,
.js .reveal-right.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cards, .contact-cards, .adv, .team, .values { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1040px) {
  /* header mobile: menu à esquerda · logo ao centro · telefone/carta à direita */
  .site-header .wrap { position: relative; gap: 0; }
  .nav-toggle { display: block; order: 1; margin: 0; }
  .brand {
    order: 2; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
  }
  .header-actions { display: flex; order: 3; margin-left: auto; gap: 2px; }
  .nav {
    display: none;
    position: fixed; top: 84px; left: 0; right: 0; bottom: auto;
    background: #fff; border-bottom: 1px solid #eceef4; margin: 0;
    max-height: calc(100vh - 84px); overflow-y: auto;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 22px 20px; }
  .nav li { border-bottom: 1px solid #f0f1f6; }
  .nav a { display: block; padding: 14px 0; }
  .submenu { position: static; transform: none; box-shadow: none; border: 0; display: flex; padding: 0 0 8px 14px; }
  .has-sub > a::after { content: ""; }
  .header-cta { display: none; }
}
@media (max-width: 560px) {
  .cards, .contact-cards, .adv, .team, .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  /* banner mais baixo no telemóvel — menos corte lateral da foto */
  .page-hero { padding: 64px 0; min-height: 280px; }
  /* logo: coruja em cima, nome + slogan por baixo */
  .brand { flex-direction: column; gap: 3px; text-align: center; }
  .brand img { height: 40px; width: auto; }
  .brand-text b { font-size: 1.02rem; }
  .brand-text > span { display: block; font-size: .42rem; letter-spacing: .05em; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  /* movimento reduzido: fade + deslize curto */
  .js .reveal       { transform: translateY(14px); }
  .js .reveal-left  { transform: translateX(-16px); }
  .js .reveal-right { transform: translateX(16px); }
  .js .reveal, .js .reveal-left, .js .reveal-right { transition: opacity 1s ease, transform 1.2s ease; }
  .hero__media img { animation: none; }
}
