/* Midea × FC Barcelona landing page — every rule is scoped to .mfcb so nothing leaks into the AEM site.
   Font: inherits the site's default "HCo Gotham". Override with --aem-font-sans / --aem-font-display.
   If the AEM global header is sticky, set --mfcb-offset to its height so the campaign bar docks below it. */

.mfcb {
  --mfcb-offset: 0px;
  --night: #0f1a33; --night-deep: #070f20; --garnet: #9c1f3a; --gold: #f2c45a;
  --primary: #0b84d6; --primary-foreground: #f8fafc; --fg: #ffffff;
  --glow: radial-gradient(60% 60% at 70% 40%, rgba(11,132,214,.35), transparent 70%);
  --font-sans: var(--aem-font-sans, 'HCo Gotham', 'Gotham', Arial, sans-serif);
  --font-display: var(--aem-font-display, 'HCo Gotham', 'Gotham', Arial, sans-serif);
  background: var(--night-deep); color: var(--fg); font-family: var(--font-sans); overflow-x: clip; -webkit-font-smoothing: antialiased;

  position: relative;
  z-index: 12;
}
.mfcb *, .mfcb *::before, .mfcb *::after { box-sizing: border-box; }
.mfcb h1, .mfcb h2, .mfcb h3, .mfcb p { margin: 0; color: inherit; }
.mfcb a { color: inherit; text-decoration: none; }
.mfcb button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mfcb img, .mfcb video { display: block; max-width: 100%; }
.mfcb em { font-style: normal; background-image: linear-gradient(90deg, var(--gold), var(--fg)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mfcb section[id] { scroll-margin-top: calc(var(--mfcb-offset) + 52px); }

/* Campaign sub-nav (sits under the AEM global header). The gap keeps clear of a tall
   header logo and scrolls away, so the bar still docks flush under a sticky header. */
.mfcb .topgap { height: 20px; }
.mfcb .subnav { position: sticky; top: var(--mfcb-offset); z-index: 30; background: rgba(7,15,32,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.1); }
.mfcb .subnav-inner { max-width: 1440px; margin: auto; height: 52px; padding: 0 4%; display: flex; align-items: center; }
.mfcb .chapters { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.mfcb .chapters::-webkit-scrollbar { display: none; }
.mfcb .chapters a { font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 7px 14px; border-radius: 999px; white-space: nowrap; opacity: .65; transition: .25s; }
.mfcb .chapters a:hover, .mfcb .chapters a.on { opacity: 1; background: rgba(255,255,255,.12); }
.mfcb .progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: linear-gradient(90deg, var(--primary), var(--garnet)); transform: scaleX(0); transform-origin: left; }

/* Hero */
.mfcb .hero { position: relative; height: calc(100svh - 124px); min-height: 560px; max-height: 900px; overflow: hidden; display: grid; align-items: end; }
.mfcb .hero-media { position: absolute; inset: -4%; }
.mfcb .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.mfcb .hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, var(--night-deep) 2%, transparent 55%), linear-gradient(90deg, rgba(7,15,32,.85), transparent 65%); }
.mfcb .hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .14; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mfcb .letterbox { position: absolute; left: 0; right: 0; height: 0; background: var(--night-deep); z-index: 2; animation: mfcb-bars 1.4s cubic-bezier(.7,0,.2,1) forwards; }
.mfcb .letterbox.top { top: 0; } .mfcb .letterbox.bottom { bottom: 0; }
.mfcb .hero-body { position: relative; z-index: 3; padding: 0 5% 64px; max-width: 1440px; width: 100%; margin: auto; }
.mfcb .hero h1 { font: 700 clamp(38px, 7.4vw, 112px)/.95 var(--font-display); letter-spacing: -.035em; margin: 22px 0 26px; }
.mfcb .hero h1 .hl { display: block; }
.mfcb .hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: .22em; padding-bottom: .25em; margin-bottom: -.25em; }
.mfcb .hero h1 .w > span { display: inline-block; transform: translateY(calc(100% + .25em)); animation: mfcb-rise .9s cubic-bezier(.2,.8,.2,1) forwards; }

.mfcb .hero-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; opacity: 0; animation: mfcb-fade 1s 1.4s forwards; }
.mfcb .btn-primary { display: inline-flex; align-items: center; height: 52px; padding: 0 26px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-weight: 700; font-size: 14px; transition: transform .25s, box-shadow .25s; }
.mfcb .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--primary); }
.mfcb .btn-film { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); font-weight: 600; font-size: 14px; transition: background .25s; }
.mfcb .btn-film:hover { background: rgba(255,255,255,.12); }
.mfcb .btn-film .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--fg); color: var(--night-deep); display: grid; place-items: center; }
.mfcb .btn-film .dot svg { width: 14px; margin-left: 2px; }

/* Basics */
.mfcb .basics { max-width: 1440px; margin: auto; padding: 120px 5% 130px; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.mfcb .basics-h { font: 700 clamp(38px, 5.4vw, 88px)/1.02 var(--font-display); letter-spacing: -.035em; margin: 20px 0 24px; }
.mfcb .basics-h .q { display: block; font-size: .52em; line-height: 1.12; opacity: .55; letter-spacing: -.02em; }
.mfcb .basics-sub { max-width: 44ch; font-size: 15px; line-height: 1.7; opacity: .72; }
.mfcb .basics-media { border-radius: 26px; overflow: hidden; aspect-ratio: 16/10; background: var(--night-deep); box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(255,255,255,.1); }
.mfcb .basics-media video { width: 100%; height: 100%; object-fit: cover; }

/* Lineup (scroll-driven on desktop, swipe on tablet/mobile) */
.mfcb .lineup { position: relative; }
.mfcb .lineup-sticky { position: sticky; top: calc(var(--mfcb-offset) + 52px); height: calc(100svh - 52px - var(--mfcb-offset)); overflow: hidden; display: flex; flex-direction: column; }
.mfcb .lineup-head { padding: 34px 5% 20px; display: flex; justify-content: space-between; align-items: end; gap: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }
.mfcb .lineup-head h2 { font: 700 clamp(30px, 4.2vw, 60px)/1 var(--font-display); letter-spacing: -.03em; }
.mfcb .formation { display: flex; gap: 6px; }
.mfcb .formation button { width: 38px; height: 38px; border-radius: 50%; font: 700 12px var(--font-display); border: 1px solid rgba(255,255,255,.25); transition: .3s; }
.mfcb .formation button.on { background: var(--fg); color: var(--night-deep); transform: scale(1.1); }
.mfcb .track { display: flex; gap: 28px; padding: 0 5%; flex: 1; min-height: 0; align-items: center; will-change: transform; }
.mfcb .player { position: relative; flex: 0 0 min(76vw, 1040px); height: min(68svh, 600px, 100%); max-height: 100%; border-radius: 28px; overflow: hidden; display: grid; grid-template-columns: 1.25fr 1fr; background: var(--night); transition: transform .5s, opacity .5s; isolation: isolate; }
.mfcb .player:not(.on) { opacity: .45; transform: scale(.94); }
.mfcb .player-img { position: relative; overflow: hidden; }
.mfcb .player-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.mfcb .player:hover .player-img img { transform: scale(1.06); }
.mfcb .player-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--night)); }
.mfcb .player-copy { padding: clamp(24px, 3.5vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 16px; background: var(--glow), var(--night); }
.mfcb .position { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; align-self: flex-start; background-image: linear-gradient(90deg, var(--gold), var(--fg)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mfcb .player-copy .category { opacity: .6; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mfcb .player h3 { font: 700 clamp(26px, 2.8vw, 42px)/1.05 var(--font-display); letter-spacing: -.025em; }
.mfcb .player-copy p { opacity: .75; line-height: 1.65; font-size: 15px; }
.mfcb .player-copy p.category { opacity: .6; }
.mfcb .player-cta { align-self: flex-start; margin-top: 8px; }
.mfcb .lineup-foot { position: relative; z-index: 2; padding: 16px 5% 26px; display: flex; align-items: center; gap: 18px; max-width: 1440px; width: 100%; margin: 0 auto; font-size: 12px; letter-spacing: .14em; opacity: .7; }
.mfcb .bar { flex: 1; height: 2px; background: rgba(255,255,255,.15); position: relative; overflow: hidden; border-radius: 2px; }
.mfcb .bar i { position: absolute; inset: 0; background: var(--fg); transform: scaleX(0); transform-origin: left; }

/* Closing chapter */
.mfcb .film { position: relative; min-height: 88svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 100px 5%; }
.mfcb .film > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.mfcb .film::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at center, transparent 10%, var(--night-deep) 78%); }
.mfcb .film-inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 22px; margin-top: 18svh; }
.mfcb .film-lockup { width: clamp(200px, 26vw, 340px); height: auto; }
.mfcb .film h2 { font: 700 clamp(34px, 5.5vw, 84px)/1 var(--font-display); letter-spacing: -.035em; max-width: 14ch; }

/* Film dialog */
.mfcb .film-dialog { width: min(92vw, 1024px); padding: 0; border: 0; border-radius: 12px; background: #000; overflow: hidden; }
.mfcb .film-dialog::backdrop { background: rgba(0,0,0,.8); }
.mfcb .film-dialog video { width: 100%; max-height: 75dvh; object-fit: contain; }
.mfcb .film-close { position: absolute; top: 8px; right: 12px; z-index: 2; font-size: 28px; line-height: 1; color: #fff; }

.mfcb [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity .9s, transform .9s cubic-bezier(.2,.8,.2,1); }
.mfcb [data-reveal].in { opacity: 1; transform: none; }

@keyframes mfcb-bars { 0% { height: 50%; } 100% { height: 0; } }
@keyframes mfcb-rise { to { transform: none; } }
@keyframes mfcb-fade { to { opacity: 1; } }

@media (max-width: 1023px) {
  .mfcb .lineup-sticky { position: static; height: auto; }
  .mfcb .lineup { height: auto !important; }
  .mfcb .track { transform: none !important; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; align-items: stretch; }
  .mfcb .track::-webkit-scrollbar { display: none; }
  .mfcb .player { flex-basis: 84vw; height: auto; grid-template-columns: 1fr; scroll-snap-align: center; }
  .mfcb .player:not(.on) { opacity: 1; transform: none; }
  .mfcb .player-img { aspect-ratio: 16/10; }
  .mfcb .player-img::after { background: linear-gradient(0deg, var(--night), transparent 50%); }
  .mfcb .basics { grid-template-columns: 1fr; gap: 34px; padding: 80px 5%; }
  .mfcb .basics-media { order: -1; }
}
@media (max-width: 640px) {
  .mfcb .lineup-head { flex-direction: column; align-items: flex-start; }
  .mfcb .formation button { width: 32px; height: 32px; }
  .mfcb .hero-body { padding-bottom: 40px; }
  .mfcb .chapters { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mfcb *, .mfcb *::before, .mfcb *::after { animation: none !important; transition: none !important; }
  .mfcb .hero h1 .w > span, .mfcb [data-reveal] { transform: none; opacity: 1; }
  .mfcb .hero-row { opacity: 1; }
  .mfcb .letterbox { height: 0; }
}
