/* o meu carrinho — site de apresentação. Cores e letra da app (cabaz-app/src/theme/tokens.scss). */

@font-face {
  font-family: 'Funnel Display';
  src: url('../assets/fonts/FunnelDisplay-var.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face { font-family: 'Chain Continente'; src: url('../assets/fonts/chains/chain-continente.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Chain Pingo Doce'; src: url('../assets/fonts/chains/chain-pingo-doce.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Chain Lidl'; src: url('../assets/fonts/chains/chain-lidl.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Chain Aldi'; src: url('../assets/fonts/chains/chain-aldi.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Chain Auchan'; src: url('../assets/fonts/chains/chain-auchan.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --bg: #edf1ea;
  --bg-deep: #e1e8de;
  --surface: #fff;
  --line: #dde4d9;
  --text: #17201b;
  --text-2: #4c5a51;
  --ink: #123d2e;
  --brand-green: #24785a;
  --green: #1e7a4c;
  --accent: #e0492b;
  --mustard: #e9b23a;
  --chain-continente: #e30613;
  --chain-pingo-doce: #5a9e2f;
  --chain-auchan: #e2001a;
  --display: 'Funnel Display', ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pad: clamp(18px, 4vw, 56px);
  --radius: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.5; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; margin: 0; line-height: 0.95; }
.accent { color: var(--accent); }
body.is-loading { overflow: hidden; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px;
  font: 650 15px/1 var(--body); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn--ink { background: var(--ink); color: #fff; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; min-width: 196px; height: 62px; padding: 0 22px 0 18px;
  border-radius: 18px; background: var(--text); color: #fff; text-decoration: none;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s;
}
.store-btn-unused:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 14px 30px -12px rgba(18, 61, 46, .55); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: 11px; opacity: .75; line-height: 1.2; }
.store-btn b { display: block; font: 600 20px/1.1 var(--display); letter-spacing: -0.02em; }
.store-btn.is-soon { cursor: default; }

/* Badges oficiais (Apple e Google), à mesma altura (o PNG da Google foi cortado à margem transparente) */
.badge { display: inline-flex; align-items: center; height: 58px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.badge:hover { transform: translateY(-3px) rotate(-1.5deg); }
.badge img { height: 100%; width: auto; }
.badge.is-soon { position: relative; cursor: default; }
.badge.is-soon::after { content: 'brevemente'; position: absolute; top: -6px; right: -6px; padding: 3px 8px; border-radius: 8px; background: var(--accent); color: #fff; font: 700 11px var(--display); transform: rotate(6deg); }

/* ---------- Barra de progresso (com um carrinho na ponta) ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-green), var(--accent)); transform-origin: left; transform: scaleX(0); will-change: transform; }

/* ---------- Navegação: logótipo, «Descarregar» e hambúrguer (menu de ecrã inteiro, como o do Lando Norris) ---------- */
.nav { position: fixed; top: 18px; left: 0; right: 0; z-index: 70; padding: 0 var(--pad); pointer-events: none; }
.nav-bar { display: flex; align-items: center; gap: 10px; max-width: 1400px; margin: 0 auto; }
.nav-bar > * { pointer-events: auto; }
.nav-logo { flex: none; margin-right: auto; padding: 10px 14px; margin-left: -14px; border-radius: 18px; transition: background .4s, box-shadow .4s, backdrop-filter .4s; }
.nav-logo img { height: 34px; width: auto; display: block; transition: filter .2s .5s; }
.menu-open .nav-logo img { transition: filter .2s .22s; }
.nav.is-solid .nav-logo { background: rgba(255, 255, 255, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 10px 40px -18px rgba(18, 61, 46, .35); }
.nav .nav-cta { height: 58px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--accent); font-size: 17px; gap: 12px; flex-direction: row-reverse; }
.nav .nav-cta i { width: auto; height: auto; background: none; font-size: 18px; }
.nav .nav-cta:hover { background: #c93c20; }
.nav-burger { position: relative; flex: none; width: 58px; height: 58px; border: 0; border-radius: 16px; background: #fff; cursor: pointer; box-shadow: 0 10px 30px -16px rgba(18, 61, 46, .45); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), background .3s; }
.nav-burger:hover { transform: scale(1.05); }
.nav-burger span { position: absolute; left: 18px; right: 18px; height: 2.5px; border-radius: 2px; background: var(--text); transition: transform .45s cubic-bezier(.7, 0, .2, 1), top .45s cubic-bezier(.7, 0, .2, 1); }
.nav-burger span:nth-child(1) { top: 23px; }
.nav-burger span:nth-child(2) { top: 33px; }
.menu-open .nav-burger span { top: 28px; }
.menu-open .nav-burger span:nth-child(1) { transform: rotate(45deg); }
.menu-open .nav-burger span:nth-child(2) { transform: rotate(-45deg); }
.menu-open .nav-logo { transition-delay: .2s; background: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.menu-open .nav-logo img { filter: brightness(0) invert(.93) sepia(.15); }
.menu-open .progress { opacity: 0; }

/* Botão escuro com seta (também usado na página Premium) */
.nav-cta {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 20px; border-radius: 15px; overflow: hidden;
  background: var(--ink); color: #fff; font: 600 15px var(--display); text-decoration: none; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), background .3s;
}
.nav-cta i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); font-style: normal; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.nav-cta:hover { transform: translateY(-1px); background: var(--brand-green); }
.nav-cta:hover i { transform: translateY(3px); }

/* Menu */
.menu {
  position: fixed; inset: 0; z-index: 65; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden;
  background: #10241c; color: var(--bg);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .75s cubic-bezier(.77, 0, .18, 1), visibility 0s .75s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .75s cubic-bezier(.77, 0, .18, 1), visibility 0s; }
.menu-contours { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(237, 241, 234, .07); stroke-width: 1.2; pointer-events: none; }

/* Pistas com carrinhos a rolar (só transform; parados enquanto o menu está fechado) */
.menu-road { position: relative; overflow: hidden; border-right: 1px solid rgba(237, 241, 234, .08); }
.mlane { position: absolute; left: 0; right: 0; top: var(--top); height: 0; border-top: 2px dashed rgba(237, 241, 234, .12); }
.mlane-car { position: absolute; bottom: 0; left: 0; width: var(--w); animation: mlane-roll var(--s) linear infinite var(--d); animation-play-state: paused; }
.mlane[style*="--dir:-1"] .mlane-car { animation-name: mlane-roll-back; }
.mlane[style*="--dir:-1"] .mlane-bob { transform: scaleX(-1); }
.mlane-bob { position: relative; --cart: #edf1ea; }
.mlane-bob .cart-svg { position: relative; z-index: 1; animation: mlane-bounce .5s ease-in-out infinite alternate; animation-play-state: paused; }
.mlane-bob .wheel { animation: mlane-spin var(--spin, 1s) linear infinite; animation-play-state: paused; }
.mlane-bob .wheel rect { fill: #10241c; }
.mlane-goods { position: absolute; left: 24%; right: 12%; bottom: 46%; height: 70%; display: flex; align-items: flex-end; justify-content: center; gap: 2%; animation: mlane-bounce .5s ease-in-out infinite alternate; animation-play-state: paused; }
.mlane-goods img { height: 100%; width: auto; max-width: 48%; object-fit: contain; transform: rotate(calc((var(--k) - 1) * 8deg)); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.menu-open :is(.mlane-car, .mlane-bob .cart-svg, .mlane-bob .wheel, .mlane-goods) { animation-play-state: running; }
.mlane { opacity: 0; transform: translateX(-40px); transition: opacity .6s, transform .9s cubic-bezier(.2, .9, .2, 1); }
.menu-open .mlane { opacity: 1; transform: none; transition-delay: .4s; }
@keyframes mlane-roll { from { transform: translateX(calc(var(--w) * -1.2)); } to { transform: translateX(calc(var(--road, 50vw) + var(--w) * .2)); } }
@keyframes mlane-roll-back { from { transform: translateX(calc(var(--road, 50vw) + var(--w) * .2)); } to { transform: translateX(calc(var(--w) * -1.2)); } }
@keyframes mlane-spin { to { transform: rotate(360deg); } }
@keyframes mlane-bounce { to { transform: translateY(-3px); } }

/* Mapa: casa ao centro, três supermercados, carrinhos que vão até lá e mostram o total */
.menu-map { position: relative; overflow: hidden; border-right: 1px solid rgba(237, 241, 234, .08); opacity: 0; transition: opacity .6s .3s; }
.menu-open .menu-map { opacity: 1; }
.menu-map svg { position: absolute; inset: 70px 30px 90px; width: calc(100% - 60px); height: calc(100% - 160px); overflow: visible; }
.map-blocks rect { fill: rgba(237, 241, 234, .035); }
.map-park { fill: rgba(30, 122, 76, .22); }
.map-river { fill: none; stroke: rgba(120, 170, 160, .14); stroke-width: 34; stroke-linecap: round; }
.map-roads path { fill: none; stroke: rgba(237, 241, 234, .08); stroke-width: 22; }
.map-lines path { fill: none; stroke: rgba(237, 241, 234, .16); stroke-width: 1.4; stroke-dasharray: 8 12; }
.map-route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.map-home-dot { fill: var(--accent); stroke: #edf1ea; stroke-width: 4; }
.map-home-pulse { fill: var(--accent); opacity: .5; transform-box: fill-box; transform-origin: center; animation: map-pulse 1.8s ease-out infinite; animation-play-state: paused; }
.menu-open .map-home-pulse { animation-play-state: running; }
@keyframes map-pulse { from { transform: scale(.7); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }
.map-home rect { fill: rgba(237, 241, 234, .1); }
.map-home text { fill: #edf1ea; font: 600 14px var(--display); text-anchor: middle; }
.map-pin { fill: #10241c; stroke: #edf1ea; stroke-width: 4; }
.map-card { transform: scale(.9); opacity: .55; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .4s; }
.map-card rect { fill: #edf1ea; }
.map-chain { font-size: 20px; text-anchor: middle; fill: currentColor; }
.map-chain.chain--pingo-doce { font-size: 25px; }
.map-price { fill: var(--text); font: 700 26px var(--display); letter-spacing: -0.02em; text-anchor: middle; font-variant-numeric: tabular-nums; }
.map-store.is-here .map-card { transform: none; opacity: 1; }
.map-best { opacity: 0; transform: scale(.4) rotate(-12deg); transition: opacity .3s, transform .5s cubic-bezier(.3, 1.8, .5, 1); }
.map-best rect { fill: var(--accent); }
.map-best text { fill: #fff; font: 700 13px var(--display); text-anchor: middle; }
.map-store.is-best .map-best { opacity: 1; transform: rotate(6deg); }
.is-done .map-store:not(.is-best) .map-price { fill: #7d8a82; }
.map-cart .frame { fill: none; stroke: #edf1ea; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.map-cart .wheel circle { fill: #edf1ea; }
.map-cart .wheel rect { fill: #10241c; }
.map-cart .heart { fill: var(--accent); }
.menu-map svg > * { transition: opacity .5s; }
.menu-map.is-fading :is(.map-route, .map-store, .map-cart) { opacity: 0; }
.map-caption { position: absolute; left: clamp(40px, 4vw, 70px); right: 40px; bottom: 40px; margin: 0; font: 500 15px/1.5 var(--display); color: rgba(237, 241, 234, .6); }
.map-caption b { display: block; margin-top: 2px; font-size: 19px; color: #edf1ea; font-weight: 700; opacity: 0; transition: opacity .4s; }
.is-done .map-caption b { opacity: 1; }
.menu-map.is-fading .map-caption b { opacity: 0; }

/* Lado direito: páginas, descarregar e contactos */
.menu-side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px var(--pad) 40px; }
.menu-links { display: flex; flex-direction: column; align-items: center; }
.menu-links a { position: relative; display: block; overflow: hidden; padding: 0 .06em; font: 700 clamp(64px, 8.4vw, 132px)/.98 var(--display); letter-spacing: -0.035em; text-transform: uppercase; text-decoration: none; color: var(--bg); }
.menu-links a span { display: block; transform: translateY(105%); transition: transform .8s cubic-bezier(.2, .9, .2, 1), color .3s; }
.menu-open .menu-links a span { transform: none; transition-delay: calc(.32s + var(--i) * .08s); }
.menu-links a.is-current span { color: rgba(237, 241, 234, .45); }
.menu-squiggle { position: absolute; left: 0; top: 50%; width: 100%; height: .3em; transform: translateY(-50%); fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .6s cubic-bezier(.6, 0, .2, 1); pointer-events: none; }
.menu-open .menu-links a.is-current .menu-squiggle { stroke-dashoffset: 0; transition-delay: .9s; }
.menu-open .menu-links a:hover .menu-squiggle, .menu-open .menu-links a:focus-visible .menu-squiggle { stroke-dashoffset: 0; transition-delay: 0s; }
.menu-links a:focus-visible { outline: none; }
.menu-download, .menu-note, .menu-foot { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .7s cubic-bezier(.2, .9, .2, 1); }
.menu-open :is(.menu-download, .menu-note, .menu-foot) { opacity: 1; transform: none; transition-delay: calc(.4s + var(--i) * .08s); }
.menu-download { display: none; }
.menu-note { margin: 44px 0 0; font: 600 13px/1.5 var(--display); letter-spacing: .08em; text-transform: uppercase; color: rgba(237, 241, 234, .55); }
.menu-foot { position: absolute; left: 0; right: 0; bottom: 44px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.menu-foot a { font: 700 16px var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--bg); text-decoration: none; }
.menu-foot a:hover { color: var(--accent); }
.menu-social { display: flex; gap: 32px; }
.menu-open, .menu-open body { overflow: hidden; }

@media (max-width: 1100px) { .menu { grid-template-columns: .8fr 1fr; } }
/* Versão «meia página» (LAYOUT = 'meia' em js/menu.js): painel à direita e a página por trás escurecida; no telemóvel é sempre ecrã inteiro */
.menu-backdrop { display: none; }
@media (min-width: 901px) {
  .menu-half .menu { left: auto; width: max(50vw, 560px); grid-template-columns: 1fr; clip-path: inset(0 0 0 100%); transition: clip-path .7s cubic-bezier(.77, 0, .18, 1), visibility 0s .7s; }
  .menu-half.menu-open .menu { clip-path: inset(0); transition: clip-path .7s cubic-bezier(.77, 0, .18, 1), visibility 0s; }
  .menu-half :is(.menu-map, .menu-road) { display: none; }
  .menu-half .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 64; background: rgba(16, 36, 28, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; visibility: hidden; cursor: pointer; transition: opacity .5s, visibility 0s .5s; }
  .menu-half.menu-open .menu-backdrop { opacity: 1; visibility: visible; transition: opacity .5s, visibility 0s; }
  .menu-half.menu-open .nav-logo img { filter: none; }
  .menu-half.menu-open .nav.is-solid .nav-logo { background: rgba(255, 255, 255, .78) !important; box-shadow: 0 10px 40px -18px rgba(18, 61, 46, .35) !important; backdrop-filter: blur(18px) saturate(1.4) !important; -webkit-backdrop-filter: blur(18px) saturate(1.4) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .menu, .menu-open .menu { transition: visibility 0s; clip-path: none; }
  .lane-car, .lane-bob *, .lane-goods { animation: none !important; }
  .lane-car { transform: translateX(20%); }
}

/* Telemóvel: barra com o logótipo e um hambúrguer simples; o menu sem o mosaico */
@media (max-width: 900px) {
  .nav { top: 0; padding: 0; }
  .nav-bar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0 18px; transition: background .4s, box-shadow .4s; }
  .nav.is-solid .nav-bar { background: rgba(255, 255, 255, .8); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 rgba(18, 61, 46, .08); }
  .menu-open .nav-bar { background: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .nav-logo { padding: 0; margin-left: 0; }
  .nav.is-solid .nav-logo { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-logo img { height: 28px; }
  .nav .nav-cta { display: none; }
  .nav-burger { width: 48px; height: 48px; background: none; box-shadow: none; border-radius: 12px; }
  .nav-burger:hover { transform: none; }
  .nav-burger span { left: 13px; right: 13px; height: 2px; }
  .nav-burger span:nth-child(1) { top: 19px; }
  .nav-burger span:nth-child(2) { top: 27px; }
  .menu-open .nav-burger span { top: 23px; background: var(--bg); }
  .menu { grid-template-columns: 1fr; }
  .menu-road, .menu-map { display: none; }
  .menu-side { align-items: flex-start; text-align: left; justify-content: flex-start; padding: calc(120px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); }
  .menu-links { align-items: flex-start; }
  .menu-links a { font-size: clamp(56px, 17vw, 84px); }
  .menu-download { display: inline-flex; align-items: center; gap: 12px; margin-top: 36px; height: 54px; padding: 0 22px; border-radius: 16px; background: var(--accent); color: #fff; font: 600 17px var(--display); text-decoration: none; }
  .menu-download i { font-style: normal; }
  .menu-note { margin-top: 28px; }
  .menu-foot { left: 24px; right: 24px; bottom: calc(32px + env(safe-area-inset-bottom)); align-items: flex-start; gap: 14px; }
  .menu-foot a { font-size: 15px; }
}

.wordmark { display: inline-block; height: 0.82em; width: auto; vertical-align: -0.06em; margin-right: 0.08em; }

/* Botão flutuante «Descarregar» (só telemóvel) */
.dock { display: none; }
@media (max-width: 900px) {
  .dock {
    position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 55; display: inline-flex; align-items: center; gap: 10px;
    height: 54px; padding: 0 8px 0 22px; border-radius: 18px; background: var(--ink); color: #fff; text-decoration: none;
    font: 600 16px var(--display); box-shadow: 0 16px 34px -14px rgba(18, 61, 46, .7);
    transform: translate(-50%, 140%); transition: transform .5s cubic-bezier(.3, 1.3, .5, 1);
  }
  .dock.is-on { transform: translate(-50%, 0); }
  .dock { transition: transform .5s cubic-bezier(.3, 1.3, .5, 1), background .3s, color .3s; }
  .dock.is-light { background: #fff; color: var(--ink); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .5); }
  .dock i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); font-style: normal; }
}

/* ---------- Cenas presas (sticky): a altura da secção é o tempo da animação ---------- */
.scene { position: relative; height: var(--len, 300vh); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.eyebrow { margin: 0 0 14px; font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-green); }
.big { font-size: clamp(44px, 7.4vw, 120px); }
.huge { font-size: clamp(44px, 12.5vw, 220px); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--text-2); max-width: 30em; margin: 22px 0 0; }

/* ---------- Carrinho (desenho da marca) ---------- */
.cart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cart-svg .frame { fill: none; stroke: var(--cart, var(--brand-green)); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.cart-svg .wheel { transform-box: fill-box; transform-origin: center; }
.cart-svg .wheel circle { fill: var(--cart, var(--brand-green)); }
.cart-svg .wheel rect { fill: rgba(255, 255, 255, .85); }
.cart-svg .heart { fill: var(--accent); transform-box: fill-box; transform-origin: center; }

/* ---------- Entrada ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); }
.loader-mark { width: min(28vw, 150px); position: relative; z-index: 2; }
.loader-mark .frame { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 0.9s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
.loader-mark .wheel { transform: scale(0); animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.loader-mark .wheel:nth-of-type(1) { animation-delay: .85s; }
.loader-mark .wheel:nth-of-type(2) { animation-delay: .95s; }
.loader-mark .heart { opacity: 0; transform: translateY(-60%) scale(.4); animation: drop .6s cubic-bezier(.3, 1.5, .5, 1) 1.1s forwards; }
.loader-curtain { position: absolute; inset: 0; transform: translateY(100%); }
.loader-curtain--accent { background: var(--accent); z-index: 3; }
.loader-curtain--green { background: var(--brand-green); z-index: 4; }
.loader.is-out .loader-curtain--accent { animation: curtain 1.1s cubic-bezier(.75, 0, .2, 1) forwards; }
.loader.is-out .loader-curtain--green { animation: curtain 1.1s cubic-bezier(.75, 0, .2, 1) .12s forwards; }
.loader.is-gone { display: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes drop { to { opacity: 1; transform: none; } }
@keyframes curtain { 0% { transform: translateY(100%); } 45%, 55% { transform: translateY(0); } 100% { transform: translateY(-100%); } }

/* ---------- Cursor (só com rato) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: none; }
.cursor span { display: block; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.cursor.is-big span { transform: scale(3.2); opacity: .9; }
@media (pointer: fine) and (min-width: 901px) { .cursor { display: block; } }

/* ---------- 1. Abertura ---------- */
.hero .stage { display: flex; flex-direction: column; justify-content: flex-start; padding: max(96px, 13vh) var(--pad) 0; }
.hero-title { font-size: clamp(48px, min(11vw, 14.5vh), 200px); line-height: .9; position: relative; z-index: 2; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line--accent { color: var(--accent); }
.hero-title .word { display: inline-block; transform: translateY(110%); }
body.is-ready .hero-title .word { transform: none; transition: transform 1s cubic-bezier(.2, .9, .2, 1); }
body.is-ready .hero-title .line:nth-child(2) .word { transition-delay: .08s; }
body.is-ready .hero-title .line:nth-child(3) .word { transition-delay: .16s; }
.hero-sub { position: relative; z-index: 2; max-width: 26em; margin: 28px 0 24px; font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); }
.hero-sub strong { color: var(--text); }
.hero-stores { position: relative; z-index: 2; margin-bottom: 28px; }
.hero-floaters img { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * clamp(60px, 7vw, 116px)); height: calc(var(--s) * clamp(60px, 7vw, 116px)); object-fit: contain; will-change: transform; filter: drop-shadow(0 18px 18px rgba(18, 61, 46, .18)); }
/* A estrada do carrinho vem a seguir aos botões (nunca por cima deles) e encosta ao fundo quando há espaço */
.hero-road { position: relative; flex: none; margin: auto calc(var(--pad) * -1) 3vh; min-height: 0; height: clamp(76px, min(11vw, 15vh), 170px); border-bottom: 3px dashed rgba(18, 61, 46, .18); z-index: 1; }
.hero-cart { position: absolute; bottom: 6px; left: 0; width: clamp(90px, min(12.5vw, 17vh), 200px); will-change: transform; }
.scroll-hint { position: absolute; right: var(--pad); bottom: 4vh; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 600 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); z-index: 2; }
.scroll-hint i { width: 2px; height: 46px; background: linear-gradient(var(--text-2) 50%, transparent 50%) 0 0 / 2px 12px; animation: hint 1s linear infinite; }
@keyframes hint { to { background-position: 0 12px; } }
@media (max-width: 760px) { .scroll-hint { display: none; } .hero .stage { justify-content: flex-start; padding-top: 110px; } }

/* ---------- 2. A lista ---------- */
.list-scene { background: var(--bg); }
.list-scene .stage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4vw; padding: 100px var(--pad) 70px; }
.list-copy { position: relative; z-index: 3; }
.list-scene .big { font-size: clamp(44px, min(7.4vw, 12vh), 120px); }
.list-counter { margin: 30px 0 0; font: 600 clamp(56px, min(9vw, 13vh), 150px)/0.9 var(--display); letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.list-counter small { font-size: .28em; letter-spacing: -0.01em; color: var(--text-2); margin-left: .2em; }
.phone {
  /* Alto como um iPhone: quase a altura do ecrã (no telemóvel há regras próprias mais abaixo) */
  position: relative; z-index: 2; height: min(860px, calc(100vh - 170px)); width: auto; aspect-ratio: 9 / 19; border-radius: 52px; padding: 12px;
  background: #0f1512; box-shadow: 0 40px 80px -30px rgba(18, 61, 46, .55), inset 0 0 0 2px #2a332e;
}
.phone-notch { position: absolute; top: 22px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #0f1512; z-index: 2; }
.phone-screen { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 41px; background: var(--bg); overflow: hidden; padding: 62px 16px 16px; }
.phone-top img { height: 20px; margin: 0 auto; }
.phone-title { margin: 16px 4px 12px; font: 600 26px/1 var(--display); letter-spacing: -0.02em; }
.phone-scroll { position: relative; flex: 1; min-height: 0; overflow: hidden; margin: 0 -6px; padding: 0 6px; }
.phone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; will-change: transform; }
.phone-list li {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 15px; background: var(--surface);
  font-size: 15px; font-weight: 600; opacity: 0; transform: translateX(-14px) scale(.96);
  transition: opacity .35s, transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.phone-list li.is-in { opacity: 1; transform: none; }
.phone-list li img { width: 30px; height: 30px; object-fit: contain; }
.phone-list li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-list li em { font-style: normal; color: var(--text-2); font-weight: 500; font-size: 12px; }
.list-cloud { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.flyer img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.flyer { position: absolute; left: 0; top: 0; width: clamp(72px, 7.5vw, 118px); will-change: transform, opacity; filter: drop-shadow(0 16px 14px rgba(18, 61, 46, .2)); }
.flyer-label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 4px; font: 600 14px var(--display); white-space: nowrap; color: var(--ink); }
@media (max-width: 900px) {
  .list-scene .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; justify-items: center; gap: 18px; padding-top: 80px; }
  .list-copy { text-align: center; }
  .list-copy .lead { display: none; }
  .list-counter { margin-top: 12px; font-size: 52px; }
  .list-scene .big { font-size: 40px; }
  .phone { height: 58vh; width: min(300px, 70vw); }
  .flyer { width: 60px; }
}

/* ---------- 3. A corrida ---------- */
.race-scene { background: var(--ink); color: #fff; }
.race-scene .eyebrow { color: var(--mustard); }
.race-scene .lane { color: var(--text); }
.race-scene .big { font-size: clamp(44px, min(6.6vw, 10vh), 112px); }
.race-scene .stage { display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 2.6vh, 32px); padding: 90px var(--pad) 40px; }
.race { display: grid; gap: clamp(10px, 2vh, 18px); }
.lane {
  position: relative; display: grid; grid-template-columns: clamp(110px, 14vw, 200px) 1fr clamp(96px, 10vw, 150px); align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 22px; background: var(--bg); transition: background .5s, opacity .5s, transform .6s cubic-bezier(.3, 1.4, .5, 1);
}
.lane-name { justify-self: start; font-size: clamp(20px, 2.2vw, 32px); line-height: 1.1; }
.lane-track { position: relative; height: clamp(52px, 8vh, 78px); }
.lane-track::before { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; border-bottom: 2px dashed rgba(18, 61, 46, .2); }
.lane-stop { position: absolute; bottom: 10px; width: clamp(30px, 3.4vw, 50px); height: clamp(30px, 3.4vw, 50px); object-fit: contain; transform: translateX(-50%); opacity: .9; transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.lane-stop.is-hit { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.4); }
.lane-cart { position: absolute; left: 0; bottom: 4px; width: clamp(56px, 6.5vw, 96px); --cart: var(--brand-green); will-change: transform; }
.lane-total { text-align: right; font: 600 clamp(24px, 3vw, 46px)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lane-tag {
  position: absolute; right: clamp(110px, 11vw, 170px); top: -14px; padding: 6px 14px; border-radius: 10px; background: var(--accent); color: #fff;
  font: 700 15px var(--display); transform: rotate(-6deg) scale(0); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1);
}
.race.is-done .lane { opacity: .55; }
.race.is-done .lane.is-win { opacity: 1; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 20px 40px -20px rgba(224, 73, 43, .45); transform: scale(1.02); }
.race.is-done .lane.is-win .lane-tag { transform: rotate(-6deg) scale(1); }
.race-result { padding: 16px 22px; border-radius: 22px; background: var(--bg); color: var(--text); opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .6s cubic-bezier(.2, .9, .2, 1); }
.race-result.is-in { opacity: 1; transform: none; }
.race-verdict { margin: 0; max-width: none !important; font: 600 clamp(20px, min(2.2vw, 3.6vh), 36px)/1.15 var(--display); letter-spacing: -0.02em; max-width: 28em; }
.race-note a { color: var(--brand-green); font-weight: 600; }
.race-note { margin: 8px 0 0; font-size: 13px; color: var(--text-2); max-width: 46em; }
@media (max-width: 760px) {
  .lane { grid-template-columns: 1fr auto; grid-template-areas: 'name total' 'track track'; padding: 10px 14px; row-gap: 6px; }
  .lane-name { grid-area: name; } .lane-total { grid-area: total; } .lane-track { grid-area: track; }
  .lane-tag { right: 90px; top: -10px; font-size: 13px; }
  .race-scene .stage { justify-content: center; gap: 18px; padding-top: 76px; }
  .race-scene .big { font-size: clamp(28px, 8.4vw, 36px); }
  .race-scene .eyebrow { margin-bottom: 8px; }
  .race { gap: 10px; }
  .lane { padding: 12px 14px 8px; border-radius: 22px; row-gap: 4px; }
  .lane-name { font-size: 22px; }
  .lane-total { font-size: 28px; }
  .lane-track { height: 58px; }
  .lane-cart { width: 64px; }
  .lane-stop { width: 30px; height: 30px; bottom: 9px; }
  .lane-tag { font-size: 14px; top: -12px; }
  .race-verdict { font-size: 20px; }
  .race-verdict { font-size: 19px; }
  .race-note { font-size: 12px; }
}

/* ---------- Nomes das lojas (letras parecidas com as de cada uma, nunca os logótipos) ---------- */
.chain--continente { font-family: 'Chain Continente', var(--display); color: var(--chain-continente); font-weight: 900; text-transform: lowercase; letter-spacing: -0.01em; }
.chain--pingo-doce { font-family: 'Chain Pingo Doce', var(--display); color: var(--chain-pingo-doce); font-weight: 400; font-size: 1.25em; text-transform: lowercase; line-height: 1; }
.chain--lidl { font-family: 'Chain Lidl', var(--display); color: #0050aa; font-weight: 800; text-transform: uppercase; }
.chain--aldi { font-family: 'Chain Aldi', var(--display); color: #1c2f6e; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.chain--auchan { font-family: 'Chain Auchan', var(--display); color: var(--chain-auchan); font-weight: 800; }

/* ---------- 4. Fila horizontal ---------- */
.features { background: var(--bg); }
.features .stage { display: flex; flex-direction: column; justify-content: center; padding: 80px 0 40px; }
.features-eyebrow { padding: 0 var(--pad); }
.features-track { display: flex; gap: clamp(16px, 2vw, 28px); padding: 0 var(--pad); width: max-content; will-change: transform; }
.card {
  position: relative; width: clamp(290px, 34vw, 500px); height: clamp(420px, 66vh, 600px); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 38px);
  display: flex; flex-direction: column; overflow: hidden;
}
.card h3 { font-size: clamp(32px, 3.2vw, 52px); }
.card p { margin: 14px 0 0; max-width: 24em; }
.card-foot { margin-top: auto !important; font-size: 12px; opacity: .6; }
.card--ink { background: var(--ink); color: #fff; }
.card--white { background: var(--surface); }
.card--accent { background: var(--accent); color: #fff; }
.card--mustard { background: var(--mustard); color: var(--text); }
.card--green { background: var(--brand-green); color: #fff; }
.card--ink p, .card--accent p, .card--green p { color: rgba(255, 255, 255, .82); }
.swap { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; padding-bottom: 6px; }
.swap-item { display: grid; gap: 4px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .08); font-size: 13px; line-height: 1.3; min-height: 180px; align-content: end; }
.swap-item img { width: 70px; height: 100px; object-fit: contain; margin-bottom: 6px; }
.swap-item b { font: 600 30px/1 var(--display); letter-spacing: -0.03em; }
.swap-item--win { background: #fff; color: var(--text); transform: rotate(3deg); }
.swap-item--win b { color: var(--green); }
.swap-item--win .swap-label { display: inline-block; justify-self: start; margin-bottom: 6px; padding: 4px 10px; border-radius: 8px; background: var(--accent); color: #fff; font: 700 13px var(--display); transform: rotate(-4deg); }
.swap-arrow { font: 600 30px var(--display); align-self: center; }
.swap-note { grid-column: 1 / -1; margin: 10px 0 0 !important; font-size: 12px; opacity: .65; }
.pack { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-bottom: 12px; }
.pack b { display: block; font: 600 clamp(28px, 2.6vw, 40px)/1 var(--display); letter-spacing: -0.03em; }
.pack span { font-size: 13px; color: var(--text-2); }
.pack-from, .pack-to { padding: 18px; border-radius: 20px; background: var(--bg); }
.pack-to { background: var(--green); color: #fff; transform: rotate(-3deg); }
.pack-to span { color: rgba(255, 255, 255, .85); font-weight: 600; }
.pack-arrow { font: 600 30px var(--display); }
.stamp {
  margin: auto auto 18px; display: grid; place-items: center; width: 190px; height: 190px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 54px/1 var(--display); letter-spacing: -0.04em; transform: rotate(-12deg); box-shadow: 0 0 0 8px var(--mustard), 0 0 0 10px var(--accent);
}
.stamp small { display: block; font-size: 18px; letter-spacing: 0; margin-top: -40px; }
.avatars { margin-top: auto; display: flex; padding-bottom: 8px; }
.avatars span, .avatars em {
  width: 84px; height: 84px; margin-right: -16px; border-radius: 50%; display: grid; place-items: center; border: 4px solid var(--brand-green);
  font: 600 34px var(--display); font-style: normal;
}
.avatars span:nth-child(1) { background: var(--mustard); color: var(--text); }
.avatars span:nth-child(2) { background: var(--accent); }
.avatars span:nth-child(3) { background: #fff; color: var(--ink); }
.avatars em { background: var(--ink); }
.distances { margin-top: auto; display: grid; padding-bottom: 14px; }
.distances p { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 24px; }
.distances p:last-child { border-bottom: 0; }
.distances b { font: 600 22px var(--display); }
.features-progress { margin: 28px var(--pad) 0; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.features-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- 5. Desfile ---------- */
.parade { padding: 14vh 0; overflow: hidden; background: var(--bg); }
.parade-text { display: flex; width: max-content; font: 600 clamp(64px, 11vw, 190px)/1 var(--display); letter-spacing: -0.05em; white-space: nowrap; color: var(--ink); will-change: transform; }
.parade-text span { padding-right: .3em; }
.parade-text--outline { color: transparent; -webkit-text-stroke: 2px var(--brand-green); }
.parade-road { position: relative; height: clamp(80px, 10vw, 140px); margin: 2vh 0; border-bottom: 3px dashed rgba(18, 61, 46, .2); }
.parade-cart { position: absolute; left: 0; bottom: 4px; will-change: transform; }

/* ---------- 6. Descarregar ---------- */
.cta { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12vh var(--pad); background: var(--bg); }
.cta-icon { width: clamp(120px, 14vw, 190px); height: auto; border-radius: 22.5%; box-shadow: 0 40px 60px -26px rgba(18, 61, 46, .6); margin-bottom: 40px; will-change: transform; transition: transform .2s ease-out; }
.cta .lead { margin: 22px auto 30px; }
.cta .store-buttons { justify-content: center; }

.footer { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 22px var(--pad); background: var(--bg-deep); font-size: 14px; color: var(--text-2); }
.footer img { height: 20px; width: auto; }
.footer-links { display: flex; gap: 22px; margin-left: auto; }
.footer-links a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; text-decoration: none; color: var(--text); }
.footer-links a:hover { color: var(--accent); }
.footer-ig svg, .footer-mail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.footer-ig svg .dot { fill: currentColor; stroke: none; }
@media (max-width: 760px) { .footer { gap: 12px; } .footer-links { margin-left: 0; width: 100%; order: 3; flex-wrap: wrap; gap: 12px 20px; } .footer-copy { margin-left: auto; } }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .hero-title .word { transform: none; }
  .scroll-hint i { animation: none; }
}

/* ---------- Telemóvel (prints da app) ---------- */
.device {
  position: relative; aspect-ratio: 390 / 844; border-radius: 13% / 6%; padding: 3.2%;
  background: linear-gradient(145deg, #2b3530, #0b100d 40%, #1b221e); transform-style: preserve-3d;
  box-shadow: inset 0 0 0 1.5px #3b4741, 0 50px 80px -30px rgba(18, 61, 46, .55), 0 18px 30px -18px rgba(0, 0, 0, .4);
}
.device::before { content: ''; position: absolute; top: 4.2%; left: 50%; width: 29%; height: 3.6%; margin-left: -14.5%; border-radius: 999px; background: #000; z-index: 3; }
.device-screen { position: relative; width: 100%; height: 100%; border-radius: 10.5% / 4.9%; overflow: hidden; background: var(--bg); }
/* Os prints do browser não têm a barra de estado: espaço para a ilha. Com prints do iPhone, pôr --status: 0px */
.device { --status: 0px; }
.device-screen img { position: absolute; left: 0; right: 0; bottom: 0; top: var(--status); width: 100%; height: calc(100% - var(--status)); object-fit: cover; object-position: top; will-change: transform; }
.device-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .16) 48%, transparent 60%); background-size: 260% 100%; background-position: var(--glare, 50%) 0; }

.hero-device { position: absolute; right: 8vw; top: 50%; z-index: 1; width: min(24vw, 38vh); perspective: 1600px; transform: translateY(-46%); }
.hero-device .device { transform: rotateY(-18deg) rotateX(8deg) rotateZ(4deg); will-change: transform; }
.hero-floaters img { z-index: 0; }
@media (max-width: 900px) { .hero-device { display: none; } }

/* ---------- 3b. A app ---------- */
.app-scene { background: linear-gradient(var(--bg), var(--bg-deep)); }
.app-scene .stage { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6vw; padding: 70px calc(var(--pad) + 4vw) 30px; perspective: 1800px; }
.app-captions { position: relative; height: 60vh; }
.app-caption { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: transform, opacity; }
.app-caption h2 { font-size: clamp(44px, 6.4vw, 108px); }
.app-caption > p:last-child { font-size: clamp(17px, 1.4vw, 21px); color: var(--text-2); max-width: 24em; margin: 20px 0 0; }
.app-device-wrap { position: relative; perspective: 1800px; }
.device--big { width: min(30vw, 40vh); will-change: transform; }
.device--big .device-screen img:not(:first-child) { transform: translateY(100%); }
.app-chips .chip { position: absolute; padding: 10px 16px; border-radius: 14px; background: #fff; color: var(--text); font: 600 18px var(--display); white-space: nowrap; box-shadow: 0 18px 30px -16px rgba(18, 61, 46, .45); opacity: 0; transform: scale(.4); will-change: transform, opacity; }
.chip--accent { background: var(--accent) !important; color: #fff !important; }
.chip--green { background: var(--green) !important; color: #fff !important; }
.chip--mustard { background: var(--mustard) !important; }
.app-chips .chip:nth-child(1) { right: -14%; top: 14%; }
.app-chips .chip:nth-child(2) { left: -22%; top: 36%; }
.app-chips .chip:nth-child(3) { left: -18%; top: 24%; }
.app-chips .chip:nth-child(4) { right: -16%; top: 30%; }
.app-chips .chip:nth-child(5) { right: -12%; top: 56%; }
.app-chips .chip:nth-child(6) { left: -20%; top: 50%; }
.app-dots { position: absolute; left: 50%; bottom: 22px; display: flex; gap: 8px; transform: translateX(-50%); }
.app-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(18, 61, 46, .2); transition: width .35s, background .35s; }
.app-dots i.is-on { width: 26px; background: var(--accent); }
@media (max-width: 900px) {
  .app-scene .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; justify-items: center; gap: 10px; padding: 70px var(--pad) 50px; }
  .app-captions { height: 28vh; width: 100%; text-align: center; }
  .app-caption { justify-content: flex-start; align-items: center; }
  .app-caption h2 { font-size: 38px; }
  .app-caption > p:last-child { font-size: 15px; margin-top: 10px; }
  .device--big { width: min(56vw, 30vh); }
  .app-chips .chip { font-size: 14px; padding: 7px 11px; }
}

/* ---------- Descarregar: leque de telemóveis ---------- */
.cta { position: relative; overflow: hidden; }
.cta-fan { position: absolute; left: 50%; top: 14vh; width: 0; height: 0; z-index: 0; pointer-events: none; }
.device--fan {
  /* O contentor do leque tem largura 0: medidas absolutas (as percentagens do .device seriam 0) */
  --w: min(15vw, 26vh); position: absolute; top: 0; width: var(--w); height: calc(var(--w) * 844 / 390);
  padding: calc(var(--w) * .032); opacity: .95; will-change: transform;
}
.device--fan::before { width: calc(var(--w) * .29); height: calc(var(--w) * .078); top: calc(var(--w) * .07); margin-left: calc(var(--w) * -.145); }
.device--fan .device-screen { border-radius: calc(var(--w) * .105); }
.device--left, .device--right { left: 0; top: 0; margin-left: calc(min(15vw, 26vh) / -2); }
@media (max-width: 760px) { .cta-fan { display: none; } }
.cta > *:not(.cta-fan) { position: relative; z-index: 1; }
.cta-icon { z-index: 2 !important; }
@media (max-width: 760px) { .device--fan { width: 34vw; } }

/* ---------- 3c. Receitas (baralho) ---------- */
.recipes-scene { background: var(--bg); }
.recipes-scene .stage { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw; padding: 80px calc(var(--pad) + 2vw) 30px; }
.recipes-count { margin: 28px 0 0; font: 600 clamp(56px, 7vw, 110px)/.9 var(--display); letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.recipes-count small { font-size: .3em; color: var(--text-2); letter-spacing: 0; margin-left: .15em; }
.deck { position: relative; justify-self: center; width: min(420px, 34vw); aspect-ratio: 4 / 5.4; }
.recipe-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 30px; overflow: hidden; background: #fff; color: var(--text); text-decoration: none;
  box-shadow: 0 30px 60px -30px rgba(18, 61, 46, .55), 0 0 0 1px rgba(18, 61, 46, .06); will-change: transform, opacity; transform-origin: 50% 110%;
}
.recipe-photo { position: relative; flex: 1 1 55%; min-height: 0; background: var(--bg-deep); }
.recipe-photo img { width: 100%; height: 100%; object-fit: cover; }
.recipe-time { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .92); font: 600 14px var(--display); }
.recipe-body { padding: 18px 20px 20px; display: grid; gap: 10px; }
.recipe-body h3 { font-size: clamp(26px, 2.3vw, 34px); }
.recipe-have { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.recipe-have img { width: 34px; height: 34px; object-fit: contain; }
.recipe-missing { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.recipe-missing b { font: 600 18px var(--display); color: var(--accent); white-space: nowrap; }
.recipe-credit { font-size: 11px; color: var(--text-2); }
@media (max-width: 900px) {
  .recipes-scene .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; justify-items: center; gap: 14px; padding-top: 76px; }
  .recipes-copy { text-align: center; }
  .recipes-copy .lead { display: none; }
  .recipes-scene .big { font-size: 36px; }
  .recipes-count { font-size: 40px; margin-top: 10px; }
  .deck { width: min(330px, 78vw, 46vh); }
}

/* ===================== Telemóvel: afinação final (o site é visto sobretudo aqui) ===================== */
.dock { white-space: nowrap; }
@media (max-width: 900px) {
  :root { --dock-space: calc(86px + env(safe-area-inset-bottom)); }
  .stage { padding-bottom: var(--dock-space) !important; }

  /* Abertura: título limpo, produtos só nas margens, telemóvel 3D em baixo à direita */
  .hero .stage { padding-top: calc(84px + env(safe-area-inset-top)); }
  .hero-title { font-size: clamp(44px, 12.4vw, 64px); }
  .hero-sub { margin: 20px 0 22px; font-size: 16px; max-width: 22em; }
  .hero-stores .badge { height: 48px; }
  .hero-floaters img { width: calc(var(--s) * 54px); height: calc(var(--s) * 54px); opacity: .95; }
  .hero-floaters img:nth-child(1) { left: 80%; top: 12%; }
  .hero-floaters img:nth-child(2) { left: 88%; top: 30%; }
  .hero-floaters img:nth-child(3), .hero-floaters img:nth-child(4), .hero-floaters img:nth-child(6) { display: none; }
  .hero-floaters img:nth-child(5) { left: 4%; top: 64%; }
  .hero-device { display: block; right: -8vw; left: auto; top: auto; bottom: -16vh; width: 50vw; transform: none; }
  .hero-road { margin-bottom: 2vh; height: 70px; border-bottom-width: 2px; }
  .hero-cart { width: 88px; }

  /* A lista */
  /* Título numa linha com o contador; o telemóvel fica com o resto do ecrã */
  .list-scene .stage { padding-top: calc(64px + env(safe-area-inset-top)); gap: 12px; grid-template-rows: auto minmax(0, 1fr); }
  .list-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; width: 100%; text-align: left; }
  .list-copy .eyebrow { display: none; }
  .list-scene .big { font-size: 30px; }
  .list-scene .big br { display: none; }
  .list-counter { margin: 0; font-size: 44px; white-space: nowrap; }
  .list-counter small { font-size: 13px; }
  .phone { align-self: stretch; height: auto; max-height: 640px; width: auto; aspect-ratio: 9 / 18.5; max-width: 86vw; border-radius: 44px; padding: 10px; }
  .phone-notch { top: 18px; }
  .phone-screen { border-radius: 35px; padding: 50px 14px 14px; }
  .phone-top img { height: 18px; }
  .phone-title { font-size: 26px; margin: 16px 4px 12px; }
  .phone-list { gap: 7px; }
  .phone-list li { padding: 8px 10px; font-size: 15px; }
  .phone-list li img { width: 30px; height: 30px; }
  .flyer { width: 50px; }
  .flyer-label { display: none; }

  /* Corrida */
  .race-scene .stage { padding-top: calc(66px + env(safe-area-inset-top)); }

  /* A app */
  .app-scene .stage { padding-top: calc(66px + env(safe-area-inset-top)); }
  .app-captions { height: 22vh; }
  .device--big { width: min(48vw, 26vh); }
  .app-chips .chip { font-size: 13px; }
  .app-chips .chip:nth-child(1), .app-chips .chip:nth-child(4), .app-chips .chip:nth-child(5) { right: -30%; }
  .app-chips .chip:nth-child(2), .app-chips .chip:nth-child(3), .app-chips .chip:nth-child(6) { left: -30%; }
  .app-dots { bottom: calc(var(--dock-space) + 6px); }

  /* Receitas */
  .recipes-scene .stage { padding-top: calc(66px + env(safe-area-inset-top)); }
  .deck { width: min(320px, 76vw, 40vh); }
  .recipe-body { padding: 14px 16px 16px; gap: 8px; }
  .recipe-body h3 { font-size: 24px; }

  /* Fila horizontal */
  .features .stage { padding-top: calc(70px + env(safe-area-inset-top)); }
  .card { width: 80vw; height: min(62vh, 520px); padding: 22px; }
  .card h3 { font-size: 30px; }
  .card p { font-size: 15px; }
  .swap { gap: 8px; }
  .swap-item { min-height: 0; padding: 12px; font-size: 12px; }
  .swap-item img { width: 46px; height: 64px; }
  .swap-item b { font-size: 24px; }
  .pack { gap: 8px; }
  .pack-from, .pack-to { padding: 14px 12px; }
  .pack b { font-size: 22px; white-space: nowrap; }
  .stamp { width: 150px; height: 150px; font-size: 42px; }
  .avatars span, .avatars em { width: 64px; height: 64px; font-size: 26px; }
  .distances p { font-size: 20px; padding: 10px 2px; }
  .features-progress { margin-top: 18px; }

  /* Desfile e fim */
  .parade { padding: 8vh 0; }
  .cta { padding-bottom: calc(10vh + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) and (max-height: 760px) {
  .race-scene .big { font-size: 28px; }
  .race-scene .stage { gap: 10px; }
  .race { gap: 6px; }
  .lane { padding: 6px 12px; row-gap: 2px; }
  .lane-name { font-size: 18px; }
  .lane-total { font-size: 21px; }
  .lane-track { height: 36px; }
  .lane-cart { width: 42px; }
  .lane-stop { width: 20px; height: 20px; bottom: 6px; }
  .race-result { padding: 12px 14px; }
  .race-verdict { font-size: 16px; }
  .race-note { font-size: 11px; }
  .app-captions { height: 13vh; }
  .app-caption > p:last-child { display: none; }
  .deck { width: min(300px, 74vw, 37vh); }
}
@media (max-width: 900px) and (max-height: 700px) {
  .hero-title { font-size: 42px; }
  .hero-device { width: 40vw; bottom: -22vh; }
  .card { height: 66vh; }
  .phone-list li { padding: 6px 9px; font-size: 13.5px; }
  .phone-list li img { width: 26px; height: 26px; }
  .phone-list { gap: 5px; }
}

