/* Interações locais independentes. Os estilos visuais são os recuperados da referência. */
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  overflow-x: clip;
}
.local-nav-scrolled {
  border-color: rgba(255, 77, 0, 0.18) !important;
  background: rgba(11, 8, 8, 0.85) !important;
  backdrop-filter: blur(24px);
}
body.drawer-open {
  overflow: hidden;
}
#mobile-drawer {
  animation: drawer-in 0.35s ease both;
}
#mobile-drawer nav > div {
  animation: drawer-link 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--item, 0) * 60ms);
}
@keyframes drawer-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes drawer-link {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
html.local-motion [data-reveal],
html.local-motion [data-entry] {
  opacity: 0;
  transform: translateY(var(--local-y, 26px));
  transition:
    opacity var(--local-duration, 0.75s) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--local-duration, 0.75s) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--local-delay, 0s);
}
html.local-motion [data-reveal].revealed,
html.local-motion [data-entry].revealed {
  opacity: 1;
  transform: none;
}
[data-testid="hero-parallax"] {
  will-change: transform;
}
[data-testid="hero-parallax"] + canvas {
  pointer-events: none;
}
#concierge-panel {
  animation: concierge-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#concierge-panel button:disabled,
#concierge-panel input:disabled {
  cursor: default;
  opacity: 0.65;
}
@keyframes concierge-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
:focus-visible {
  outline: 2px solid #ffb800;
  outline-offset: 4px;
}
@media (max-width: 639px) {
  [data-testid="contacto-horarios"] .flex.items-center.justify-between {
    gap: 16px;
    align-items: flex-start;
  }
  [data-testid="contacto-horarios"] .font-mono-magma {
    max-width: 60%;
    text-align: right;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  html.local-motion [data-reveal],
  html.local-motion [data-entry] {
    opacity: 1;
    transform: none !important;
  }
  [data-testid="hero-parallax"] {
    transform: scale(1.1) !important;
  }
}
@media print {
  [data-testid="navbar"],
  [data-testid="ai-concierge-fab"],
  #concierge-panel,
  #mobile-drawer,
  .grain,
  canvas {
    display: none !important;
  }
  html.local-motion [data-reveal],
  html.local-motion [data-entry] {
    opacity: 1;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-testid="hero-parallax"] {
    transform: none !important;
  }
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}
/* Carrossel da capa: escolhas reais do menu, sem alterar os restantes layouts. */
.hero-sections{width:min(780px,100%);margin-top:26px}
.hero-sections-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:10px}
.hero-sections-heading>p{font-family:'JetBrains Mono',monospace;font-size:9px;letter-spacing:.16em;color:#c6c0b9}
.hero-sections-heading>div{display:flex;align-items:center;gap:7px}
.hero-slide-status{font:10px 'JetBrains Mono',monospace;color:#A39E99;margin-right:7px;white-space:nowrap}
.hero-sections-heading button{width:32px;height:32px;display:grid;place-items:center;background:#0b080870;border:1px solid #ff4d0055;border-radius:50%;font-size:16px;color:#f7f5f2;transition:background .2s}
.hero-sections-heading button:hover{background:#ff4d00;color:#fff}
.hero-section-tabs{display:flex;gap:7px;overflow-x:auto;padding:0 0 8px;scrollbar-width:thin;scrollbar-color:#ff4d0060 transparent;scroll-snap-type:x proximity}
.hero-section-tabs button{flex:1 0 auto;min-width:112px;display:flex;justify-content:flex-start;align-items:center;gap:9px;padding:13px 12px;background:#0b080880;border:1px solid #ffffff38;font:500 11px 'Outfit',sans-serif;color:#f7f5f2;white-space:nowrap;scroll-snap-align:start;backdrop-filter:blur(8px);transition:background .25s,border-color .25s}
.hero-section-tabs button>span{font:8px 'JetBrains Mono',monospace;opacity:.65}
.hero-section-tabs button[aria-pressed=true]{background:#ff4d00;border-color:#ff4d00;color:white}
.hero-section-tabs button:hover{border-color:#ffb800}
[data-testid=hero-parallax] img{transition:opacity .3s ease}
[data-testid=hero].slide-changing [data-testid=hero-parallax] img{opacity:.2}
.siteup-demo-credit{border-top:1px solid #ff4d0024;display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:0 40px;padding:18px 0 24px;font:10px 'JetBrains Mono',monospace;letter-spacing:.03em;color:#A39E99}
.siteup-demo-credit a{color:#f7f5f2;border-bottom:1px solid #ff4d00;padding-bottom:2px}
.siteup-demo-credit a:hover{color:#ffb800}
@media(max-width:639px){.hero-sections{margin-top:23px}.hero-sections-heading>p{font-size:8px;letter-spacing:.06em}.hero-section-tabs button{min-width:116px;padding:12px 11px}.hero-section-tabs{gap:7px}.hero-slide-status{font-size:9px}.hero-sections-heading button{height:30px;width:30px}[data-testid=hero]>.relative.z-10{padding-top:116px;padding-bottom:68px}.siteup-demo-credit{margin:0 20px;font-size:9px}}
@media(prefers-reduced-motion:reduce){[data-testid=hero-parallax] img{transition:none}}
/* Logótipo Magma manuscrito original, na versão branca fornecida. */
.local-brand-logo{display:block;width:125px;height:79px;object-fit:contain;filter:none}
[data-testid=navbar]>div{padding-top:5px;padding-bottom:5px}
[data-testid=footer] .local-brand-logo{width:145px;height:92px}
@media(max-width:639px){.local-brand-logo{width:108px;height:68px}[data-testid=navbar]>div{padding-top:4px;padding-bottom:4px}}
/* Faixas em movimento alinhadas com a largura útil das restantes secções. */
[data-testid="editorial-marquee"]{width:calc(100% - 80px);max-width:1320px;margin-inline:auto}
/* Logótipo do cabeçalho aumentado exatamente 20%; rodapé preservado. */
[data-testid="navbar"] .local-brand-logo{width:150px;height:94.8px}
@media(max-width:767px){[data-testid="editorial-marquee"]{width:calc(100% - 40px)}}
@media(max-width:639px){[data-testid="navbar"] .local-brand-logo{width:129.6px;height:81.6px}}
/* Novo título da capa, em duas linhas e com destaque em itálico. */
.magma-hero-title{font-family:Georgia,'Times New Roman',serif;font-size:clamp(3rem,8vw,7rem);font-weight:400;line-height:1.06;letter-spacing:-.045em;text-transform:none;color:#f7f5f2}
.magma-hero-title em{font-family:inherit;font-weight:400;font-style:italic}
@media(max-width:639px){.magma-hero-title{font-size:clamp(2.4rem,11.5vw,3.7rem);letter-spacing:-.045em}}
/* Título da capa aumentado, mantendo duas linhas. */
.magma-hero-title{font-size:clamp(4rem,10.5vw,9rem)}
@media(max-width:639px){.magma-hero-title{font-size:clamp(2.5rem,12.5vw,4.5rem)}}
/* Título com maior presença na capa. */
.magma-hero-title{font-size:clamp(4.8rem,13vw,11rem)}
@media(max-width:639px){.magma-hero-title{font-size:clamp(2.6rem,13.2vw,4.9rem)}}
/* Letra original do desenho Emergent, preservando o título aumentado. */
.magma-hero-title{font-family:'Syne',Arial,sans-serif;font-weight:800;letter-spacing:-.025em}
.magma-hero-title em{font-family:inherit;font-weight:800;font-style:italic}
/* Ajuste à largura da letra original, mantendo a composição em duas linhas. */
.magma-hero-title{font-size:clamp(1.5rem,8vw,7rem)}
.magma-hero-title .mask-line{white-space:nowrap}
@media(max-width:639px){.magma-hero-title{font-size:clamp(1.4rem,7.8vw,3.2rem)}}
/* Faixas de texto com menor destaque visual. */
[data-testid="editorial-marquee"]{padding-top:12px;padding-bottom:12px}
[data-testid="editorial-marquee"] .font-display{font-size:16px;letter-spacing:.025em;color:rgba(247,245,242,.65);padding-left:22px;padding-right:22px}
[data-testid="editorial-marquee"] svg{width:9px;height:9px;opacity:.65}
@media(max-width:639px){[data-testid="editorial-marquee"] .font-display{font-size:13px;padding-left:17px;padding-right:17px}}
/* Fotografia de entrada fornecida pelo utilizador, apresentada integralmente. */
.magma-entrance-photo{display:block;width:100%;height:auto;object-fit:contain}
/* Fotografia da entrada ligeiramente maior em desktop. */
@media(min-width:1024px){#sobre>div{grid-template-columns:.9fr 1.1fr;column-gap:3rem}}
/* Fotografias mais luminosas: menor intensidade das sobreposições escuras. */
[data-testid="hero-parallax"]>div:first-of-type{opacity:.48}
[data-testid="hero-parallax"]>div:last-of-type{opacity:.48}
[data-testid="page-home"] img.opacity-70,[data-testid="page-home"] img.opacity-80{opacity:1}
[data-testid="page-home"] .group>div.absolute.bg-gradient-to-t{opacity:.6}

/* Enquadramento aproximado do bacalhau, sem o logótipo da fotografia. */
img.magma-bacalhau-photo{object-position:50% 100%;scale:1.35;transform-origin:50% 100%}

.magma-instagram-link{display:inline-flex;align-items:center;gap:8px;margin-left:20px;padding-block:10px;color:#A39E99;font-size:14px;transition:color .2s}.magma-instagram-link:hover{color:#ff2924}.magma-instagram-link:focus-visible{outline:2px solid #ff2924;outline-offset:4px}

/* Alinhamento dos textos e fotografia na apresentação. */
@media(min-width:1024px){
#sobre>div{align-items:stretch}
#sobre>div>div:first-child{display:flex;flex-direction:column;justify-content:space-between}
#sobre>div>div.relative>div:first-child,#sobre>div>div.relative>div:first-child>.ember-card{height:100%}
#sobre .magma-entrance-photo{height:100%;min-height:100%;object-fit:cover;object-position:center}
}

/* Espaçamento mais compacto entre as secções da página inicial. */
[data-testid="page-home"] #sobre,[data-testid="page-home"] [data-testid="destaques"],[data-testid="page-home"] [data-testid="contacto-section"]{padding-top:48px;padding-bottom:48px}
[data-testid="page-home"] [data-testid="categorias"]{padding-bottom:48px}
@media(max-width:767px){[data-testid="page-home"] #sobre,[data-testid="page-home"] [data-testid="destaques"],[data-testid="page-home"] [data-testid="contacto-section"]{padding-top:32px;padding-bottom:32px}[data-testid="page-home"] [data-testid="categorias"]{padding-bottom:32px}}

@keyframes magma-hours-blink{0%,100%{opacity:1}50%{opacity:.4}}
.magma-hours-blink{animation:magma-hours-blink 2.4s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.magma-hours-blink{animation:none}}

.magma-hours-blink{position:fixed;top:112px;right:20px;z-index:65}
@media(max-width:639px){.magma-hours-blink{top:104px;right:12px}}

/* Horário estático, ancorado à fotografia. */
.magma-hours-blink{position:absolute;top:12px;right:12px;z-index:10;animation:none;opacity:1}
@media(max-width:639px){.magma-hours-blink{top:10px;right:10px}}

/* Horário na posição original da fotografia, com piscar suave. */
.magma-hours-blink{position:absolute;top:-24px;right:-12px;z-index:10;animation:magma-hours-blink 2.4s ease-in-out infinite}
@media(min-width:640px){.magma-hours-blink{right:-24px}}
@media(prefers-reduced-motion:reduce){.magma-hours-blink{animation:none}}

/* O horário conserva dimensões próprias, independentemente da altura da foto. */
#sobre .magma-hours-blink{height:auto;min-height:0;width:max-content;max-width:calc(100% - 16px)}

/* MAGMA — ajustes exclusivos de fotografia para telemóvel */
@media (max-width: 639px) {
  [data-testid="page-home"] #hero-section-image {
    object-position: 68% center;
  }
  [data-testid="menu-banner"] .clip-frame {
    height: 34vh;
    min-height: 240px;
    max-height: 340px;
  }
  [data-testid="menu-banner"] .clip-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 67%;
    transform: scale(1.75);
    transform-origin: center 67%;
  }
}

/* MAGMA CAFFÈ — CORREÇÕES MOBILE */
@media (max-width: 639px) {

  /* 1. Capa principal: deslocar a fotografia */
  [data-testid="page-home"] #hero-section-image {
    object-position: 68% center;
  }

  /* 2. Menu Restaurante: ampliar a fotografia
     para ocultar as letras originais */
  [data-testid="menu-banner"] .clip-frame {
    height: 34vh;
    min-height: 240px;
    max-height: 340px;
    overflow: hidden;
  }

  [data-testid="menu-banner"] .clip-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 67%;
    transform: scale(2.42);
    transform-origin: center 67%;
  }

}
