/* ============================================
   CLARION — LANDING PAGE LAYOUT OVERRIDES
   ============================================ */

/* Base page tweaks */
body {
  background: var(--bg-light-grey-solid);
}

/* ============================================
   LAYOUT WRAPPERS
   ============================================ */
/* Fullscreen hero wrapper */
.landing__body--hero {
  position: relative;
  width: 100%;
  height: 100vh; /* full screen */
  overflow: hidden;
  background-color: var(--primary); /* fallback if image fails */
  top: -7em;
}

.banner__content > .button {
  outline-color: var(--accent);
}

/* Background hero image */
.landing__body--hero > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* fills, crops sides as needed */
}

/* ==========================
   MODERN HERO CAROUSEL (DROP-IN)
   ========================== */

/* DO NOT clip the root; it breaks sticky in some browsers */
html,
body {
  max-width: 100%;
  overflow-x: visible;
}

/* clip ONLY the hero carousel area */
.hero-modern,
.landing__body--hero {
  overflow-x: clip; /* or hidden */
}

.hero-modern {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden; /* IMPORTANT: clip children */
  background: var(--primary);
  top: -7em; /* keep your offset */
}

/* viewport = horizontal scroller */
.hero-modern__viewport {
  height: 100%;
  display: flex;
  flex-wrap: nowrap; /* no wrap */
  overflow-x: auto;
  overflow-y: hidden;

  /* snap */
  scroll-snap-type: x mandatory;

  /* iOS momentum scroll */
  -webkit-overflow-scrolling: touch;

  /* IMPORTANT: no hidden gaps */
  gap: 0;

  /* prevent flex children from forcing width weirdness */
  min-width: 100%;
  max-width: 100%;

  /* remove scrollbars */
  scrollbar-width: none;

  /* IMPORTANT: allow vertical scroll on touch; still allows horizontal in practice */
  touch-action: pan-y;

  /* make sure browser doesn't do smooth scroll and fight JS */
  scroll-behavior: auto;
}

.hero-modern__viewport::-webkit-scrollbar {
  display: none;
}

/* each slide is exactly viewport width */
.hero-modern__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;

  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;

  isolation: isolate;

  /* IMPORTANT: clip scaled image so it never bleeds */
  overflow: hidden;

  /* you said padding “fixes” it, but padding should be on overlay not slide */
  padding: 0;
}

/* image */
.hero-modern__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;

  /* if you keep scale, clip is handled by slide overflow hidden */
  transform: scale(1.02);

  /* reduce subpixel jitter that can create 1px overflow on some GPUs */
  backface-visibility: hidden;
  will-change: transform;
}

/* overlay */
.hero-modern__overlay {
  position: absolute;
  inset: 0;

  /* FLEX not GRID */
  display: flex;
  align-items: center;

  padding: clamp(1.25rem, 4vw, 3rem);

  background:
    radial-gradient(circle at 35% 40%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
}

/* your limiter container inside overlay */
.hero-modern__grid.limiter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5em;
  padding: 0 5em;
}

/* optional logo block */
.hero-modern__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-modern__logo {
  height: auto;
  max-height: 20em;
  opacity: 0.98;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
}

/* copy */
.hero-modern__copy {
  color: var(--white);
  text-align: left;
  max-width: 60ch;
}

.hero-modern__title {
  font-family: var(--ft-primary);
  font-weight: 700;
  color: var(--white);
  font-size: clamp(1.6rem, 2.6vw, 2.8rem);
  line-height: 1.12;
  margin-bottom: 0.4rem;
}

.hero-modern__subtitle {
  color: var(--white);
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  opacity: 0.95;
  margin-bottom: 1.25rem;
  max-width: 52ch;
}

.hero-modern__actions {
  margin-top: 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* --------------------------
   ARROWS (centered properly)
   -------------------------- */
.hero-modern__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;

  cursor: pointer;
  z-index: 80;
  user-select: none;
}

.hero-modern__arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-modern__arrow:active {
  transform: translateY(-50%) scale(0.98);
}

.hero-modern__arrow--prev {
  left: 16px;
  padding-left: 12px;
}
.hero-modern__arrow--next {
  right: 16px;
  padding-left: 15px;
}

/* --------------------------
   HUD
   -------------------------- */
.hero-modern__hud {
  position: absolute;
  left: 50%;
  bottom: 0.5em;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 3rem));
  z-index: 70;

  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(10px);

  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-modern__hud-progress {
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0.75;
  overflow: hidden;
}

.hero-modern__hud-progressbar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--bg-white);
}

/* dots row - position it consistently */
.hero-modern__hud-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  z-index: 75;

  width: max-content;
  max-width: calc(100% - 3rem);
}

.hero-modern__dot {
  position: relative;
  z-index: 80;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.hero-modern__dot.is-active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
}

/* optional dragging state */
.hero-modern__viewport.is-dragging,
.hero-modern__viewport.is-dragging * {
  user-select: none;
  cursor: grabbing;
}

/* Centered overlay for big logo */
.landing__body--hero--overlay {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem); /* breathing space on small screens */
  pointer-events: none; /* hero remains non-interactive */
}

/* Logo inside overlay */
.landing__body--hero--overlay img {
  width: 100%;
  max-width: 420px; /* desktop max size */
  height: auto;
}

/* Banner container */
.landing__body--banner {
  width: 100%;
  height: 260px;
  position: relative;
  background: var(--primary);
}

/* Background image */
.landing__body--banner .banner__img {
  position: absolute;
  top: 50%;
  right: 5em;
  transform: translateY(-50%);
  width: 30em;
  max-width: 25%;
  height: 80%;
  object-fit: contain;
  object-position: center;
  display: block;
  z-index: 1;
}

/* Text container */
.banner__content {
  position: relative;
  z-index: 2; /* on top of the banner image */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically centered */
  align-items: flex-start; /* change to center if needed */
  padding-left: 3rem;
  padding-right: 3rem;
  color: var(--white);
}

/* Title + subtitle styling */
.banner__content .title {
  font-family: var(--ft-primary);
  font-size: 3em;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--white);
}

.banner__content .subtitle {
  font-size: 1.5em;
  margin-bottom: 1.2em;
  color: var(--bg-white);
}

/* Featured */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.video-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  padding: 12px 14px;
  font-size: 14px;
  opacity: 0.85;
}

/* CTA Button */
.banner__content .button.open {
  color: var(--white);
  border: 1px solid var(--white);
  padding: 0.5rem 1.5em;
  border-radius: 30px;
  font-size: 0.9em;
  transition: 0.2s ease;
}

.banner__content .button.open:hover {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}

/* Main content wrapper */
.global__body--wrapper {
  min-height: 40vh;
  background: var(--bg-light-grey-solid);
}

/* ============================================
   HEADER RESPONSIVE OVERRIDES
   ============================================ */

header.fixed--marker {
  padding: 1.5em 3em;
  display: flex;
  align-items: center;
  gap: 1.5em;
  transition:
    background-color 0.3s ease-in-out,
    padding 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

header.fixed--marker.fixed {
  background: var(--primary);
}

/* When JS adds .fixed on scroll */
header.fixed--marker.fixed {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--primary);
  z-index: 150;
}

.header__logo {
  height: 3.5em;
  width: auto;
}

.header__subtitle {
  margin-left: 1em;
  font-family: var(--ft-primary);
  font-size: 1.2em;
  color: var(--white);
}

/* Desktop nav layout */
.header__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5em;
}

.header__nav a {
  font-family: var(--ft-primary);
  font-size: 0.95em;
  color: var(--white);
  position: relative;
  padding-bottom: 0.25em;
}

.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease-in-out;
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

/* ========================
   BURGER BUTTON RESET
   ======================== */

.header__toggle {
  /* kill any global button styles */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 0 auto;
  border-radius: 0 !important;
  min-width: 0 !important;

  position: relative;
  width: 32px;
  height: 24px;
  display: none; /* only shown on mobile */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200; /* above nav panel */
}

.header__toggle:focus {
  outline: none;
}

/* bars */
.header__toggle-bar {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
  transform: translateX(-50%);
  transition:
    transform 0.2s ease-in-out,
    opacity 0.2s ease-in-out,
    background 0.2s ease-in-out;
}

.header__toggle-bar:nth-child(1) {
  top: 4px;
}

.header__toggle-bar:nth-child(2) {
  top: 11px;
}

.header__toggle-bar:nth-child(3) {
  top: 18px;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  header.fixed--marker {
    padding: 1em 1.5em;
  }

  .header__subtitle {
    display: none;
  }
}

/* Mobile header + nav behavior */
@media (max-width: 768px) {
  .hero-modern__progress {
    bottom: 52px;
    width: min(420px, calc(100% - 2rem));
  }
  .video-grid {
    grid-template-columns: 1fr;
  }

  header.fixed--marker {
    padding: 0.75em 1.25em;
  }

  .header__logo {
    height: 3em;
  }

  /* show burger, hide nav by default */
  .header__toggle {
    display: inline-flex;
  }

  .header__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--primary);
    padding: 0.75em 1.25em 1em;
    flex-direction: column;
    gap: 0.75em;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.2s ease-out,
      opacity 0.2s ease-out;
  }

  /* When header has .menu-open (set by JS), show nav */
  header.fixed--marker.menu-open .header__nav {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .header__nav a {
    width: 100%;
    padding: 0.4em 0;
  }

  /* Burger animation when open */
  header.fixed--marker.menu-open .header__toggle-bar:nth-child(1) {
    transform: translate(-50%, 7px) rotate(45deg);
  }

  header.fixed--marker.menu-open .header__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  header.fixed--marker.menu-open .header__toggle-bar:nth-child(3) {
    transform: translate(-50%, -7px) rotate(-45deg);
  }
}

/* ============================================
   FOOTER RESPONSIVE OVERRIDES
   ============================================ */

footer {
  padding: 3em 10em 0;
  background: var(--primary-dark, var(--primary));
  color: var(--white);
}

/* ensure internal footer blocks respect layout */
footer .details,
footer .socials,
footer .legals {
  max-width: 1200px;
  margin: 0 auto;
}

/* Defaults probably already in main.css – here we mostly fix spacing */
footer .details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

footer .details__logo--logo-image {
  max-height: 56px;
  width: auto;
}

footer .details__logo--tagline {
  margin-top: 0.35em;
  font-size: 0.95em;
  opacity: 0.9;
}

footer .details__contacts {
  font-size: 0.9em;
  line-height: 1.5;
}

footer .details__contacts a {
  color: var(--accent-light, #ffd772);
}

/* Socials row */
footer .socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: center;
  align-items: center;
  padding: 1.5em 0;
  font-size: 0.9em;
}

footer .socials__item {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Legals row */
footer .legals {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25em 5em 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25em;
  font-size: 0.85em;
}

footer .legals__items a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Tablet footer tweaks */
@media (max-width: 1024px) {
  footer {
    padding: 2.5em 2.5em 0;
  }

  footer .details {
    padding-bottom: 1.25em;
  }

  footer .legals {
    padding-bottom: 2em;
  }
}

/* Mobile footer layout */
@media (max-width: 900px) {
  .landing__body--banner .banner__img {
    right: 50%;
    transform: translateX(50%);
    top: calc(100% - 10em);
  }

  .hero-modern__grid.limiter {
    flex-direction: column;
    align-items: center;
  }

  .hero-modern__brand {
    width: 100%;
    justify-content: center;
  }

  .hero-modern__copy {
    max-width: 100%;
    text-align: center;
  }
  .hero-modern__grid {
    flex-direction: column;
    text-align: center;
  }

  .hero-modern__actions {
    justify-content: center;
  }

  .hero-modern__arrow {
    display: none; /* swipe instead */
  }

  footer {
    padding: 2em 1.5em 0;
  }

  footer .details {
    flex-direction: column;
    gap: 1em;
    text-align: center;
  }

  footer .details__logo--logo {
    display: flex;
    justify-content: center;
  }

  footer .socials {
    justify-content: center;
    gap: 1em;
  }

  footer .legals {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75em;
    border-top-left-radius: 2em;
    border-top-right-radius: 2em;
  }

  footer .legals__items a {
    margin: 0 0.5em;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-modern__viewport {
    scroll-behavior: auto;
  }
}
