html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --rayonex-nav-height: 73px;
}

html {
  scroll-padding-top: calc(var(--rayonex-nav-height) + 16px);
}

main#main {
  padding-top: var(--rayonex-nav-height);
}

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  width: 100%;
  z-index: 150;
}

.skip-link {
  z-index: 180;
}

.hero .gridbg {
  opacity: .5;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 70% 30%, black 30%, transparent 75%);
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-grid > .reveal:first-child {
  position: relative;
  z-index: 1;
}

.quote-card {
  position: relative;
  background: transparent;
  z-index: 1;
}

.quote-card input,
.quote-card textarea,
.quote-card select,
.quote-card .seg span {
  background: #fff;
}

.quote-card .seg input:checked + span {
  background: #fff7ec;
}

.gallery-main {
  cursor: zoom-in;
}

.gallery-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 37, 95, .14);
  font: 600 12px/1 Inter, sans-serif;
  cursor: zoom-in;
  backdrop-filter: blur(8px);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.gallery-zoom:hover {
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 37, 95, .18);
  transform: translateY(-1px);
}

.gallery-zoom:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

html.gallery-lightbox-open,
html.gallery-lightbox-open body {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 72px 36px 36px;
  background: rgba(0, 18, 46, .84);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(12px);
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .18s ease, visibility 0s linear 0s;
}

.gallery-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  max-width: min(1120px, 92vw);
  max-height: 82vh;
  margin: 0;
  cursor: default;
}

.gallery-lightbox__image {
  width: auto;
  height: auto;
  max-width: min(1120px, 92vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .42);
}

.gallery-lightbox__close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.gallery-lightbox__close:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.04);
}

.gallery-lightbox__close:focus-visible,
.gallery-lightbox__arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.gallery-lightbox__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform .16s ease, background .16s ease;
}

.gallery-lightbox__arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.gallery-lightbox__arrow--prev {
  left: 16px;
}

.gallery-lightbox__arrow--next {
  right: 16px;
}

.gallery-lightbox__counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 37, 95, .82);
  color: #fff;
  font: 11px/1 JetBrains Mono, monospace;
  letter-spacing: .06em;
  pointer-events: none;
}

@media (max-width: 560px) {
  .gallery-zoom {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
  }

  .gallery-zoom span {
    display: none;
  }

  .gallery-lightbox {
    padding: 64px 16px 24px;
  }

  .gallery-lightbox__image {
    max-width: calc(100vw - 32px);
    max-height: 78vh;
  }

  .gallery-lightbox__close {
    top: 10px;
    right: 10px;
  }

  .gallery-lightbox__arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 560px) {
  .container {
    padding-inline: 24px;
  }

  .nav-inner {
    gap: 12px;
  }

  .nav-cta {
    gap: 8px;
  }

  .nav-cta > .btn {
    display: none;
  }

  .lang-switch {
    margin-inline-start: 0;
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .hero h1 {
    font-size: clamp(38px, 13vw, 54px);
    line-height: 1.08;
  }

  .hero p.lead {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 40px;
  }

  .hero-stats .stat,
  html[dir=rtl] .hero-stats .stat {
    padding: 0;
  }

  .quote-card,
  .contact-form {
    padding: 22px;
  }

  section {
    padding: 72px 0;
  }
}
