/* ============================================================
   HOMEPAGE: secções que só a página inicial usa.
   O sistema partilhado com as páginas de marketing está em landing.css.
   Ritmo: --sec entre secções, --head-gap entre título e conteúdo, tudo alinhado ao topo.
   ============================================================ */

.landing-page {
  --casa-black: #000;
  --casa-wall: #FAF9F7;
  --casa-floor: #EFEDE8;
  --casa-aro: clamp(10px, 1.1vw, 16px);
  /* O hall de entrada: parede cinza-escura, soalho de carvalho, a luz é sempre quente. */
  --casa-jamb: clamp(9px, 1vw, 15px);
  /* Geometria das cenas em svh: a barra do Safari não as desloca. Browsers antigos ficam com vh. */
  --svh: 1vh;
  --bar-gap: 0px;
  --door-h: min(calc(var(--svh) * 72), 660px);
  --door-w: calc(var(--door-h) * 0.46);
  --door-x: 60%;
  --door-top: calc(var(--svh) * 88 - var(--door-h));
}
@supports (height: 1svh) {
  .landing-page { --svh: 1svh; --bar-gap: calc(100lvh - 100svh); }
}

/* ============================================================
   HERO: o que é a Doors, à esquerda; uma só obra, à direita. Calmo: o momento grande vem a seguir.
   ============================================================ */
.hero-section {
  position: relative; overflow: hidden; background: #FF5520; color: var(--color-text-dark);
  height: calc(var(--svh) * 100); min-height: 620px;
  padding-top: calc(96px + var(--sa-top)); padding-bottom: clamp(24px, calc(var(--svh) * 4), 40px);
}
/* No topo a barra é transparente sobre o gradiente; o scroll torna-a branca (.l-nav.scrolled). */
.landing-page .l-nav:not(.scrolled) .btn-land-primary { background: var(--color-text-dark); }
.landing-page .l-nav:not(.scrolled) .btn-land-primary:hover { background: #000; box-shadow: none; }
.landing-page .l-nav:not(.scrolled) .l-nav-link:hover, .landing-page .l-nav:not(.scrolled) .l-nav-login:hover { color: #fff; }
.landing-page .l-nav:not(.scrolled) .l-nav-link::after { background: #fff; }
.hero-bg-word { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.hero-bg-word span { font-family: var(--font-display); font-weight: 900; font-size: clamp(180px, 38vw, 640px); line-height: 1; letter-spacing: -0.05em; white-space: nowrap; color: rgba(28,25,23,0.07); }
/* #FF5520 com uma luz mais clara que segue o rato. */
.hero-gradient { z-index: 0; pointer-events: none; }
.hero-grid { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.hero-title {
  font-size: clamp(46px, min(6.1vw, calc(var(--svh) * 12)), 90px);
  line-height: 0.96; letter-spacing: -0.035em;
  margin-bottom: clamp(20px, calc(var(--svh) * 3), 32px);
}
.hero-lead { max-width: 30em; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; font-weight: 500; margin-bottom: clamp(20px, calc(var(--svh) * 3.4), 36px); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-cta-main { min-height: 60px; padding: 0 32px; font-size: 17px; }
.hero-explore {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 16px; font-weight: 700; color: var(--color-text-dark);
  text-decoration: underline !important; text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.hero-explore svg { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.hero-explore:hover svg { transform: translateX(4px); }
.hero-foot { margin-top: clamp(20px, calc(var(--svh) * 3.4), 36px); display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.hero-foot a { font-weight: 700; color: var(--color-text-dark); text-decoration: underline !important; text-underline-offset: 4px; }

.hero-photo { position: relative; display: block; min-height: 0; overflow: hidden; border-radius: 8px; background: #EDE7E1; isolation: isolate; }
.hero-photo img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; display: block; }
.hero-photo-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 72px 20px 18px; font-size: 15px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(16,14,13,0.8), transparent); }
.hero-photo-cap span { display: block; font-weight: 400; color: rgba(255,255,255,0.84); }
.hero-section.is-active .hero-photo img { will-change: transform; }
/* À chegada a fotografia destapa-se de baixo para cima e assenta. */
@keyframes hero-photo-in { from { clip-path: inset(14% 0 0 0 round 8px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 8px); opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: hero-photo-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 120ms both; }
}

@media (max-width: 900px) {
  .hero-section { height: auto; min-height: 0; padding-top: calc(96px + var(--sa-top)); padding-bottom: var(--gut); }
  .hero-grid { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 32px; }
  .hero-title { font-size: clamp(46px, 12.6vw, 104px); }
  .hero-lead { font-size: 17px; }
    .hero-photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .hero-section { padding-top: calc(88px + var(--sa-top)); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-cta-main { justify-content: center; width: 100%; }
  .hero-ctas .app-store-badge { align-self: center; }
  .hero-explore { align-self: center; }
  .hero-foot { flex-direction: column; font-size: 14.5px; }
}

/* ============================================================
   A CASA: porta na parede, maquete lá dentro.
   ============================================================ */
.casa { position: relative; height: 380vh; background: var(--casa-black); }
.casa-sticky { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: var(--casa-black); color: #fff; }

.casa-view { position: absolute; inset: 0; transform-origin: calc(var(--door-x) + var(--door-w) / 2) 56%; }
.casa-canvas { display: block; width: 100%; height: 100%; }
/* Sempre ligado: ligá-lo com a câmara já perto fixava a pintura nessa escala e esgotava a memória. */
.casa-view, .casa-wall { will-change: transform; }
/* Só o canto do texto escurece: a maquete fica com a cor toda. */
.casa-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 62% at 0% 100%, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 46%, transparent 100%); }

.casa-wall { position: absolute; inset: 0; pointer-events: none; transform-origin: calc(var(--door-x) + var(--door-w) / 2) calc(var(--door-top) + var(--door-h) / 2); }
.casa-hall { position: absolute; inset: 0; width: 100%; height: 100%; }
.casa-spill { opacity: 0; will-change: opacity; }


/* Aro à volta do vão e a espessura da parede lá dentro: quatro planos, cada um na sua peça. */



.casa-door { position: absolute; z-index: 3; inset: 0; perspective: 1700px; perspective-origin: calc(var(--door-x) + var(--door-w) / 2) calc(var(--door-top) + var(--door-h) * 0.55); }
.casa-door-shadow { position: absolute; top: var(--door-top); height: var(--door-h); right: calc(100% - var(--door-x)); width: calc(var(--door-w) * 0.8); transform-origin: right center; opacity: 0; background: linear-gradient(to left, rgba(0,0,0,0.55), transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%); mask-image: linear-gradient(to bottom, transparent, #000 14%); }
.casa-leaf { position: absolute; left: var(--door-x); top: var(--door-top); width: var(--door-w); height: var(--door-h); --d3-t: calc(var(--door-w) * 0.085); }
/* A porta é ampliada com o hall: cada peça fica pintada à escala inicial, sem repintar a 12x. */
.casa-leaf, .casa-leaf .d3-face, .casa-leaf .d3-edge, .casa-door-shadow { will-change: transform; }

/* ============================================================
   A PORTA 3D: a caixa e os seus materiais. As duas cenas só mudam as cores.
   ============================================================ */
.d3 { --d3-t: 22px; --d3-front: var(--color-orange); --d3-front-deep: #C43A10; --d3-back: var(--d3-front); --d3-back-deep: var(--d3-front-deep); --d3-edge: #D9481A; transform-style: preserve-3d; }
.d3-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.d3-front { transform: translateZ(calc(var(--d3-t) / 2)); background: linear-gradient(100deg, var(--d3-front), var(--d3-front) 60%, var(--d3-front-deep) 130%); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14); }
.d3-back { transform: rotateY(180deg) translateZ(calc(var(--d3-t) / 2)); background: linear-gradient(100deg, var(--d3-back), var(--d3-back) 60%, var(--d3-back-deep) 130%); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
/* Almofada: moldura rebaixada e centro saliente, com luz de cima à esquerda. */
.d3-panel { position: absolute; left: 13%; right: 13%; box-shadow: inset 2px 2px 3px rgba(0,0,0,0.36), inset -1px -1px 1px rgba(255,255,255,0.24), 0 0 0 1px rgba(0,0,0,0.08); }
.d3-panel::before { content: ""; position: absolute; inset: clamp(6px, 9%, 16px); background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.08)); box-shadow: 1px 1px 2px rgba(0,0,0,0.3), inset 1px 1px 0 rgba(255,255,255,0.26); }
.d3-panel-top { top: 7%; height: 40%; }
.d3-panel-bottom { top: 56%; height: 37%; }
.d3-slot { position: absolute; left: 34%; right: 34%; top: 49.6%; height: 2.6%; border-radius: 2px; background: linear-gradient(to bottom, #E6C78F, #A9803F); box-shadow: 0 1px 2px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.18); }
.d3-slot::after { content: ""; position: absolute; left: 10%; right: 10%; top: 38%; height: 24%; background: rgba(40,28,14,0.8); }
.d3-hinge { position: absolute; right: 0; width: 5%; height: 6%; border-radius: 2px 0 0 2px; background: linear-gradient(to right, #E6C78F, #A9803F); box-shadow: -1px 1px 2px rgba(0,0,0,0.3); }
.d3-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: rgba(12,10,9,0.5); }
.d3-back .d3-shade { background: rgba(12,10,9,0.38); }
.d3-edge { position: absolute; background: var(--d3-edge); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.d3-edge-free { top: 0; bottom: 0; left: calc(100% - var(--d3-t) / 2); width: var(--d3-t); transform: rotateY(90deg); background: linear-gradient(to right, var(--d3-edge), #8C2E0F); }
.d3-edge-hinge { top: 0; bottom: 0; left: calc(var(--d3-t) / -2); width: var(--d3-t); transform: rotateY(-90deg); background: #8C2E0F; }
.d3-edge-top { left: 0; right: 0; top: calc(var(--d3-t) / -2); height: var(--d3-t); transform: rotateX(90deg); }
.d3-edge-bottom { left: 0; right: 0; bottom: calc(var(--d3-t) / -2); height: var(--d3-t); transform: rotateX(-90deg); background: #5F200A; }
.d3-latch { position: absolute; left: 22%; right: 22%; top: 50%; height: 6%; border-radius: 2px; background: linear-gradient(to bottom, #E6C78F, #A9803F); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); }
/* O puxador sai mesmo da porta: os dois lados, a alturas de Z diferentes. */
.d3-handle { position: absolute; right: 8%; top: 49%; width: 0; height: 0; transform-style: preserve-3d; }
.d3-handle-front { transform: translateZ(calc(var(--d3-t) / 2 + 1px)); }
.d3-handle-back { transform: rotateY(180deg) translateZ(calc(var(--d3-t) / 2 + 1px)); }
/* Os dois puxadores apontam para a dobradiça: atrás o eixo está espelhado. */
.d3-handle-back .d3-lever { transform: translateZ(14px); }
.d3-rosette { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F0D6A4, #A9803F 72%); box-shadow: 0 1px 3px rgba(0,0,0,0.45); }
.d3-neck { position: absolute; left: -7px; top: -3px; width: 14px; height: 6px; background: #8E6B33; transform: translateZ(7px) rotateY(90deg); }
.d3-lever { position: absolute; left: -7px; top: -4px; width: clamp(42px, calc(var(--door-w, 300px) * 0.2), 74px); height: 8px; border-radius: 4px; transform-origin: 3px 50%; background: linear-gradient(to bottom, #F0D6A4, #A9803F); box-shadow: 0 2px 2px rgba(0,0,0,0.3); transform: translateX(-100%) translateX(14px) translateZ(14px); }

.casa-wall-copy { position: absolute; z-index: 4; left: var(--edge); top: calc(var(--door-top) - var(--casa-aro)); width: min(44vw, 660px); color: #fff; }
.casa-title { font-size: clamp(38px, min(6.4vw, calc(var(--svh) * 12)), 104px); line-height: 0.96; letter-spacing: -0.035em; text-wrap: balance; }
.casa-lede { margin-top: clamp(14px, calc(var(--svh) * 2.4), 24px); max-width: 30ch; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.4; font-weight: 500; color: rgba(255,255,255,0.82); }

.casa-stagecopy { position: absolute; left: var(--edge); bottom: calc(var(--bar-gap) + 96px); width: min(36vw, 480px); pointer-events: none; }
.casa-chapter { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; visibility: hidden; }
.casa-chapter-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 5vw, 76px); letter-spacing: -0.03em; line-height: 1; }
.casa-chapter-sub { margin-top: 10px; max-width: 34ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.45; color: rgba(255,255,255,0.86); }
.casa-final { position: absolute; right: var(--edge); bottom: calc(var(--bar-gap) + 96px); opacity: 0; visibility: hidden; }

.casa-meter { position: absolute; left: var(--edge); right: var(--edge); bottom: calc(var(--bar-gap) + 36px); opacity: 0; visibility: hidden; pointer-events: none; }
.casa-meter-stages { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.casa-stage { color: rgba(255,255,255,0.62); transition: color 0.3s ease; }
.casa-stage.on { color: #fff; }
.casa-meter-track { height: 2px; background: rgba(255,255,255,0.2); overflow: hidden; }
.casa-meter-fill { height: 100%; background: var(--color-orange); transform: scaleX(0); transform-origin: left; }
.casa-loading { position: absolute; left: 50%; top: 45%; transform: translateX(-50%); font-size: 14px; color: rgba(255,255,255,0.75); }

/* A barra por cima do escuro da casa e da faixa. */
html.nav-on-dark .l-nav.scrolled { background: rgba(12,10,9,0.72); border-bottom-color: rgba(255,255,255,0.1); }
html.nav-on-dark .l-nav.scrolled .l-nav-logo svg { color: #fff !important; }
html.nav-on-dark .l-nav.scrolled :is(.l-nav-logo-text, .l-nav-link, .l-nav-login, .l-nav-burger) { color: #fff; }

/* Link "Saltar" de cada secção fixa: só aparece com o foco do teclado. */
.scene-skip { position: absolute; z-index: 20; left: 24px; top: 84px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--color-text-dark); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; }
.scene-skip:focus-visible { opacity: 1; pointer-events: auto; position: fixed; }
.scene-skip-light { background: var(--color-text-dark); color: #fff; }
.scene-end { position: absolute; bottom: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: calc(65px + var(--sa-top, 0px)); }
.scene-end:focus { outline: none; }

/* Sem animação: quatro imagens e o texto. */
.casa-static { display: none; padding-block: var(--sec); color: #fff; }
.casa-static .casa-lede { color: rgba(255,255,255,0.78); }
.casa-static-list { list-style: none; margin: var(--head-gap) 0; padding: 0; display: grid; gap: 40px 32px; }
.casa-static-list img { display: block; width: 100%; height: auto; margin-bottom: 16px; }
@media (min-width: 720px) { .casa-static-list { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .casa { height: auto; }
  .casa-sticky { display: none; }
  .casa-static { display: block; }
}
html[data-static-scenes] .casa { height: auto; }
html[data-static-scenes] .casa-sticky { display: none; }
html[data-static-scenes] .casa-static { display: block; }

@media (max-width: 900px) {
  .landing-page {
    --door-h: calc(var(--svh) * 44);
    --door-x: calc(50% - var(--door-w) / 2);
    --door-top: calc(var(--svh) * 90 - var(--door-h));
  }
  .casa { height: 300vh; }
  .casa-wall-copy { left: 20px; right: 20px; width: auto; top: calc(var(--sa-top) + 84px); text-align: center; }
  .casa-title { font-size: clamp(34px, 9.5vw, 56px); }
  .casa-lede { margin: 12px auto 0; font-size: 16px; }
  .casa-shade { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 22%, transparent 42%); }
  .casa-stagecopy { left: 20px; right: 20px; width: auto; bottom: calc(var(--bar-gap) + 152px); }
  .casa-final { left: 20px; right: 20px; bottom: calc(var(--bar-gap) + 76px); }
  .casa-final .btn-land { width: 100%; justify-content: center; min-height: 48px; }
  .casa-meter { left: 20px; right: 20px; bottom: calc(var(--bar-gap) + 24px); }
  .casa-meter-stages { font-size: 12px; }
}

/* Faixa de profissionais: continua o escuro da casa, a obra acaba em quem a fez. */
.pros-strip { background: var(--casa-black); color: #fff; padding-block: clamp(56px, 6vw, 88px); }
.pros-strip-title { font-size: 16px; font-weight: 500; color: rgba(255,255,255,0.72); margin-bottom: 24px; }
.pros-strip-name {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 60px);
  letter-spacing: -0.025em; line-height: 1.1; color: #fff;
}
.pros-strip .marquee-track { gap: clamp(40px, 5vw, 80px); padding-right: clamp(40px, 5vw, 80px); }
.pros-strip.is-driven .marquee-track { animation: none; will-change: transform; }
.pros-strip-list { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); list-style: none; }
@media (prefers-reduced-motion: reduce) {
  .pros-strip .marquee { display: none; }
  .pros-strip-list {
    position: static; display: flex; flex-wrap: wrap; gap: 8px 28px; width: auto; height: auto; margin-inline: auto; overflow: visible; clip-path: none;
    font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -0.02em;
  }
}

/* ============================================================
   COMO FUNCIONA: tudo alinhado ao mesmo topo; número, texto e fotografia enchem o ecrã.
   ============================================================ */
.how-section {
  /* A altura do topo vem do tamanho do título: nunca sobe para baixo da barra. */
  --how-title: clamp(30px, min(3.6vw, calc(var(--svh) * 6)), 56px);
  --how-gap: clamp(14px, calc(var(--svh) * 2.4), 24px);
  --how-head: calc(88px + var(--sa-top) + var(--how-title) * 2 + var(--how-gap) * 2 + 32px);
  --how-stage: calc(var(--svh) * 100 - var(--how-head) - 28px);
  position: relative; height: 320vh; background: var(--casa-wall);
}
.how-sticky { position: sticky; top: 0; height: calc(var(--svh) * 100); overflow: hidden; }
.how-inner { height: 100%; }
.how-top { height: var(--how-head); padding-top: calc(88px + var(--sa-top)); display: flex; flex-direction: column; justify-content: flex-start; gap: var(--how-gap); padding-bottom: var(--how-gap); }
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.how-title { font-size: var(--how-title); color: var(--color-text-dark); line-height: 1; }

.how-meter { display: flex; align-items: center; gap: 16px; }
.how-progress { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.how-tick { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--color-muted); }
.how-tick-bar { display: block; height: 4px; border-radius: 999px; background: rgba(28,25,23,0.12); overflow: hidden; }
.how-tick-bar span { display: block; height: 100%; background: var(--color-orange); transform: scaleX(0); transform-origin: left; }
.how-counter { flex: none; display: flex; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.how-counter-cur { display: block; height: 1.15em; overflow: hidden; color: var(--color-orange); }
.how-digits { display: flex; flex-direction: column; }
.how-counter-tot { color: rgba(28,25,23,0.5); }

.how-stage { height: var(--how-stage); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 4.6fr) minmax(0, 4.4fr); grid-template-rows: minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: stretch; }
.how-bignum { display: block; margin-top: -0.07em; font-family: var(--font-display); font-weight: 800; font-size: clamp(96px, min(14vw, calc(var(--svh) * 26)), 240px); line-height: 0.92; letter-spacing: -0.05em; color: var(--color-orange); font-variant-numeric: tabular-nums; }
.how-bignum-window { display: block; height: 0.92em; overflow: hidden; }
.how-col { position: relative; height: 100%; overflow: clip; }
.how-track { position: relative; list-style: none; margin: 0; padding: 0; }
.how-step { min-height: calc(var(--how-stage) + 48px); }
.how-step-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, min(5vw, calc(var(--svh) * 9)), 84px); line-height: 0.98; letter-spacing: -0.03em; color: var(--color-text-dark); margin-bottom: clamp(14px, calc(var(--svh) * 2.6), 28px); text-wrap: balance; }
.how-step-desc { max-width: 46ch; color: var(--color-dark-gray); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.5; margin-bottom: clamp(14px, calc(var(--svh) * 2.6), 28px); }
.how-step-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how-step-bullets li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--color-text-dark); font-weight: 600; }
.how-step-bullets svg { flex: none; }
.how-photos { position: relative; overflow: hidden; border-radius: 8px; background: #EDE7E1; }
.how-photo { position: absolute; inset: 0; margin: 0; }
.how-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.how-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(16,14,13,0.72), transparent); }

/* Parado, em telemóvel ou sem motor: lista direta. */
@media (max-width: 900px) {
  .how-section { height: auto; }
  .how-sticky { position: static; height: auto; overflow: visible; padding-block: var(--sec) 0; }
  .how-inner { height: auto; }
  .how-top { height: auto; padding: 0; display: contents; }
  .how-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
  .how-title { font-size: clamp(34px, 9vw, 56px); }
  .how-meter { position: sticky; z-index: 3; top: calc(65px + var(--sa-top)); padding-block: 12px; background: var(--casa-wall); }
  .how-tick { font-size: 13px; gap: 6px; }
  .how-stage { display: block; height: auto; padding-top: 16px; padding-bottom: var(--sec); }
  .how-bignum-wrap, .how-photos { display: none; }
  .how-col { height: auto; overflow: visible; }
  .how-step {
    position: sticky; top: calc(132px + var(--sa-top) + var(--i) * 10px); min-height: 0; margin-bottom: 16px; padding: 24px;
    background: #fff; border: 1px solid rgba(28,25,23,0.08); border-radius: 18px; transform-origin: top center;
  }
  .how-step-title { font-size: clamp(28px, 7.6vw, 40px); margin-bottom: 12px; }
  .how-step-desc { margin-bottom: 16px; font-size: 16px; }
}
@media (min-width: 901px) { .how-meter .how-counter { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .how-section { height: auto; }
  .how-sticky { position: static; height: auto; padding-block: var(--sec); }
  .how-top { height: auto; padding: 0 0 var(--head-gap); }
  .how-stage { display: block; height: auto; }
  .how-bignum-wrap, .how-photos, .how-meter { display: none; }
  .how-col { height: auto; overflow: visible; }
  .how-step { position: static; min-height: 0; margin-bottom: 40px; }
}
html[data-static-scenes] .how-section { height: auto; }
html[data-static-scenes] .how-sticky { position: static; height: auto; padding-block: var(--sec); }
html[data-static-scenes] .how-top { height: auto; padding: 0 0 var(--head-gap); }
html[data-static-scenes] .how-stage { display: block; height: auto; }
html[data-static-scenes] :is(.how-bignum-wrap, .how-photos, .how-meter) { display: none; }
html[data-static-scenes] .how-col { height: auto; overflow: visible; }
html[data-static-scenes] .how-step { position: static; min-height: 0; margin-bottom: 40px; }

/* ============================================================
   OBRAS: galeria horizontal fixa.
   ============================================================ */
.rp-gallery { position: relative; height: 240vh; background: var(--casa-wall); }
.rp-sticky { position: sticky; top: 0; height: calc(var(--svh) * 100); overflow: clip; display: flex; }
/* Título, fotografias e fim começam todos na mesma linha, logo abaixo da barra. */
.rp-track { display: flex; align-items: flex-start; gap: clamp(20px, 2.4vw, 36px); padding: calc(88px + var(--sa-top)) var(--edge) 0; width: max-content; }
.rp-gallery.is-active .rp-track { will-change: transform; }
.rp-panel { flex: none; width: min(40vw, 600px); padding-right: clamp(24px, 4vw, 64px); }
.rp-gallery .rp-title { margin-bottom: 20px; }
.rp-gallery .rp-card { flex: none; width: clamp(280px, calc((var(--svh) * 100 - 198px) * 0.8), 560px); }
.rp-gallery .rp-card-media img { width: 116%; max-width: none; margin-left: -8%; transition: none; }
.rp-end { flex: none; width: clamp(280px, 26vw, 400px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-left: clamp(16px, 2vw, 32px); }
.rp-end-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.025em; margin-bottom: 8px; color: var(--color-text-dark); }

@media (max-width: 900px) {
  .rp-gallery { height: auto; padding-block: var(--sec); }
  .rp-sticky { position: static; height: auto; display: block; overflow: visible; }
  .rp-track { width: auto; display: flex; align-items: stretch; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); padding: 0 var(--gut); scrollbar-width: none; gap: 12px; }
  .rp-track::-webkit-scrollbar { display: none; }
  .rp-panel { display: contents; }
  .rp-panel > * { display: none; }
  .rp-mobile-head { display: block; }
  .rp-gallery .rp-card { width: 74vw; max-width: 340px; scroll-snap-align: start; margin: 0 !important; }
  .rp-gallery .rp-card-media img { width: 100%; margin-left: 0; }
  .rp-end { width: 74vw; max-width: 340px; justify-content: center; scroll-snap-align: start; padding-left: 8px; }
}
@media (min-width: 901px) { .rp-mobile-head { display: none; } }
@media (max-width: 900px) {
  .rp-mobile-head { padding-inline: var(--gut); margin-bottom: 28px; }
  .rp-mobile-head .rp-title { margin-bottom: 14px; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .rp-gallery { height: auto; padding-block: var(--sec); }
  .rp-sticky { position: static; height: auto; display: block; }
  .rp-track { width: auto; flex-wrap: wrap; align-items: flex-start; padding-top: 0; }
  .rp-panel { width: 100%; padding: 0 0 var(--head-gap); }
  .rp-gallery .rp-card { width: calc((100% - 72px) / 3); margin: 0 !important; }
  .rp-gallery .rp-card-media img { width: 100%; margin-left: 0; }
}
html[data-static-scenes] .rp-gallery { height: auto; padding-block: var(--sec); }
html[data-static-scenes] .rp-sticky { position: static; height: auto; display: block; }
html[data-static-scenes] .rp-track { width: auto; flex-wrap: wrap; align-items: flex-start; padding-top: 0; }
html[data-static-scenes] .rp-panel { width: 100%; padding: 0 0 var(--head-gap); }
html[data-static-scenes] .rp-gallery .rp-card { width: min(100%, 360px); margin: 0 !important; }
html[data-static-scenes] .rp-gallery .rp-card-media img { width: 100%; margin-left: 0; }

/* ============================================================
   PORQUÊ A DOORS: capítulo escuro; a frase acende ao descer.
   ============================================================ */
.why-section { position: relative; z-index: 1; margin-top: -28px; border-radius: 28px 28px 0 0; background: var(--color-text-dark); color: #fff; padding-block: var(--sec); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.why-statement { position: sticky; top: calc(96px + var(--sa-top)); font-size: clamp(42px, 5.8vw, 92px); line-height: 0.98; letter-spacing: -0.03em; color: #fff; }
.why-word { display: inline-block; margin-right: 0.22em; }
.why-word-on { color: var(--color-orange); font-style: italic; }
.why-list { list-style: none; margin: 0; padding: 0; }
.why-row { padding-block: clamp(24px, 3vw, 40px); border-top: 1px solid rgba(255,255,255,0.16); }
.why-row:first-child { border-top: 0; padding-top: 0.4em; }
.why-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 12px; transition: color 0.25s ease; }
.why-row:hover .why-title { color: var(--color-orange); }
.why-desc { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; color: rgba(255,255,255,0.74); max-width: 46ch; }
.why-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; margin-top: var(--sec); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid rgba(255,255,255,0.16); }
.why-stats p { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: rgba(255,255,255,0.74); }
.why-stats strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 6vw, 96px); letter-spacing: -0.04em; line-height: 0.95; color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-statement { position: static; font-size: clamp(38px, 10.4vw, 64px); }
  .why-row:first-child { border-top: 1px solid rgba(255,255,255,0.16); padding-top: 24px; }
  .why-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   CATEGORIAS: fechadas e sem fixar. A secção mede um ecrã; ao abrir uma, o scroll
   leva-a ao topo e só então fixa (Lenis parado), com as 6 em quadro.
   ============================================================ */
.cats { --cats-ease: cubic-bezier(0.22, 1, 0.36, 1); position: relative; height: calc(var(--svh) * 100); display: flex; flex-direction: column; overflow: clip; background: #fff; }
.cats-head { flex: none; padding: calc(88px + var(--sa-top)) var(--edge) clamp(16px, calc(var(--svh) * 3), 32px); }
.cats-title { font-size: clamp(30px, min(3.8vw, calc(var(--svh) * 6.4)), 60px); line-height: 1; color: var(--color-text-dark); }
.cats-body { position: relative; flex: 1; min-height: 0; }
.cats-rows { height: 100%; list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: minmax(0, 1fr); }
.cats-rows li { min-height: 0; border-top: 1px solid rgba(28,25,23,0.12); }

.cat-row { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 3vw, 56px); padding: 0 var(--edge); overflow: hidden; border: 0; background: none; font: inherit; text-align: left; color: var(--color-text-dark); cursor: pointer; transition: opacity 0.35s ease; }
.cat-row:focus-visible { outline: 3px solid var(--color-text-dark); outline-offset: -3px; }
.cat-row:active .cat-name { transform: translateX(12px) scale(0.985); }
.cat-row > * { position: relative; }
.cat-fill { position: absolute; inset: 0; background: var(--color-orange); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--cats-ease); }
.cat-row[data-from="top"] .cat-fill { transform-origin: top; }
.cat-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, min(3.4vw, calc(var(--svh) * 5.6)), 60px); letter-spacing: -0.025em; line-height: 1.04; white-space: nowrap; transform-origin: left center; transition: transform 0.55s var(--cats-ease); }
.cat-short { justify-self: end; max-width: 38ch; text-align: right; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.4; color: var(--color-muted); transition: color 0.3s ease, opacity 0.3s ease, transform 0.55s var(--cats-ease); }
.cat-plus { flex: none; width: clamp(40px, calc(var(--svh) * 6), 52px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(28,25,23,0.06); transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, transform 0.55s var(--cats-ease); }

/* Com o rato: o laranja enche a linha e as outras recuam. */
.cats.has-hover:not(.has-open) li:not(.is-hover) .cat-row { opacity: 0.34; }
.cats-rows li.is-hover .cat-fill, .cats-rows li.on .cat-fill, .cat-row:focus-visible .cat-fill { transform: none; }
.cats-rows li.is-hover .cat-name, .cats-rows li.on .cat-name, .cat-row:focus-visible .cat-name { transform: translateX(16px); }
.cats-rows li.is-hover .cat-short, .cat-row:focus-visible .cat-short { color: var(--color-text-dark); transform: translateX(-8px); }
.cats-rows li.is-hover .cat-plus, .cat-row:focus-visible .cat-plus { background: var(--color-text-dark); color: #fff; transform: rotate(90deg) scale(1.1); }


/* Aberta: o painel abre da direita e a linha laranja encosta-lhe. */
.cats-panel { position: absolute; z-index: 2; inset: 0 0 0 52%; overflow: hidden; background: var(--color-text-dark); visibility: hidden; clip-path: inset(0 0 0 100%); transition: clip-path 0.5s var(--cats-ease), transform 0.4s var(--cats-ease), visibility 0s linear 0.5s; }
.cats.has-open .cats-panel { visibility: visible; clip-path: inset(0); transition: clip-path 0.8s var(--cats-ease), transform 0.4s var(--cats-ease), visibility 0s; }
.cats.has-open .cat-short, .cats.has-open .cat-plus { opacity: 0; }
.cats.has-open li:not(.on):not(.is-hover) .cat-row { opacity: 0.45; }
.cats-img { position: absolute; inset: 0; opacity: 0; transform: scale(1.08); transition: opacity 0.6s ease, transform 1.2s var(--cats-ease); }
.cats-img.on { opacity: 1; transform: none; }
.cats-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 96px clamp(20px, 2.6vw, 40px) clamp(20px, 2.6vw, 36px); color: #fff; background: linear-gradient(to top, rgba(16,14,13,0.82), transparent); animation: cats-cap-in 0.7s var(--cats-ease) both 0.12s; }
.cats-cap p { max-width: 34ch; margin: 0; font-size: clamp(16px, 1.4vw, 21px); line-height: 1.35; font-weight: 500; }
@keyframes cats-cap-in { from { opacity: 0; transform: translateY(18px); } }
.cats-link { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; color: var(--color-text-dark); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-color 0.25s ease, color 0.25s ease; }
.cats-link:hover { background: var(--color-orange); color: var(--color-text-dark); }
.cats-link svg { transition: transform 0.45s var(--cats-ease); }
.cats-link:hover svg { transform: translate(2px, -2px); }
.cats-close { position: absolute; z-index: 3; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--color-text-dark); cursor: pointer; transition: transform 0.45s var(--cats-ease), background-color 0.25s ease; }
.cats-close:hover { background: var(--color-orange); transform: rotate(90deg); }
.cats-close:focus-visible, .cats-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.cat-acc { display: none; }

/* Telemóvel e ecrãs baixos: acordeão, sem fixar. Igual a PIN_QUERY em CategoriesSection.tsx. */
@media (max-width: 900px), (max-height: 619px) {
  .cats { height: auto; padding-block: var(--sec); }
  .cats-head { padding: 0 var(--gut) var(--head-gap); }
  .cats-title { font-size: clamp(34px, 9vw, 56px); }
  .cats-rows { height: auto; grid-auto-rows: auto; }
  .cat-row { height: auto; min-height: 60px; grid-template-columns: minmax(0, 1fr) auto; padding: 8px var(--gut); }
  .cat-name { font-size: clamp(23px, 6.2vw, 36px); white-space: normal; }
  .cats-rows li.on .cat-name { transform: none; }
  .cat-short, .cats-panel { display: none; }
  .cats.has-open .cat-plus { opacity: 1; }
  .cats.has-open li:not(.on):not(.is-hover) .cat-row { opacity: 1; }
  .cats-rows li.on .cat-plus { background: var(--color-text-dark); color: #fff; transform: rotate(45deg); }
  .cat-acc { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.55s var(--cats-ease), visibility 0s linear 0.55s; }
  .cats-rows li.on .cat-acc { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.55s var(--cats-ease), visibility 0s; }
  .cat-acc-in { min-height: 0; overflow: hidden; padding-inline: var(--gut); }
  .cat-acc-img { position: relative; display: block; aspect-ratio: 16 / 9; margin-top: 14px; overflow: hidden; border-radius: 14px; background: #EDE7E1; }
  .cat-acc-in p { margin: 14px 0 12px; font-size: 16px; line-height: 1.45; color: var(--color-muted); }
  .cat-acc-in .cats-link { margin-bottom: 20px; background: var(--color-text-dark); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-fill, .cat-name, .cat-short, .cat-plus, .cats-panel, .cats-img, .cat-acc { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .cats-cap { animation: none; }
}

/* App iOS */
.app-section { padding-block: var(--sec); background: var(--casa-wall); }
.app-inner { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .app-inner { grid-template-columns: 1fr 1fr; gap: 64px; } }
.app-title { font-size: clamp(44px, 6vw, 92px); color: var(--color-text-dark); }
.app-copy { display: flex; flex-direction: column; gap: 24px; }
.app-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app-points li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--color-dark-gray); }
.app-points svg { color: var(--color-orange); flex-shrink: 0; }

/* ============================================================
   PROFISSIONAIS: uma obra real com o nome de quem a fez, sem painéis inventados.
   ============================================================ */
.pros-section { position: relative; height: 240vh; background: #100E0D; color: #fff; }
.pros-sticky { position: sticky; top: 0; height: calc(var(--svh) * 100); overflow: clip; padding: calc(96px + var(--sa-top)) 0 clamp(24px, calc(var(--svh) * 4), 40px); }
.pros-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.pros-copy { display: flex; flex-direction: column; min-height: 0; }
.pros-title { font-size: clamp(40px, min(6vw, calc(var(--svh) * 10.5)), 100px); color: #fff; margin-bottom: clamp(12px, calc(var(--svh) * 2), 24px); }
.pros-lead { color: rgba(255,255,255,0.76); max-width: 34em; font-size: clamp(16px, min(1.4vw, calc(var(--svh) * 2.4)), 20px); margin-bottom: clamp(12px, calc(var(--svh) * 2.4), 28px); }
/* As linhas enchem a altura que sobra, como em Categorias: o botão assenta na base da fotografia. */
.pros-benefits { flex: 1; min-height: 0; list-style: none; margin: 0 0 clamp(14px, calc(var(--svh) * 2.6), 28px); padding: 0; display: grid; grid-auto-rows: 1fr; }
.pros-benefits li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 20px; border-top: 1px solid rgba(255,255,255,0.16); }
.pros-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, min(3.5vw, calc(var(--svh) * 5.6)), 50px); line-height: 1; letter-spacing: -0.025em; color: var(--color-orange); transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.pros-text { font-size: clamp(15px, min(1.15vw, calc(var(--svh) * 1.9)), 18px); line-height: 1.35; font-weight: 500; color: rgba(255,255,255,0.76); transition: color 0.45s ease; }
/* Fixa: as próximas ficam apagadas, a atual laranja e um pouco à frente, as anteriores brancas. */
.pros-section.is-pinned li .pros-word { color: rgba(255,255,255,0.3); }
.pros-section.is-pinned li .pros-text { color: rgba(255,255,255,0.45); }
.pros-section.is-pinned li.past .pros-word { color: #fff; }
.pros-section.is-pinned li.past .pros-text { color: rgba(255,255,255,0.76); }
.pros-section.is-pinned li.on .pros-word { color: var(--color-orange); transform: translateX(10px); }
.pros-section.is-pinned li.on .pros-text { color: #fff; }
.pros-benefits li:last-child { border-bottom: 1px solid rgba(255,255,255,0.16); }
.pros-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.pros-door { position: relative; margin: 0; min-height: 0; overflow: hidden; border-radius: 8px; background: #1C1917; }
.pros-door img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; display: block; }
.pros-door figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 20px 18px; font-size: 15px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(16,14,13,0.8), transparent); }
.pros-door figcaption span { display: block; font-weight: 400; color: rgba(255,255,255,0.84); }
.pros-section.is-active .pros-door img { will-change: transform; }
/* Sem fixar: telemóvel, janelas muito baixas, reduzir movimento e máquinas fracas. */
@media (max-width: 900px), (max-height: 619px), (prefers-reduced-motion: reduce) {
  .pros-section { height: auto; }
  .pros-sticky { position: static; height: auto; overflow: visible; padding: var(--sec) 0; }
  .pros-grid { height: auto; grid-template-rows: auto; }
  .pros-title { font-size: clamp(44px, 6.6vw, 104px); margin-bottom: 24px; }
  .pros-lead { font-size: clamp(17px, 1.5vw, 21px); margin-bottom: var(--head-gap); }
  .pros-benefits { margin-bottom: var(--head-gap); }
  .pros-benefits li { padding-block: 18px; }
  .pros-word { font-size: clamp(30px, 4vw, 48px); }
  .pros-text { font-size: 16px; }
  .pros-door { min-height: 520px; }
}
html[data-static-scenes] .pros-section { height: auto; }
html[data-static-scenes] .pros-sticky { position: static; height: auto; overflow: visible; padding: var(--sec) 0; }
html[data-static-scenes] .pros-grid { height: auto; grid-template-rows: auto; }
html[data-static-scenes] .pros-benefits li { padding-block: 18px; }
html[data-static-scenes] .pros-door { min-height: 520px; }
@media (max-width: 900px) {
  .pros-grid { grid-template-columns: 1fr; }
  .pros-benefits li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pros-door { min-height: 0; aspect-ratio: 4 / 5; }
}
@media (max-width: 640px) {
  .pros-ctas { flex-direction: column; }
  .pros-ctas .btn-land { justify-content: center; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { background: var(--casa-wall); padding-block: var(--sec); }
.faq-two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.faq-col-left { position: sticky; top: calc(96px + var(--sa-top)); }
.faq-title { font-size: clamp(38px, 4.8vw, 76px); margin-bottom: clamp(24px, 3vw, 40px); color: var(--color-text-dark); }
.faq-group-tabs { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.faq-tab-btn { position: relative; min-height: 44px; padding: 8px 0 8px 18px; text-align: left; font-size: 16px; font-weight: 600; color: var(--color-muted); background: transparent; border: 0; cursor: pointer; transition: color 0.2s ease; }
.faq-tab-btn::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--color-orange); transform: scaleY(0); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.faq-tab-btn.active { color: var(--color-text-dark); }
.faq-tab-btn.active::before { transform: none; }
.faq-tab-btn:hover { color: var(--color-text-dark); }
.faq-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.faq-item { border-bottom: 1px solid rgba(28,25,23,0.14); }
.faq-item:first-child .faq-q { padding-top: 0.2em; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: clamp(18px, 2vw, 26px) 0; text-align: left; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.15; color: var(--color-text-dark); transition: color 0.2s ease; background: transparent; border: 0; cursor: pointer; }
.faq-q:hover { color: var(--color-orange); }
.faq-q-text { flex: 1; }
.faq-q-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(28,25,23,0.06); flex-shrink: 0; position: relative; transition: background 0.3s ease; }
.faq-q-icon span { position: absolute; background: var(--color-text-dark); top: 50%; left: 50%; }
.faq-q-icon span:nth-child(1) { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.faq-q-icon span:nth-child(2) { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.faq-item.open .faq-q-icon { background: var(--color-orange); }
.faq-item.open .faq-q-icon span { background: #fff; }
.faq-a { font-size: 17px; line-height: 1.6; color: var(--color-dark-gray); max-width: 60ch; padding-bottom: clamp(18px, 2vw, 26px); }
@media (max-width: 900px) {
  .faq-two-col { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-col-left { position: static; }
  .faq-group-tabs { flex-direction: row; gap: 8px; overflow-x: auto; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; }
  .faq-group-tabs::-webkit-scrollbar { display: none; }
  .faq-tab-btn { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(28,25,23,0.16); }
  .faq-tab-btn::before { display: none; }
  .faq-tab-btn.active { background: var(--color-text-dark); border-color: var(--color-text-dark); color: #fff; }
}

/* ============================================================
   FIM: laranja como o início, e a última porta abre ao descer.
   ============================================================ */
.final-cta { position: relative; height: 260vh; background: var(--color-orange); color: var(--color-text-dark); }
.final-sticky { position: sticky; top: 0; height: calc(var(--svh) * 100); overflow: clip;  padding-top: calc(96px + var(--sa-top)); }
.final-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.final-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 0; padding-bottom: clamp(24px, calc(var(--svh) * 4), 40px); }
.final-cta-title { font-size: clamp(38px, min(4.9vw, calc(var(--svh) * 9.5)), 72px); line-height: 0.96; letter-spacing: -0.035em; color: var(--color-text-dark); margin-bottom: clamp(16px, calc(var(--svh) * 3), 36px); }
.final-start-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, min(2.4vw, calc(var(--svh) * 3.6)), 34px); letter-spacing: -0.02em; line-height: 1.08; margin: clamp(16px, calc(var(--svh) * 3), 28px) 0 clamp(8px, calc(var(--svh) * 1.6), 14px); text-wrap: balance; max-width: 22em; }
.final-start-points { list-style: none; margin: 0 0 clamp(14px, calc(var(--svh) * 2.6), 28px); padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.final-start-points li { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 500; }
.final-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.final-start-btn { min-height: 60px; padding: 0 32px; font-size: 17px; }
.final-start-badge:empty { display: none; }
.final-form-note, .final-start-login { font-size: 15px; line-height: 1.5; font-weight: 500; }
.final-start-login { margin-top: 4px; }
.final-start-login a { font-weight: 700; color: var(--color-text-dark); text-decoration: underline !important; text-underline-offset: 4px; }
.role-toggle { display: inline-flex; background: rgba(255,255,255,0.22); border-radius: 999px; padding: 4px; }
.role-opt { min-height: 44px; padding: 8px 18px; font-size: 15px; font-weight: 600; color: var(--color-text-dark); border-radius: 999px; transition: background 0.25s ease, color 0.25s ease; background: transparent; border: 0; cursor: pointer; }
.role-opt.on { background: var(--color-text-dark); color: #fff; }

/* Mesma porta da casa, com as cores trocadas: parede laranja, porta escura, lado de dentro claro. */
.final-door { position: relative; justify-self: end; width: 100%; max-width: calc(var(--svh) * 50); min-height: 0; background: var(--color-text-dark); perspective: 2400px; perspective-origin: 50% 55%; }
.final-door::before { content: ""; position: absolute; inset: calc(var(--casa-aro) * -1) calc(var(--casa-aro) * -1) 0; background: linear-gradient(to bottom, #1C1917, #2C2622); box-shadow: 0 -4px 18px rgba(90,30,8,0.4); }
.final-door-photo { position: absolute; inset: 0; overflow: hidden; background: #1C1917; }
.final-door-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.final-jamb { position: absolute; }
.final-jamb-left { left: 0; top: 0; bottom: 0; width: var(--casa-jamb); background: linear-gradient(to right, #15110F, #0D0B0A); clip-path: polygon(0 0, 100% var(--casa-jamb), 100% 100%, 0 100%); }
.final-jamb-right { right: 0; top: 0; bottom: 0; width: var(--casa-jamb); background: linear-gradient(to left, #3E3630, #2B2622); clip-path: polygon(0 var(--casa-jamb), 100% 0, 100% 100%, 0 100%); }
.final-jamb-top { left: 0; right: 0; top: 0; height: var(--casa-jamb); background: linear-gradient(to bottom, #15110F, #24201C); clip-path: polygon(0 0, 100% 0, calc(100% - var(--casa-jamb)) 100%, var(--casa-jamb) 100%); }
.final-door-shadow { position: absolute; top: 0; bottom: 0; right: 100%; width: 60%; transform-origin: right center; opacity: 0; background: linear-gradient(to left, rgba(90,28,6,0.6), transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%); mask-image: linear-gradient(to bottom, transparent, #000 14%); }
.final-leaf { position: absolute; inset: 0; --door-w: 460px; --d3-t: clamp(20px, 2.6vw, 38px); --d3-front: #1F1B19; --d3-front-deep: #0F0D0C; --d3-edge: #2C2622; }
.final-leaf .d3-edge-free { background: linear-gradient(to right, #2C2622, #171412); }
.final-leaf .d3-edge-hinge, .final-leaf .d3-edge-bottom { background: #100E0D; }
.final-leaf .d3-panel { box-shadow: inset 2px 2px 3px rgba(0,0,0,0.7), inset -1px -1px 1px rgba(255,255,255,0.12), 0 0 0 1px rgba(255,255,255,0.05); }
.final-leaf .d3-panel::before { background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.12)); box-shadow: 1px 1px 2px rgba(0,0,0,0.6), inset 1px 1px 0 rgba(255,255,255,0.1); }
.final-cta.is-active .final-leaf, .final-cta.is-active .final-door-photo img { will-change: transform; }
@media (prefers-reduced-motion: reduce) { .final-leaf { display: none; } }
html[data-static-scenes] .final-leaf { display: none; }
/* Sem fixar: telemóvel, janelas muito baixas, reduzir movimento e máquinas fracas. */
@media (max-width: 900px), (max-height: 619px), (prefers-reduced-motion: reduce) {
  .final-cta { height: auto; }
  .final-sticky { position: static; height: auto; overflow: visible; padding-top: var(--sec); }
  .final-grid { height: auto; grid-template-rows: auto; }
  .final-copy { padding-bottom: var(--sec); }
  .final-cta { overflow: clip; }
  .final-door { min-height: clamp(420px, calc(var(--svh) * 78), 760px); }
}
html[data-static-scenes] .final-cta { height: auto; overflow: clip; }
html[data-static-scenes] .final-sticky { position: static; height: auto; overflow: visible; padding-top: var(--sec); }
html[data-static-scenes] .final-grid { height: auto; grid-template-rows: auto; }
html[data-static-scenes] .final-copy { padding-bottom: var(--sec); }
html[data-static-scenes] .final-door { min-height: clamp(420px, calc(var(--svh) * 78), 760px); }
@media (max-width: 900px) {
  .final-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .final-copy { padding-bottom: var(--head-gap); }
  .final-cta-title { font-size: clamp(40px, 11vw, 84px); }
  .final-door { min-height: clamp(300px, calc(var(--svh) * 46), 460px); }
}
@media (max-width: 640px) {
  .role-toggle { display: flex; align-self: stretch; }
  .role-opt { flex: 1; padding-inline: 8px; }
  .final-start-actions { flex-direction: column; align-items: stretch; }
  .final-start-btn { justify-content: center; }
  .final-start-badge { align-self: center; }
}

/* ============================================================
   MOTOR DE ANIMAÇÃO: Lenis, cursor e níveis de qualidade.
   Importado só nas páginas com cenas (ver motion/MotionProvider).
   ============================================================ */

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* Âncoras: um /#faq aberto de novo ou o Voltar param abaixo da barra (65 px já encolhida). */
.landing-page section[id] { scroll-margin-top: calc(65px + var(--sa-top, 0px)); }
.landing-page section[tabindex="-1"]:focus { outline: none; }

/* Cursor: a seta só desaparece depois de o JS ligar o cursor (html.has-cursor). */
.cursor-wrap { display: none; }
html.has-cursor .landing-page,
html.has-cursor .landing-page a,
html.has-cursor .landing-page button,
html.has-cursor .landing-page label { cursor: none; }
html.has-cursor .landing-page input,
html.has-cursor .landing-page textarea,
html.has-cursor .landing-page select { cursor: text; }
html.has-cursor .cursor-wrap {
  display: block;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
  contain: layout style;
}
html.has-cursor .cursor-wrap.is-visible { opacity: 1; }
html.has-cursor .cursor-wrap.is-native { opacity: 0; }
.cursor-dot {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-orange);
  border: 1.5px solid transparent;
  transform: scale(0.18);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease;
}
.cursor-wrap.is-hover .cursor-dot { transform: scale(1); background: transparent; border-color: var(--color-orange); }
.cursor-wrap.on-orange .cursor-dot { background: #FFE7DD; }
.cursor-wrap.on-orange.is-hover .cursor-dot { background: transparent; border-color: #FFE7DD; }
.cursor-wrap.on-dark.is-hover .cursor-dot { border-color: #FF8A65; }
.cursor-wrap.has-label .cursor-dot { transform: scale(1.5); background: var(--color-orange); border-color: transparent; }
.cursor-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor-wrap.has-label .cursor-label { opacity: 1; }

/* A luz do hero: um círculo já pintado, que só muda de sítio e de opacidade. */
.gradient-glow { position: absolute; left: -36vw; top: -36vw; width: 72vw; aspect-ratio: 1; border-radius: 50%; pointer-events: none; opacity: 0; will-change: transform, opacity; transition: opacity 0.6s ease; background: radial-gradient(closest-side, rgba(255,170,130,0.5), rgba(255,170,130,0.18) 50%, rgba(255,170,130,0)); }
.gradient-glow.on { opacity: 1; }
@media (hover: none), (pointer: coarse) { .gradient-glow { display: none; } }

/* Nível baixo: nada de efeitos caros a repintar. */
html[data-motion="baixo"] .landing-page *,
html[data-motion="baixo"] .landing-page *::before,
html[data-motion="baixo"] .landing-page *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-motion="medio"] .landing-page :not(.l-nav) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Hero: entrada só em CSS, o texto é visível antes do JS e sem ele. */
@keyframes hero-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes hero-in-scale { from { opacity: 0; transform: scale(0.97); } }
@keyframes hero-line { from { transform: translateY(110%); } }
/* A regra antiga .mask-line > span esconde a linha até ao .in; aqui a entrada é da animação. */
.mask-line > .hero-line { display: inline-block; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-in { animation: hero-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-in-scale { animation: hero-in-scale 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero-line { animation: hero-line 1s cubic-bezier(0.22, 1, 0.36, 1) both; }
}

/* ============================================================
   HOMEPAGE NO TELEMÓVEL (≤900 px): só aqui. O computador não lê nada deste ficheiro.
   As cenas leem estas regras no ramo isMobile de cada useScene.
   ============================================================ */

@media (max-width: 900px) {
  .landing-page { -webkit-tap-highlight-color: transparent; }

  /* HERO: a fotografia sai das margens e abre até às bordas com o scroll. */
  .hero-photo {
    margin-inline: calc(var(--gut) * -1);
    border-radius: 0;
    clip-path: inset(0 var(--gut) round 14px);
    animation-name: hero-photo-in-m;
    /* Só antes e durante a entrada: depois quem manda no recorte é o scroll. */
    animation-fill-mode: backwards;
  }
  .hero-photo img { will-change: transform; }
  .hero-photo-cap { padding-inline: calc(var(--gut) + 16px); }
  @keyframes hero-photo-in-m {
    from { clip-path: inset(18% var(--gut) 0 round 14px); opacity: 0; }
    to { clip-path: inset(0 var(--gut) round 14px); opacity: 1; }
  }
  /* Sem rato, a luz do hero passeia sozinha, devagar. */
  .hero-gradient .gradient-glow {
    display: block; opacity: 1; width: 130vw; left: -65vw; top: -65vw;
    animation: hero-glow-drift 16s ease-in-out infinite alternate;
  }
  @keyframes hero-glow-drift {
    0% { transform: translate3d(20vw, 30vw, 0); }
    50% { transform: translate3d(85vw, 70vw, 0); }
    100% { transform: translate3d(30vw, 130vw, 0); }
  }
  html[data-motion="baixo"] .hero-gradient .gradient-glow { animation: none; transform: translate3d(70vw, 40vw, 0); }
  /* A fotografia aberta assenta na casa, sem uma faixa laranja por baixo. */
  .hero-section { padding-bottom: 0; }
  /* A altura do hero não é um número inteiro de pixels: a casa sobe 2 px e tapa a linha laranja da junta. */
  .casa { position: relative; margin-top: -2px; }
  /* A palavra de fundo desce mais devagar que a página (o scroll mexe no span). */
  .hero-bg-word span { display: block; will-change: transform; }

  /* PORTA FINAL: centrada e mais estreita, para a folha aberta caber no ecrã do lado das dobradiças. */
  .final-door {
    justify-self: center; width: min(74%, calc(var(--svh) * 44)); max-width: none;
    min-height: clamp(340px, calc(var(--svh) * 52), 480px);
    margin-top: 12px;
  }
  .final-cta.is-active .final-leaf { will-change: transform; }

  /* CASA: a porta maior, a meio do ecrã. */
  .landing-page {
    --door-h: calc(var(--svh) * 52);
    --door-top: calc(var(--svh) * 93 - var(--door-h));
  }
  .casa-chapter { will-change: transform, opacity, clip-path; }
  .casa-stage { transition: color 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: left bottom; }
  .casa-stage.on:not(:has(~ .on)) { color: var(--color-orange); transform: translateY(-2px); }

  /* COMO FUNCIONA: o cartão que fica para trás escurece e recua. */
  .how-step::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    background: var(--color-text-dark); opacity: var(--dim, 0);
  }
  .how-step { box-shadow: 0 -10px 30px -18px rgba(28,25,23,0.22); }
  /* O último cartão já fecha a secção: a secção seguinte traz o seu próprio espaço. */
  .how-stage { padding-bottom: 24px; }

  /* OBRAS: a fotografia corre dentro do cartão ao arrastar o carrossel. */
  .rp-gallery .rp-card-media img { width: 116%; margin-left: -8%; will-change: transform; }
  .rp-gallery .rp-card { transform-origin: center 40%; }
  /* Safari pisca os cantos de um recorte arredondado quando o cartão escala: a máscara fixa-os. */
  .rp-gallery .rp-card-media { -webkit-mask-image: -webkit-radial-gradient(white, black); transform: translateZ(0); }

  /* PORQUÊ: as linhas desenham-se da esquerda. */
  .why-row { position: relative; border-top-color: transparent !important; }
  .why-row::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: rgba(255,255,255,0.16); transform: scaleX(var(--line, 1)); transform-origin: left;
  }

  /* CATEGORIAS: a imagem destapa-se de cima e assenta; o texto sobe atrás. */
  .cat-acc-img { clip-path: inset(0 0 100% 0 round 14px); transition: clip-path 0.7s var(--cats-ease); }
  .cat-acc-img img { transform: scale(1.18); transition: transform 1.2s var(--cats-ease); }
  .cats-rows li.on .cat-acc-img { clip-path: inset(0 0 0 0 round 14px); transition-delay: 0.08s; }
  .cats-rows li.on .cat-acc-img img { transform: none; }
  .cat-acc-in > :is(p, a) { opacity: 0; transform: translateY(14px); transition: opacity 0.3s ease, transform 0.5s var(--cats-ease); }
  .cats-rows li.on .cat-acc-in > :is(p, a) { opacity: 1; transform: none; transition-duration: 0.6s; }
  .cats-rows li.on .cat-acc-in > p { transition-delay: 0.22s; }
  .cats-rows li.on .cat-acc-in > a { transition-delay: 0.3s; }
  .cat-row:active .cat-name { transform: translateX(8px) scale(0.98); }
  .cats-rows li.on .cat-name { transform: translateX(6px); }

  /* PROFISSIONAIS: a vantagem a meio do ecrã acende; as que passaram ficam brancas. */
  .pros-section.is-scrubbed li .pros-word { color: rgba(255,255,255,0.32); }
  .pros-section.is-scrubbed li .pros-text { color: rgba(255,255,255,0.5); }
  .pros-section.is-scrubbed li.past .pros-word { color: #fff; }
  .pros-section.is-scrubbed li.past .pros-text { color: rgba(255,255,255,0.76); }
  .pros-section.is-scrubbed li.on .pros-word { color: var(--color-orange); }
  .pros-section.is-scrubbed li.on .pros-text { color: #fff; }
  .pros-door { will-change: clip-path; }
  .pros-door img { will-change: transform; }

  /* MENU: as entradas chegam uma a uma. */
  .landing-page .l-mobile-drawer-link,
  .landing-page .l-mobile-drawer-foot > * {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.25s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .landing-page .l-mobile-drawer.open :is(.l-mobile-drawer-link, .l-mobile-drawer-foot > *) { opacity: 1; transform: none; transition-duration: 0.6s, 0.8s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-link:nth-child(1) { transition-delay: 0.12s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-link:nth-child(2) { transition-delay: 0.17s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-link:nth-child(3) { transition-delay: 0.22s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-link:nth-child(4) { transition-delay: 0.27s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-link:nth-child(5) { transition-delay: 0.32s; }
  .landing-page .l-mobile-drawer.open .l-mobile-drawer-foot > * { transition-delay: 0.38s; }
}

/* Toque: o hover não fica preso depois do toque, e o botão afunda ao carregar. */
@media (max-width: 900px) and (hover: none) {
  .landing-page :is(.btn-land, .app-store-badge):hover { transform: none; box-shadow: none; }
  .landing-page :is(.btn-land, .app-store-badge, .faq-tab-btn, .role-opt, .faq-q-icon) { transition-property: transform, background-color, color, border-color, box-shadow; }
  .landing-page :is(.btn-land, .app-store-badge, .faq-tab-btn, .role-opt):active { transform: scale(0.96); transition-duration: 0.08s; }
  .landing-page .rp-card:active .rp-card-media { transform: scale(0.98); }
  .landing-page .rp-card-media { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
  .landing-page .faq-q:active .faq-q-icon { transform: scale(0.88); }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .hero-gradient .gradient-glow { animation: none; }
  .hero-photo { clip-path: none; margin-inline: 0; border-radius: 8px; }
  .cat-acc-img, .cat-acc-img img, .cat-acc-in > :is(p, a), .landing-page .l-mobile-drawer :is(.l-mobile-drawer-link, .l-mobile-drawer-foot > *) { transition: none !important; }
  .cat-acc-img { clip-path: none; }
  .cat-acc-img img, .cat-acc-in > :is(p, a), .landing-page .l-mobile-drawer :is(.l-mobile-drawer-link, .l-mobile-drawer-foot > *) { transform: none; opacity: 1; }
}

