/* RNB motion system: page transitions, hero entrances, parallax, scroll reveals */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .25s ease both moVtOut; }
::view-transition-new(root) { animation: .5s cubic-bezier(.2,.7,.2,1) both moVtIn; }
.site-header { view-transition-name: rnb-header; }
::view-transition-group(rnb-header) { animation-duration: 0s; }
@keyframes moVtOut { to { opacity: 0; } }
@keyframes moVtIn { from { opacity: 0; } }
@keyframes moUp { from { opacity: 0; transform: translate3d(0, 34px, 0); } to { opacity: 1; transform: none; } }
@keyframes moRise { from { opacity: 0; transform: translate3d(0, 46px, 0); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes moFade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  main { animation: moFade .8s ease both; }

  /* Hero entrances */
  .rnb-hero__label { animation: moUp .8s cubic-bezier(.2,.7,.2,1) .1s both; }
  .rnb-hero h1 span { animation: moRise 1s cubic-bezier(.2,.7,.2,1) both; }
  .rnb-hero h1 span:nth-child(1) { animation-delay: .2s; }
  .rnb-hero h1 span:nth-child(2) { animation-delay: .36s; }
  .rnb-hero h1 span:nth-child(3) { animation-delay: .52s; }
  .rnb-hero__summary { animation: moUp 1s cubic-bezier(.2,.7,.2,1) .75s both; }
  .rnb-hero__base { animation: moFade 1.2s ease 1s both; }
  .pg-hero__in > * { animation: moUp .9s cubic-bezier(.2,.7,.2,1) both; }
  .pg-hero__in > :nth-child(1) { animation-delay: .05s; }
  .pg-hero__in > :nth-child(2) { animation-delay: .15s; }
  .pg-hero__in > :nth-child(3) { animation: moRise 1s cubic-bezier(.2,.7,.2,1) .28s both; }
  .pg-hero__in > :nth-child(4) { animation-delay: .5s; }
  .pg-hero__in > :nth-child(5) { animation-delay: .64s; }
  .interior-mast h1, .interior-mast .breadcrumb { animation: moUp .9s cubic-bezier(.2,.7,.2,1) both; }
  .interior-intro { animation: moUp .9s cubic-bezier(.2,.7,.2,1) .25s both; }
  .interior-cover { animation: moUp 1s cubic-bezier(.2,.7,.2,1) .4s both; }

  /* Parallax photos (driven by rnb-motion.js) */
  .mo-on [data-px] { transform: translate3d(0, var(--py, 0px), 0) scale(1.14); will-change: transform; }
  .mo-on .rnb-hero__scene, .mo-on .pg-hero, .mo-on .cvg { overflow: clip; }

  /* Scroll reveals */
  .mo-on .mo { opacity: 0; transform: translate3d(0, var(--mo-y, 30px), 0); transition: opacity .9s cubic-bezier(.2,.7,.2,1) var(--mo-d, 0ms), transform 1s cubic-bezier(.2,.7,.2,1) var(--mo-d, 0ms), clip-path 1.2s cubic-bezier(.2,.7,.2,1) var(--mo-d, 0ms); will-change: opacity, transform; }
  .mo-on .mo.mo-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  .mo-on .mo[data-mo="img"] { --mo-y: 18px; clip-path: inset(7% 5% 7% 5%); }
  .mo-on .mo[data-mo="head"] { --mo-y: 22px; }

  /* Header + progress */
  .site-header { transition: box-shadow .35s ease; }
  .site-header.is-scrolled { box-shadow: 0 12px 32px rgb(0 0 0 / .28); }
  .mo-progress { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #e0b240, #f6d98a); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

  /* Button press feel */
  .btn:active, .pg-btn:active, .mgd-cta:active, .cvg-btn:active { transform: translateY(1px) scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Glass buttons: gold and white ---------- */
html .gbtn { --lift: .3rem; --mx: 0px; --my: 0px; --k: .12; position: relative; isolation: isolate; background: transparent !important; border-color: transparent !important; box-shadow: none !important; transition: translate .2s ease, color .2s; }
html .gbtn--gold { --sub: linear-gradient(135deg, #f2a33a 0%, #e9b648 48%, #f8dc8a 100%); --sub-shadow: 0 6px 16px rgb(233 182 72 / .32); color: #0c1c26 !important; }
html .gbtn--white { --sub: linear-gradient(135deg, #ffffff 0%, #e9ecef 52%, #cdd3d8 100%); --sub-shadow: 0 6px 16px rgb(0 0 0 / .22); color: #0c1c26 !important; }
.gbtn::after { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: var(--sub); box-shadow: var(--sub-shadow); transition: transform .22s ease; }
.gbtn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 171 171' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(rgb(255 255 255 / .34), rgb(255 255 255 / .34)); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .75); transition: opacity .22s ease; }
@media (hover: hover) {
  .gbtn:hover, .gbtn:focus-visible { translate: 0 calc(var(--lift) * -1); }
  .gbtn:hover::before, .gbtn:focus-visible::before { opacity: 1; }
  .gbtn:hover::after, .gbtn:focus-visible::after { transform: translate(calc(var(--mx) * var(--k) * -1), calc(var(--lift) + var(--my) * var(--k) * -1)) scale(.95); }
}
.gbtn:active { translate: 0 -.15rem; }
.gbtn:active::before { opacity: 1; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.gbtn:active::after { transform: translate(0, .15rem) scale(.9); }
.gbtn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { html .gbtn, .gbtn::before, .gbtn::after { transition: none; } .gbtn:hover, .gbtn:active { translate: none; } }

/* ---------- Alarm icon: dome rocks like a ringing alarm, rays pulse in and out (icon size unchanged) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .alarm-icon .al-body { transform-box: view-box; transform-origin: 12px 18px; animation: al-ring 3.2s ease-in-out infinite; }
  .alarm-icon .al-rays { transform-box: view-box; transform-origin: 12px 13px; animation: al-pulse 3.2s ease-in-out infinite; }
  .rnb-hero__response:hover .al-body, .rnb-hero__response:focus-within .al-body { animation-duration: 1s; }
  .rnb-hero__response:hover .al-rays, .rnb-hero__response:focus-within .al-rays { animation-duration: 1s; }
}
@keyframes al-ring {
  0%, 45%, 100% { transform: rotate(0); }
  50% { transform: rotate(-11deg); } 56% { transform: rotate(10deg); } 62% { transform: rotate(-8deg); }
  68% { transform: rotate(6deg); } 74% { transform: rotate(-3deg); } 80% { transform: rotate(0); }
}
@keyframes al-pulse {
  0%, 45%, 100% { transform: scale(1); opacity: 1; }
  52% { transform: scale(.7); opacity: .55; } 60% { transform: scale(1.06); opacity: 1; }
  68% { transform: scale(.78); opacity: .65; } 76% { transform: scale(1.03); opacity: 1; }
}
