/* ABERO shared components */

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid rgba(9, 24, 46, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.site-header.is-scrolled {
  border-color: rgba(9, 24, 46, 0.04);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 34px rgba(9, 24, 46, 0.09);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.site-logo {
  width: auto;
  height: 46px;
  border-radius: 8px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #3d4a5d;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  white-space: nowrap;
}

.main-nav a.active {
  color: var(--magenta);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--gradient-main);
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--white);
  color: var(--text);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

/* Language controls */
.language-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft-white);
}

.mobile-language-switcher {
  display: none;
}

.language-option {
  min-width: 36px;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.language-option.is-active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 5px 14px rgba(14, 44, 90, 0.2);
}

.language-option:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.25);
  outline-offset: 2px;
}

.language-russian .main-nav {
  gap: 24px;
}

.language-spanish .main-nav {
  gap: 22px;
}

.language-russian .page-hero-inner h1,
.language-spanish .page-hero-inner h1 {
  max-width: 980px;
  font-size: clamp(3.05rem, 6vw, 5.8rem);
  letter-spacing: -0.045em;
}

/* Optional theme control */
.theme-toggle {
  width: 58px;
  height: 34px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
}

.theme-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
}

.theme-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 18px rgba(227, 46, 227, 0.5);
}

/* Buttons and text links */
.btn {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgba(36, 213, 242, 0.35);
  outline-offset: 3px;
}

.btn-primary {
  color: var(--white);
  background: var(--gradient-main);
  box-shadow: 0 16px 32px rgba(227, 46, 227, 0.28);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.32);
  background: transparent;
  color: inherit;
}

.btn-light {
  border-color: var(--border);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(9, 24, 46, 0.06);
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

/* Section labels */
.section-pill {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(22, 119, 255, 0.25);
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.08);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1.25;
  text-transform: uppercase;
}

.section-pill span {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.section-pill-dark {
  border-color: rgba(36, 213, 242, 0.32);
  background: rgba(36, 213, 242, 0.09);
  color: var(--cyan);
}

/* Interior-page hero */
.page-hero {
  position: relative;
  height: clamp(1500px, 65svh, 720px);
  max-height: calc(100svh - var(--header-height));
  min-height: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.page-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      90deg,
      rgba(6, 21, 43, 0.58) 0%,
      rgba(6, 21, 43, 0.38) 42%,
      rgba(6, 21, 43, 0.05) 72%,
      rgba(6, 21, 43, 0.14) 100%
    ),
    linear-gradient(0deg, rgba(6, 21, 43, 0.2), transparent 48%);
  pointer-events: none;
}

.page-hero-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  padding-top: clamp(72px, 8vw, 112px);
  padding-bottom: clamp(68px, 7vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.page-hero-inner h1 {
  max-width: 900px;
  margin-bottom: 26px;
  color: var(--white);
  font-size: clamp(3.5rem, 7vw, 6.8rem);
}

.page-hero-inner > p {
  max-width: 720px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.22rem;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Metrics */
.metric-band {
  padding: 0;
  background: var(--navy);
  color: var(--white);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid article {
  min-width: 0;
  min-height: 138px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-grid article:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-grid strong {
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 1.55rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-grid span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

/* Shared content layouts */
.content-section {
  position: relative;
}

.content-copy h2 {
  max-width: 690px;
}

.content-copy > p {
  max-width: 680px;
}

.section-heading {
  margin-bottom: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: end;
  gap: 60px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 520px;
  justify-self: end;
}

/* Shared image frames */
.image-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 24px;
  background: var(--navy-2);
  box-shadow: var(--shadow-soft);
}

.image-frame img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.image-frame-tall img {
  height: 620px;
}

.image-frame-small img {
  height: 260px;
}

.image-frame figcaption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(6, 21, 43, 0.78);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

/* Carousels */
.carousel {
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(9, 24, 46, 0.15);
  transform: translateY(-50%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.carousel-btn:hover {
  box-shadow: 0 16px 34px rgba(9, 24, 46, 0.22);
  transform: translateY(-50%) scale(1.04);
}

.carousel-btn:focus-visible,
.carousel-dot:focus-visible {
  outline: 3px solid rgba(36, 213, 242, 0.55);
  outline-offset: 3px;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 6;
  max-width: calc(100% - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(-50%);
}

.carousel-dots button,
.carousel-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}

.carousel-dots button.active,
.carousel-dot.active {
  width: 30px;
  background: var(--magenta);
}

/* Forms */
.contact-form {
  padding: 36px;
  border-radius: 22px;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-dark);
}

.contact-form h3 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

.contact-form p {
  margin-bottom: 28px;
  font-size: 0.98rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form label {
  display: block;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--white);
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 4px rgba(227, 46, 227, 0.12);
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0 !important;
  color: var(--blue) !important;
  font-size: 0.88rem !important;
  font-weight: 750;
}

/* Call to action */
.page-cta {
  padding: 72px 0;
  background:
    radial-gradient(circle at 82% 25%, rgba(227, 46, 227, 0.16), transparent 32%),
    var(--navy-2);
  color: var(--white);
}

.page-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.page-cta-inner > div {
  min-width: 0;
}

.page-cta h2 {
  max-width: 760px;
  margin: 0;
  color: var(--white);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.cta-kicker {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  padding: 58px 0 26px;
  background: #092147;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 50px;
}

.footer-grid > * {
  min-width: 0;
}

.footer-logo {
  width: 108px;
  height: auto;
  margin-bottom: 18px;
  border-radius: 8px;
}

.site-footer h3 {
  margin-bottom: 16px;
  color: var(--white);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer p,
.site-footer a {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.88rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 11, 24, 0.76);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  margin: 40px auto;
  padding: 34px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-dark);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
}

.modal-content h2 {
  padding-right: 40px;
  font-size: 2rem;
}

.modal-gallery {
  overflow: hidden;
  margin-top: 24px;
  border-radius: 16px;
}

.modal-gallery img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* Shared motion */
.hero-bg-slide img {
  transform: scale(1.035) translate3d(0, var(--hero-parallax, 0), 0);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
      opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .motion-ready [data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .motion-ready .page-hero-inner > [data-reveal],
  .motion-ready .hero-copy-block > [data-reveal] {
    transform: translate3d(-24px, 0, 0);
  }

  .motion-ready .page-hero-inner > [data-reveal].is-visible,
  .motion-ready .hero-copy-block > [data-reveal].is-visible {
    transform: translate3d(0, 0, 0);
  }

  .motion-ready .manufacturing-flow-path {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    transition: stroke-dashoffset 1.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s;
  }

  .motion-ready .manufacturing-flow.is-visible .manufacturing-flow-path {
    stroke-dashoffset: 0;
  }
}

/* Tablet navigation */
@media (max-width: 1100px) {
  .main-nav {
    gap: 20px;
  }

  .language-russian .main-nav,
  .language-spanish .main-nav {
    gap: 16px;
    font-size: 0.94rem;
  }

  .image-frame-tall img {
    height: 520px;
  }
}

/* Collapsed navigation */
@media (max-width: 980px) {
  .site-header {
    height: auto;
    min-height: var(--header-height);
  }

  .header-inner {
    min-height: var(--header-height);
    flex-wrap: wrap;
    gap: 12px;
  }

  .mobile-menu-toggle {
    display: block;
    margin-left: 0;
  }

  .mobile-language-switcher {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions {
    display: none;
  }

  .main-nav,
  .language-russian .main-nav,
  .language-spanish .main-nav {
    width: 100%;
    display: none;
    padding: 16px 0 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    order: 5;
    font-size: 1rem;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a.active::after {
    width: 40px;
  }

  .main-nav .language-switcher {
    display: none;
  }

  .site-logo {
    height: 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }
}

/* Mobile layouts */
@media (max-width: 820px) {
  .page-hero {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .page-hero-media {
    position: static;
    height: auto;
    object-fit: contain;
    transform: none;
    will-change: auto;
  }

  .page-hero-shade {
    display: none;
  }

  .page-hero-inner {
    position: relative;
    inset: auto;
    min-height: 0;
    margin-inline: auto;
    padding-top: 34px;
    padding-bottom: 44px;
    justify-content: flex-start;
  }

  .page-hero-inner h1,
  .language-russian .page-hero-inner h1,
  .language-spanish .page-hero-inner h1 {
    max-width: 100%;
    margin-bottom: 20px;
    font-size: clamp(2.15rem, 8vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
  }

  .page-hero-inner > p {
    max-width: 100%;
    margin-bottom: 24px;
    font-size: 1rem;
  }

  .page-hero-inner > :last-child {
    margin-bottom: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid article {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .metric-grid article:nth-child(2n) {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .section-heading {
    margin-bottom: 34px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .section-heading > p {
    max-width: 680px;
    justify-self: start;
  }

  .image-frame img,
  .image-frame-tall img {
    height: min(68vw, 480px);
  }

  .image-frame-small img {
    height: min(58vw, 330px);
  }

  .page-cta-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 30px;
  }

  .page-cta h2 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: calc(100dvh - 32px);
    margin: 16px auto;
  }

  .modal-gallery img {
    height: min(62vw, 330px);
  }
}

/* Small phones */
@media (max-width: 520px) {
  .container {
    width: calc(100% - 28px);
  }

  section {
    padding: 52px 0;
  }

  .site-logo {
    height: 38px;
  }

  .section-pill {
    margin-bottom: 18px;
    padding: 7px 14px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .page-hero-inner {
    padding-top: 28px;
    padding-bottom: 36px;
  }

  .page-hero-inner h1,
  .language-russian .page-hero-inner h1,
  .language-spanish .page-hero-inner h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .page-hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid article,
  .metric-grid article:nth-child(2n),
  .metric-grid article:last-child {
    min-height: 112px;
    padding: 24px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .image-frame,
  .contact-form,
  .modal-content {
    border-radius: 18px;
  }

  .image-frame img,
  .image-frame-tall img,
  .image-frame-small img {
    height: min(82vw, 360px);
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  .carousel-prev {
    left: 12px;
  }

  .carousel-next {
    right: 12px;
  }

  .carousel-dots {
    bottom: 12px;
    max-width: calc(100% - 100px);
    gap: 5px;
  }

  .carousel-dots button,
  .carousel-dot {
    width: 8px;
    height: 5px;
  }

  .carousel-dots button.active,
  .carousel-dot.active {
    width: 22px;
  }

  .contact-form {
    padding: 26px 20px;
  }

  .page-cta {
    padding: 56px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer {
    padding-top: 48px;
  }

  .modal-content {
    width: calc(100% - 24px);
    padding: 26px 20px;
  }

  .modal-content h2 {
    padding-right: 36px;
    font-size: 1.65rem;
  }

  .modal-gallery img {
    height: 64vw;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg-slide img,
  .page-hero-media {
    transform: none;
  }
}
