/* =========================================================
   Academia de Música Culturalia — página de scroll narrativo
   Só é carregado por academia-de-musica.html (depois de style.css).
   Sem JS ou com reduced-motion, todo o conteúdo fica visível e estático.
   ========================================================= */

/* ---------- Menu próprio ---------- */
.header--academia .header__logo img { height: 46px; }
@media (max-width: 760px) { .header--academia .header__logo img { height: 40px; } }
.header--academia .nav__list a, .header--academia .nav .btn, .nav__parent { white-space: nowrap; }
.nav__parent { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-left: var(--space-6); border-left: 1px solid var(--border); color: var(--ink-muted); font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; transition: color .2s ease; }
.nav__parent svg { width: 14px; height: 14px; color: var(--dourado-500); transition: transform .3s var(--ease-out); }
.nav__parent:hover { color: var(--ink); }
.nav__parent:hover svg { transform: translate(2px, -2px); }
.header--academia .nav__list a.is-current::after { transform: scaleX(1); }
@media (min-width: 901px) and (max-width: 1180px) {
  .header--academia .nav, .header--academia .nav__list { gap: var(--space-4); }
  .header--academia .nav__parent { padding-left: var(--space-4); }
  .header--academia .header__logo img { height: 40px; }
}
/* Com 5 itens no menu, o link "Culturalia" só cabe em ecrãs largos (continua no rodapé) */
@media (min-width: 901px) and (max-width: 1100px) { .header--academia .nav__parent { display: none; } }
@media (max-width: 900px) { .nav__parent { padding: 6px 0; border-left: 0; } }

/* Barra de progresso de leitura, colada ao fundo do cabeçalho */
.ac-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.ac-progress span { display: block; height: 100%; background: var(--dourado-500); transform: scaleX(var(--progress, 0)); transform-origin: left; }

/* ---------- 1. Abertura ---------- */
.ac-hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; padding: 96px 0 128px; }
.ac-hero > .container { width: 100%; }
.ac-hero__inner { position: relative; z-index: 1; display: grid; gap: var(--space-6); max-width: 720px;
  opacity: calc(1 - var(--hp, 0) * 1.4); transform: translateY(calc(var(--hp, 0) * -48px)); }
.ac-hero__title { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.05; margin: 0; }
.ac-hero .lead { font-size: clamp(18px, 1.6vw, 20px); max-width: 540px; }
.ac-hero .hero__actions { margin-top: var(--space-2); }
.ac-hero .hero__meta { margin-top: 0; }
.ac-hero .hero__media img { filter: saturate(.85); }
/* Película ~60% (manual), mais densa só atrás do texto */
.ac-hero .hero__media::after { background: linear-gradient(180deg, transparent 60%, rgba(9,20,30,.88) 100%), linear-gradient(90deg, rgba(9,20,30,.82) 0%, rgba(9,20,30,.6) 50%, rgba(9,20,30,.45) 100%); }
@media (max-width: 900px) { .ac-hero .hero__media::after { background: linear-gradient(180deg, rgba(9,20,30,.5) 0%, rgba(9,20,30,.72) 55%, rgba(9,20,30,.9) 100%); } }
.ac-hero .hero__waves { width: 880px; height: 880px; right: -280px; opacity: .95; overflow: visible; }
@media (max-width: 900px) { .ac-hero .hero__waves { width: 620px; height: 620px; right: -340px; opacity: .45; } }
.ac-ripples path { stroke: var(--dourado-500); stroke-width: 1.5; fill: none; opacity: 0; transform-box: view-box; transform-origin: 389px 360px; animation: ac-ripple 9s cubic-bezier(.2,.6,.3,1) infinite; }
.ac-ripples path:nth-child(2) { animation-delay: 3s; }
.ac-ripples path:nth-child(3) { animation-delay: 6s; }
@keyframes ac-ripple { 0% { transform: scale(.35); opacity: 0; } 15% { opacity: .35; } 100% { transform: scale(1.45); opacity: 0; } }

.ac-hero__cue { position: absolute; z-index: 1; left: 50%; bottom: 32px; transform: translateX(-50%); display: grid; justify-items: center; gap: var(--space-3); color: var(--on-dark-muted); font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; text-decoration: none; opacity: calc(1 - var(--hp, 0) * 3); }
.ac-hero__cue i { position: relative; width: 1px; height: 48px; background: rgba(255,255,255,.2); overflow: hidden; }
.ac-hero__cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 16px; background: var(--dourado-500); animation: ac-cue 2.2s var(--ease-io) infinite; }
@keyframes ac-cue { from { transform: translateY(-16px); } to { transform: translateY(48px); } }
.ac-hero__cue:hover { color: var(--on-dark); }

/* ---------- 2. Opções de aulas: instrumento (destaque) e formações de grupo ---------- */
.ac-options { padding: 120px 0; }
.ac-options__grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 861px) { .ac-options__grid { grid-template-columns: 7fr 5fr; align-items: stretch; } }
.ac-option { display: flex; flex-direction: column; align-items: flex-start; padding: 48px; background: var(--surface); border: 1px solid var(--border); }
.ac-option--main { background: var(--azul-900); color: var(--on-dark); border-color: var(--azul-900); border-top: 3px solid var(--dourado-500); }
.ac-option__tag { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--dourado-700); }
.ac-option--main .ac-option__tag { color: var(--dourado-500); }
.ac-option h3 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; margin: var(--space-3) 0 var(--space-4); }
.ac-option--main h3 { font-size: clamp(32px, 4.2vw, 52px); color: var(--on-dark); }
.ac-option p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--ink-muted); max-width: 520px; }
.ac-option--main p { color: var(--on-dark-muted); }
.ac-option ul { list-style: none; margin: var(--space-6) 0 var(--space-8); padding: 0; display: grid; gap: var(--space-3); }
.ac-option li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 15px; line-height: 1.5; }
.ac-option li svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--dourado-700); }
.ac-option--main li svg { color: var(--dourado-500); }
.ac-option .btn { margin-top: auto; }
.ac-option p:has(+ .btn) { margin-bottom: var(--space-8); } /* cartão sem lista */
@media (max-width: 760px) { .ac-option { padding: 32px 24px; } .ac-option .btn { width: 100%; } }

/* ---------- 3. A Academia: frase que se acende + valores ---------- */
.ac-intro { padding: 120px 0; }
.ac-statement { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 52px); line-height: 1.18; letter-spacing: .01em; color: var(--ink); max-width: 1000px; margin: var(--space-6) 0 0; }
.ac-statement em { font-style: normal; color: var(--dourado-700); }
.ac-intro__text { max-width: 620px; margin: var(--space-12) 0 0 auto; font-size: 17px; line-height: 1.75; color: var(--ink-muted); }
.ac-values { list-style: none; margin: 96px 0 0; padding: 0; display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid rgba(184,144,58,.45); }
@media (min-width: 761px) { .ac-values { grid-template-columns: repeat(3, 1fr); } }
.ac-values li { padding: var(--space-8) var(--space-6) var(--space-8) 0; border-bottom: 1px solid var(--marfim-line); }
@media (min-width: 761px) { .ac-values li { border-bottom: 0; } .ac-values li + li { padding-left: var(--space-8); border-left: 1px solid var(--marfim-line); } }
.ac-values__num { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--dourado-700); letter-spacing: .1em; }
.ac-values h3 { font-family: var(--font-display); font-size: 24px; margin: var(--space-3) 0 var(--space-2); }
.ac-values p { margin: 0; color: var(--ink-muted); font-size: 15px; }

/* ---------- 4. Aprender: símbolo fixo + capítulos ---------- */
.ac-journey { padding: 120px 0 64px; }
.ac-journey__grid { display: grid; gap: var(--space-8); }
@media (min-width: 961px) { .ac-journey__grid { grid-template-columns: 5fr 6fr; gap: 96px; } }
.ac-journey__stage { position: relative; }
.ac-journey__sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; justify-items: center; gap: var(--space-4); padding: var(--space-6) 0; }
@media (min-width: 961px) { .ac-journey__sticky { top: calc(50vh - 220px + var(--header-h) / 2); } }
.ac-dial { width: min(380px, 100%); height: auto; overflow: visible; }
.ac-dial path { fill: none; stroke-linecap: round; stroke: var(--border-strong, #C9D0D8); stroke-width: 3; transition: stroke .6s ease, stroke-width .6s ease, opacity .6s ease; }
.ac-dial circle { fill: var(--dourado-500); transform-box: fill-box; transform-origin: center; transition: transform .6s var(--ease-out); }
.ac-journey__meta { display: flex; align-items: baseline; gap: var(--space-4); }
.ac-journey__num { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--ink); min-width: 2ch; }
.ac-journey__total { font-size: 13px; font-weight: 600; letter-spacing: 3px; color: var(--ink-muted); }
.ac-journey__label { font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--dourado-700); margin: 0; min-height: 1.5em; }

.ac-steps { list-style: none; margin: 0; padding: 0; }
.ac-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: var(--space-8) 0; border-top: 1px solid var(--marfim-line); }
.ac-step:first-child { border-top: 0; }
.ac-step__kicker { font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--dourado-700); }
.ac-step h3 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: var(--space-3) 0 var(--space-4); }
.ac-step p { margin: 0; max-width: 480px; font-size: 17px; line-height: 1.7; color: var(--ink-muted); }

/* Estados (só com JS a correr) */
.ac-ready .ac-step { opacity: .22; transition: opacity .6s ease; }
.ac-ready .ac-step.is-active { opacity: 1; }
.ac-ready .ac-step > * { transform: translateY(16px); transition: transform .8s var(--ease-out); }
.ac-ready .ac-step.is-active > * { transform: none; }
.ac-ready .ac-dial path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.ac-ready .ac-dial path.is-now { opacity: 1; }
.ac-dial path.is-past { stroke: var(--ink); stroke-dashoffset: 0; opacity: .55; }
.ac-dial path.is-now { stroke: var(--dourado-500); stroke-width: 5; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease-io), stroke .4s ease; }
.ac-ready .ac-dial circle { transform: scale(.4); }
.ac-dial.is-full circle { transform: scale(1); }

@media (max-width: 960px) {
  .ac-journey__stage { position: sticky; top: var(--header-h); z-index: 2; background: var(--marfim); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); border-bottom: 1px solid var(--marfim-line); }
  .ac-journey__sticky { position: static; grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 0 var(--space-4); padding: var(--space-3) 0; }
  .ac-journey__meta { align-self: end; }
  .ac-journey__label { align-self: start; }
  .ac-dial { width: 88px; grid-row: span 2; }
  .ac-dial path { stroke-width: 6; }
  .ac-dial path.is-now { stroke-width: 9; }
  .ac-journey__num { font-size: 28px; }
  .ac-step { min-height: 60vh; }
}

/* ---------- 5. Para quem ---------- */
.ac-audience { padding: 120px 0; }
.ac-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.ac-row { position: relative; display: grid; gap: var(--space-3) var(--space-12); padding: var(--space-8) 0; border-bottom: 1px solid var(--border); }
@media (min-width: 761px) { .ac-row { grid-template-columns: 5fr 6fr; align-items: baseline; padding: 48px 0; } }
.ac-row::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--dourado-500); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-io); }
.ac-row.is-visible::before { transform: scaleX(1); }
.ac-row h3 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 64px); line-height: 1; margin: 0; }
.ac-row p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--ink-muted); max-width: 520px; }

/* ---------- 6. Inscrição: linha que se preenche com o scroll ---------- */
.ac-signup { padding: 120px 0; }
.ac-timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 56px; max-width: 760px; }
.ac-timeline::before, .ac-timeline::after { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--marfim-line); }
.ac-timeline::after { background: var(--dourado-500); transform: scaleY(var(--fill, 1)); transform-origin: top; }
.ac-tl { position: relative; padding: 0 0 72px; }
.ac-tl:last-child { padding-bottom: 0; }
.ac-tl__dot { position: absolute; left: -56px; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--dourado-500); font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--dourado-700); z-index: 1; transition: background-color .4s ease, color .4s ease; }
.ac-tl.is-reached .ac-tl__dot { background: var(--dourado-500); color: var(--azul-900); }
.ac-tl h3 { font-family: var(--font-display); font-size: 24px; margin: 2px 0 var(--space-2); }
.ac-tl p { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 1.7; }
.ac-ready .ac-tl > :not(.ac-tl__dot) { opacity: .3; transition: opacity .6s ease; }
.ac-ready .ac-tl.is-reached > * { opacity: 1; }
.ac-note { display: flex; gap: var(--space-3); align-items: flex-start; margin: 72px 0 0; padding: var(--space-4) var(--space-6); max-width: 760px; background: var(--surface-alt); border-left: 2px solid var(--dourado-500); color: var(--ink-muted); font-size: 15px; }
.ac-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--dourado-700); }

/* ---------- 7. Final ---------- */
.ac-final { position: relative; overflow: hidden; padding: 144px 0; text-align: center; }
.ac-final .section-head { margin: 0 auto; }
.ac-final .title { font-size: clamp(32px, 4.4vw, 56px); }
.ac-final .lead { margin: 0 auto; max-width: 560px; }
.ac-final .hero__actions { justify-content: center; margin-top: var(--space-8); }
.ac-final__symbol { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; transform: translate(-50%, -50%); opacity: .14; pointer-events: none; }
.ac-final__symbol path { fill: none; stroke: var(--dourado-500); stroke-width: 2; }

/* Botão fixo em telemóvel (aparece depois da abertura, some no final) */
.ac-sticky-cta { display: none; }
@media (max-width: 760px) {
  .ac-sticky-cta { display: flex; align-items: center; justify-content: center; position: fixed; z-index: 40; left: var(--gutter); right: var(--gutter); bottom: 16px; min-height: 52px; background: var(--dourado-500); color: var(--azul-900); font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; box-shadow: 0 12px 32px rgba(9,20,30,.28); transform: translateY(140%); transition: transform .5s var(--ease-out); }
  .ac-sticky-cta.is-shown { transform: none; }
  .ac-hero .hero__actions .btn { flex: 1 1 100%; }
  .ac-options, .ac-intro, .ac-journey, .ac-audience, .ac-signup { padding-top: 80px; padding-bottom: 80px; }
  .ac-final { padding: 96px 0 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-ripples path, .ac-hero__cue i::after { animation: none; }
  .ac-hero__inner, .ac-hero__cue { opacity: 1; transform: none; }
}

/* ---------- Rodapé: logo da Academia (mais largo que o wordmark) ---------- */
.footer__brand img { height: 40px; }
.footer__bottom a { color: inherit; }

/* ---------- Páginas opcionais (ativar/desativar em assets/js/paginas.js) ----------
   data-pag="x": só aparece com a página x ativa · data-pag-off="x": só aparece com ela desativada */
html:not([data-paginas~="inscricoes"]) [data-pag="inscricoes"],
html:not([data-paginas~="regulamento"]) [data-pag="regulamento"],
html:not([data-paginas~="formacoes"]) [data-pag="formacoes"],
html[data-paginas~="inscricoes"] [data-pag-off="inscricoes"],
html[data-paginas~="regulamento"] [data-pag-off="regulamento"],
html[data-paginas~="formacoes"] [data-pag-off="formacoes"],
html:not([data-paginas~="inscricoes"]):not([data-paginas~="regulamento"]) .ac-links { display: none !important; }

.ac-links { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }

/* Páginas de conteúdo (inscrições, regulamento, formações) */
.ac-page .legal ol { padding-left: 1.2em; }
.ac-page .legal li + li { margin-top: var(--space-2); }
.ac-page .ac-note { margin: var(--space-12) 0 0; }
.ac-page .ac-links { margin-top: var(--space-12); }

/* Formações de grupo: lista de formatos (fundo escuro) e remate com o símbolo da Academia */
.ac-formats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid rgba(255,255,255,.14); }
@media (min-width: 640px) { .ac-formats { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-12); } }
@media (min-width: 1100px) { .ac-formats { grid-template-columns: repeat(4, 1fr); column-gap: var(--space-8); } }
.ac-formats li { position: relative; padding: var(--space-8) 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.ac-formats li::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 2px; background: var(--dourado-500); }
.ac-formats__name { font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; margin: 0 0 var(--space-3); color: var(--on-dark); }
.ac-formats p { margin: 0; color: var(--on-dark-muted); font-size: 16px; line-height: 1.7; }
.ac-formats__note { margin: var(--space-12) 0 0; color: var(--on-dark-muted); }
.ac-formats__note a { color: var(--dourado-500); }
.ac-page .cta::before { background-image: url("../img/academia-simbolo-cor.svg"); }
