/* ============================================
   MEDUSA X — Homepage v2 (secções exclusivas da home)
   Carregado apenas em index.html / index-en.html.
   Reutiliza navbar, mobile-menu, botões e fade-in globais de style.css —
   este ficheiro cobre só o que é novo: hero com slideshow, mundos, processo,
   metodologia, imprensa em fundo claro, private list e footer da home.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

body.home {
  --mx-cream: #F5F3F0;
  --mx-brown: #1A1612;
  --mx-brown-soft: #0F0C0A;
  --font-display: 'DM Serif Display', Georgia, serif;
}

/* --- Hero: slideshow controlado por um pequeno script (ver fim da página) ---
   Uma classe .is-active por vez, com transição de opacidade em CSS.
   A 1ª foto já nasce com a classe no HTML, por isso está visível no
   instante em que a página pinta — nunca há um frame preto. */
.mx-hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; background: var(--mx-brown); margin-top: 0;
}
.mx-hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1.4s ease;
}
.mx-hero__slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .mx-hero__slide { transition: none; }
}
.mx-hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20,16,12,.5) 0%, rgba(20,16,12,.18) 22%, rgba(20,16,12,.5) 48%, rgba(20,16,12,.85) 78%, rgba(20,16,12,.97) 100%);
}
.mx-hero__content { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 2rem 4.5rem; width: 100%; }
.mx-hero__label { font-weight: 600; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--magenta); }
.mx-hero__title {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(2.6rem, 7.5vw, 6.4rem);
  line-height: 0.98; letter-spacing: -0.01em; color: var(--mx-cream); margin: 1.2rem 0 0;
}
.mx-hero__title em { font-style: italic; }
.mx-hero__title .accent { color: var(--magenta); }
.mx-hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2.5rem; flex-wrap: wrap; margin-top: 2.2rem; }
.mx-hero__sub { font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.55; max-width: 560px; margin: 0; color: rgba(247,244,240,.82); }
.mx-hero__sub strong { color: #fff; font-weight: 600; }

/* --- Secção clara genérica (fundo cream) --- */
.mx-light { background: var(--mx-cream); color: var(--mx-brown); padding: 7rem 0; }
.mx-light .label-text { color: var(--magenta); }
.mx-light h2 { font-family: var(--font-display); font-weight: 500; color: var(--mx-brown); letter-spacing: -0.01em; }
.mx-light h2 em { font-style: italic; }
.mx-light h2 .accent { color: var(--magenta); }
.mx-light p { color: rgba(26,22,18,.72); }
.mx-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* --- Marquee de imprensa (fundo branco, como no HTML original) --- */
.mx-marquee-wrap { background: var(--branco); padding: 3.5rem 0 3.8rem; overflow: hidden; border-top: 1px solid rgba(26,22,18,.14); border-bottom: 1px solid rgba(26,22,18,.14); }
.mx-marquee-wrap .label-text { color: var(--magenta); }
.mx-marquee { position: relative; width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mx-marquee__track { display: flex; width: max-content; animation: mxMarquee 20s linear infinite; align-items: center; gap: 6rem; }
.mx-marquee__track a { display: flex; flex: none; align-items: center; }
.mx-marquee__track img { height: 138px; width: auto; flex: none; object-fit: contain; opacity: .55; filter: grayscale(1); transition: opacity .25s ease, filter .25s ease; }
.mx-marquee__track a:hover img, .mx-marquee__track a:focus-visible img { opacity: .9; filter: grayscale(0); }
@keyframes mxMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Sobre --- */
.mx-about h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.08; margin: 1.4rem 0 0; }
.mx-about__body { display: flex; flex-direction: column; gap: 1.8rem; max-width: 700px; margin-top: 2.2rem; }
.mx-about__body p { font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.6; margin: 0; }
.mx-link-underline { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mx-brown); border-bottom: 1px solid var(--mx-brown); padding-bottom: 4px; width: fit-content; transition: color .3s ease, border-color .3s ease; }
.mx-link-underline:hover { color: var(--magenta); border-color: var(--magenta); }

/* --- Processo (7 fases, com animação sequencial em CSS puro) --- */
.mx-phases { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1rem; margin-top: 4.5rem; padding-top: 2.2rem; }
.mx-phases__track { position: absolute; top: 11px; left: 7.14%; right: 7.14%; height: 2px; background: rgba(26,22,18,.14); }
.mx-phases__fill { position: absolute; top: 11px; left: 7.14%; height: 2px; width: 0; background: var(--magenta); animation: mxPhaseFill 9.8s ease-in-out infinite; }
.mx-phase { text-align: center; }
.mx-phase__dot { display: block; width: 11px; height: 11px; margin: 0 auto 0.9rem; border-radius: 50%; background: var(--mx-cream); border: 1px solid rgba(26,22,18,.25); position: relative; z-index: 1; }
.mx-phase__dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: rgba(26,22,18,.2); animation: mxPhaseDotFill 9.8s ease-in-out infinite; }
.mx-phase__num { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: rgba(26,22,18,.4); animation: mxPhaseColor 9.8s ease-in-out infinite; }
.mx-phase__name { display: block; font-family: var(--font-display); font-style: italic; font-size: clamp(0.95rem, 1.6vw, 1.3rem); color: rgba(26,22,18,.45); margin-top: 0.4rem; animation: mxPhaseNameColor 9.8s ease-in-out infinite; }

@keyframes mxPhaseFill { 0% { width: 0; } 100% { width: 85.7%; } }
@keyframes mxPhaseDotFill { 0%, 6% { background: var(--magenta); border-color: var(--magenta); } 13%, 100% { background: rgba(26,22,18,.2); } }
@keyframes mxPhaseColor { 0%, 6% { color: var(--magenta); } 13%, 100% { color: rgba(26,22,18,.4); } }
@keyframes mxPhaseNameColor { 0%, 6% { color: var(--mx-brown); } 13%, 100% { color: rgba(26,22,18,.45); } }

.mx-phase:nth-child(1) .mx-phase__dot::after, .mx-phase:nth-child(1) .mx-phase__num, .mx-phase:nth-child(1) .mx-phase__name { animation-delay: 0s; }
.mx-phase:nth-child(2) .mx-phase__dot::after, .mx-phase:nth-child(2) .mx-phase__num, .mx-phase:nth-child(2) .mx-phase__name { animation-delay: 1.4s; }
.mx-phase:nth-child(3) .mx-phase__dot::after, .mx-phase:nth-child(3) .mx-phase__num, .mx-phase:nth-child(3) .mx-phase__name { animation-delay: 2.8s; }
.mx-phase:nth-child(4) .mx-phase__dot::after, .mx-phase:nth-child(4) .mx-phase__num, .mx-phase:nth-child(4) .mx-phase__name { animation-delay: 4.2s; }
.mx-phase:nth-child(5) .mx-phase__dot::after, .mx-phase:nth-child(5) .mx-phase__num, .mx-phase:nth-child(5) .mx-phase__name { animation-delay: 5.6s; }
.mx-phase:nth-child(6) .mx-phase__dot::after, .mx-phase:nth-child(6) .mx-phase__num, .mx-phase:nth-child(6) .mx-phase__name { animation-delay: 7.0s; }
.mx-phase:nth-child(7) .mx-phase__dot::after, .mx-phase:nth-child(7) .mx-phase__num, .mx-phase:nth-child(7) .mx-phase__name { animation-delay: 8.4s; }
@media (prefers-reduced-motion: reduce) {
  .mx-phases__fill, .mx-phase__dot::after, .mx-phase__num, .mx-phase__name { animation: none; }
  .mx-phase__num { color: rgba(26,22,18,.4); }
}

/* --- Oferta / Mundos (tabs por clique, JS mínimo — ver script no fim da página) --- */
.mx-worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; margin-top: 3.5rem; align-items: start; }
.mx-worlds__index { display: flex; flex-direction: column; border-bottom: 1px solid rgba(26,22,18,.14); }
.mx-worlds__tab {
  display: flex; align-items: baseline; gap: 1.1rem; padding: 1.35rem 0; width: 100%;
  border-top: 1px solid rgba(26,22,18,.14); border-left: none; border-right: none; border-bottom: none;
  background: none; cursor: pointer; text-align: left; font-family: inherit;
  transition: padding-left .3s ease;
}
.mx-worlds__tab:hover { padding-left: 0.6rem; }
.mx-worlds__tab .num { font-size: 0.8rem; font-weight: 600; color: rgba(26,22,18,.35); flex: none; width: 24px; transition: color .3s ease; }
.mx-worlds__tab .name { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.5rem); color: rgba(26,22,18,.35); transition: color .3s ease; }
.mx-worlds__tab.is-active .num { color: var(--magenta); }
.mx-worlds__tab.is-active .name { color: var(--mx-brown); }
.mx-worlds__panels { position: relative; min-height: 260px; }
.mx-worlds__panel { display: none; padding-top: 0.3rem; }
.mx-worlds__panel.is-active { display: block; }
.mx-worlds__panel .kicker { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--magenta); margin-bottom: 1.1rem; }
.mx-worlds__panel p.lead { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.35; margin: 0; max-width: 480px; }
.mx-worlds__panel .tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; max-width: 480px; }
.mx-worlds__panel .tags span { padding: 0.55rem 0.9rem; border: 1px solid rgba(26,22,18,.2); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(26,22,18,.7); }

/* --- Metodologia (fundo escuro) --- */
.mx-method { background: linear-gradient(180deg, var(--mx-brown-soft) 0%, var(--mx-brown) 100%); color: var(--mx-cream); padding: 8rem 0; }
.mx-method h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.06; margin: 1.4rem 0 0; color: var(--mx-cream); }
.mx-method__intro { max-width: 780px; margin-bottom: 3.5rem; }
.mx-method__intro p { color: rgba(245,243,240,.62); font-size: 1.1rem; margin-top: 1.4rem; }
.mx-method__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; border-top: 1px solid rgba(245,243,240,.16); padding-top: 2.2rem; }
.mx-method__col { padding-right: 1.5rem; border-right: 1px solid rgba(245,243,240,.1); }
.mx-method__col:last-child { border-right: none; }
.mx-method__col .n { font-size: 1.5rem; font-weight: 600; color: var(--magenta); }
.mx-method__col .k { display: block; margin-top: 1rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245,243,240,.5); }
.mx-method__col p { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.4; margin-top: 1rem; color: var(--mx-cream); }

/* --- CTA intermédio (mesma tipografia dos restantes headers) --- */
.mx-midcta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.72; }
.mx-midcta__overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20,16,12,.18) 0%, rgba(15,12,10,.4) 55%, rgba(15,12,10,.7) 100%); }
.mx-midcta h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

/* --- O que nos distingue: swap em CSS puro --- */
.mx-diff p.swap { position: relative; }
.mx-diff .swap-wrap { position: relative; display: inline-block; cursor: default; }
.mx-diff .swap-a, .mx-diff .swap-b { transition: opacity .35s ease; }
.mx-diff .swap-a { border-bottom: 1.5px dashed var(--magenta); padding-bottom: 2px; }
.mx-diff .swap-b { position: absolute; left: 0; top: 0; opacity: 0; color: var(--magenta); font-weight: 500; }
.mx-diff .swap-wrap:hover .swap-a { opacity: 0; }
.mx-diff .swap-wrap:hover .swap-b { opacity: 1; }
.mx-diff .swap-hint { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--magenta); margin-left: 0.6rem; white-space: nowrap; }

/* --- Capítulos (cards claros) --- */
.mx-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3.5rem; }
.mx-chapter__img { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--mx-brown); }
.mx-chapter__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mx-chapter:hover .mx-chapter__img img { transform: scale(1.04); }
.mx-chapter__tag { position: absolute; left: 1.2rem; top: 1.2rem; background: rgba(15,12,10,.55); backdrop-filter: blur(6px); color: #fff; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.5rem 0.85rem; }
.mx-chapter h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin: 1.4rem 0 0; color: var(--mx-brown); }
.mx-chapter h3 .accent { color: var(--magenta); }
.mx-chapter p { margin: 0.8rem 0 0; font-size: 1rem; color: rgba(26,22,18,.62); max-width: 480px; }
.mx-chapter .mx-pill { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.4rem; color: var(--mx-brown); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid rgba(26,22,18,.3); border-radius: 100px; padding: 0.75rem 1.4rem; transition: all .3s ease; }
.mx-chapter .mx-pill:hover { background: var(--magenta); color: #fff; border-color: var(--magenta); }

/* --- Private List --- */
.mx-private { background: var(--mx-brown); color: var(--mx-cream); padding: 7.5rem 0; }
.mx-private__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: start; }
.mx-private h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.05; margin: 1.4rem 0 0; color: var(--mx-cream); }
.mx-private h2 em { font-style: italic; }
.mx-private p.lead { margin-top: 1.6rem; font-size: 1.05rem; line-height: 1.6; color: rgba(245,243,240,.68); max-width: 480px; }
.mx-private__list { display: flex; flex-direction: column; }
.mx-private__list div { display: flex; gap: 1.3rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid rgba(245,243,240,.16); }
.mx-private__list div:last-child { border-bottom: 1px solid rgba(245,243,240,.16); }
.mx-private__list span.n { font-size: 0.8rem; font-weight: 600; color: var(--magenta); flex: none; width: 24px; }
.mx-private__list p { margin: 0; font-weight: 500; font-size: 1.05rem; color: var(--mx-cream); }

/* --- Imprensa (fundo claro, 3 colunas) --- */
.mx-press h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); margin: 0.4rem 0 0; }
.mx-press__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 3rem; border-top: 1px solid rgba(26,22,18,.14); }
.mx-press__col { padding: 2.6rem 2.4rem; border-right: 1px solid rgba(26,22,18,.12); }
.mx-press__col:first-child { padding-left: 0; }
.mx-press__col:last-child { border-right: none; padding-right: 0; }
.mx-press__col .src { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(26,22,18,.45); }
.mx-press__col blockquote { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; line-height: 1.35; margin: 1.2rem 0 1.5rem; color: var(--mx-brown); }
.mx-press__col a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--magenta); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* --- Impacto magenta --- */
.mx-impact { background: var(--magenta); color: #fff; text-align: center; padding: 7.5rem 0; }
.mx-impact span { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 1.6rem; }
.mx-impact h2 { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(2.2rem, 7vw, 5.2rem); margin: 0; }

/* --- CTA final --- */
.mx-final { background: var(--mx-cream); padding: 8rem 0; }
.mx-final__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2.5rem; flex-wrap: wrap; }
.mx-final h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; margin: 0; color: var(--mx-brown); max-width: 640px; }
.mx-final h2 em { font-style: italic; }
.mx-final p { margin-top: 1.4rem; color: rgba(26,22,18,.68); max-width: 460px; }
.mx-final .btn--dark { display: inline-flex; align-items: center; gap: 0.7rem; padding: 1rem 2.2rem; background: var(--mx-brown); color: #fff; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; border-radius: 0; transition: background .3s ease; }
.mx-final .btn--dark:hover { background: var(--magenta); }

/* --- Footer da home: movido para style.css (footer global do site) --- */

/* --- Responsivo --- */
@media (max-width: 900px) {
  .mx-worlds, .mx-chapters, .mx-private__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .mx-method__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .mx-method__col { border-right: none; padding-right: 0; border-top: 1px solid rgba(245,243,240,.1); padding-top: 1.6rem; }
  .mx-method__col:first-child { border-top: none; padding-top: 0; }
  .mx-press__grid { grid-template-columns: 1fr; }
  .mx-press__col { border-right: none !important; padding: 2rem 0 !important; border-top: 1px solid rgba(26,22,18,.12); }
  .mx-press__col:first-child { border-top: none; }
  .mx-phases { grid-template-columns: repeat(4, 1fr); row-gap: 1.6rem; }
}
@media (max-width: 560px) {
  .mx-phases { grid-template-columns: repeat(2, 1fr); }
}
