/* PRF — loading identity, cinematic background and an unobtrusive header. */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #000a25;
  color: #f2c76c;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms ease, visibility 0s linear 320ms;
}
.is-loading .page-loader { opacity: 1; visibility: visible; pointer-events: auto; transition: none; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.loader-emblem { position: relative; display: grid; place-items: center; width: 190px; height: 190px; }
.loader-emblem:before { content: ''; position: absolute; inset: 0; border: 1px solid #e2a73124; border-radius: 50%; }
.loader-orbit { position: absolute; inset: 0; border: 1px solid transparent; border-top-color: #f2c76c; border-right-color: #e2a73160; border-radius: 50%; }
.loader-emblem img { width: 136px; height: 126px; object-fit: contain; }
.loader-name { text-align: center; font-size: 10px; line-height: 1.8; letter-spacing: .18em; font-weight: 500; color: #c7d0df; text-transform: uppercase; }
.loader-line { width: 112px; height: 2px; overflow: hidden; background: #ffffff14; }
.loader-line:after { content: ''; display: block; height: 100%; width: 100%; background: #d6b469; transform: scaleX(.35); transform-origin: left center; }

.site-header {
  position: fixed;
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: none;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.site-header.is-scrolled,
.site-header.is-menu-open {
  background: #000a25ed;
  border-bottom-color: #ffffff16;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 25px #000a2514;
  animation: none;
}
.site-header.is-menu-open { background: var(--navy); }

.hero .hero-photo {
  background-image: url('assets/video/hero-lisbon-poster.jpg');
  background-position: center;
  transform: none;
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}
.hero.has-video .hero-video { opacity: 1; }
.hero-shade {
  background: linear-gradient(90deg,#000a25ed 0%,#000a25c4 33%,#000a2550 75%,#000a2530),linear-gradient(0deg,#000a25c4 0%,transparent 50%,#000a2533);
}
.hero-video-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #ffffff42;
  border-radius: 30px;
  background: #000a2545;
  backdrop-filter: blur(6px);
  color: #e9edf4;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 200ms ease, border-color 200ms ease;
}
.hero-video-toggle:is(:hover,:focus-visible) { border-color: #e2a731; background: #000a25aa; }
.hero-video-toggle .icon { width: 16px; height: 16px; }
.hero-video-toggle .video-pause-icon { display: none; }
.hero-video-toggle[data-playing=true] .video-pause-icon { display: block; }
.hero-video-toggle[data-playing=true] .video-play-icon { display: none; }
.hero-foot-controls { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.hero-foot-controls > a {
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff42;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  transition: color 200ms ease, background 200ms ease;
}
.hero-foot-controls > a .icon { width: 18px; height: 18px; }
.hero-foot-controls > a:is(:hover,:focus-visible) { background: var(--gold); color: var(--navy); }

/* One contact control stays available throughout the page. Keep it outside
   animated sections so its fixed position always belongs to the viewport. */
:root {
  --prf-contact-size: 56px;
  --prf-contact-inset: 24px;
  --prf-contact-clearance: calc(var(--prf-contact-size) + var(--prf-contact-inset) + 20px + env(safe-area-inset-bottom, 0px));
}
html { scroll-padding-bottom: var(--prf-contact-clearance); }
.whatsapp-float {
  position: fixed;
  right: calc(var(--prf-contact-inset) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--prf-contact-inset) + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--prf-contact-size);
  padding: 14px 20px;
  border: 1px solid #f2c76c99;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 24px #000a2533, 0 1px 4px #000a251a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, box-shadow 180ms ease;
}
.whatsapp-float .icon { flex: none; width: 25px; height: 25px; }
.whatsapp-float:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px #fff, 0 4px 24px #000a2533;
}
.is-loading .whatsapp-float { visibility: hidden; }
.hero-foot, .site-footer { padding-bottom: var(--prf-contact-clearance); }

@media (hover: hover) {
  .whatsapp-float:hover { background: #f2c76c; box-shadow: 0 6px 28px #000a2540; }
}

@media (max-width: 760px) {
  :root { --prf-contact-inset: 16px; }
  .whatsapp-float { width: var(--prf-contact-size); height: var(--prf-contact-size); padding: 0; }
  .whatsapp-float-label { display: none; }
  .hero-video, .hero .hero-photo { object-position: 58% center; background-position: 58% center; }
  .hero-shade { background: linear-gradient(90deg,#000a25df,#000a25aa 55%,#000a2570),linear-gradient(0deg,#000a25eb,transparent 70%); }
  .hero-foot-controls { gap: 10px; }
  .hero-video-toggle { font-size: 9px; padding-inline: 12px; }
  .loader-emblem { width: 158px; height: 158px; }
  .loader-emblem img { width: 116px; height: 108px; }
}
@media (prefers-reduced-motion: no-preference) {
  .is-loading .loader-orbit { animation: prf-loader-orbit 1.1s linear infinite; }
  .is-loading .loader-line:after { animation: prf-loader-line 1.2s ease-in-out infinite alternate; }
}
@keyframes prf-loader-orbit { to { transform: rotate(360deg); } }
@keyframes prf-loader-line { from { transform: translateX(-65%); } to { transform: translateX(65%); } }
@media print {
  .page-loader, .hero-video, .hero-video-toggle, .whatsapp-float { display: none !important; }
  .site-header { display: none !important; }
  .hero-foot { padding-bottom: 24px; }
  .site-footer { padding-bottom: 30px; }
}
