/* RAIM Group responsive preview layer.
   This file leaves the approved production baseline intact. */

:root {
  --preview-gutter: clamp(12px, 3.4vw, 56px);
  --preview-content: 1760px;
  --preview-reading: 760px;
  --preview-header-space: clamp(94px, 7vw, 110px);
}

html {
  overflow-x: clip;
}

body {
  min-width: 240px;
  overflow-x: clip;
}

.container,
.site-header .container {
  width: min(calc(100% - (var(--preview-gutter) * 2)), var(--preview-content));
  max-width: none;
  margin-inline: auto;
}

.site-header {
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}

.topbar {
  min-height: clamp(62px, 5.2vw, 78px);
}

.hero {
  min-height: calc(100svh - var(--preview-header-space));
  min-height: calc(100dvh - var(--preview-header-space));
  padding: 0;
}

/* Match the first desktop/tablet frame to the actual fixed-header offset. */
@media (min-width: 641px) {
  body.raim-operational .main-shell > .hero {
    min-height: calc(100svh - var(--raim-fixed-header-height));
    min-height: calc(100dvh - var(--raim-fixed-header-height));
  }
}

.hero-inner {
  min-height: inherit;
  align-items: flex-end;
  padding-block: clamp(48px, 8vh, 92px);
}

.hero-copy {
  width: min(780px, 100%);
  max-width: none;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 5vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy .lead {
  width: min(680px, 100%);
  max-width: none;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.62;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(3, 7, 12, 0.78) 0%, rgba(3, 7, 12, 0.44) 48%, rgba(3, 7, 12, 0.08) 80%),
    linear-gradient(0deg, rgba(3, 7, 12, 0.64) 0%, transparent 42%);
}

.hero-image {
  object-position: center 46%;
}

.section {
  padding-block: clamp(58px, 7vw, 112px);
}

.section-heading,
.section-copy {
  max-width: var(--preview-reading);
}

.section-heading h2,
.section-copy h2,
.coverage-panel h2 {
  font-size: clamp(2rem, 3.2vw, 4rem);
  line-height: 1.06;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.section-lead,
.section-copy p {
  max-width: 66ch;
}

.hero-stats,
.services-grid,
.scope-grid,
.industry-grid,
.project-grid,
.advantage-grid,
.process-grid,
.compliance-grid,
.manpower-grid,
.coverage-grid,
.data-grid {
  min-width: 0;
}

.hero-stats > *,
.services-grid > *,
.scope-grid > *,
.industry-grid > *,
.project-grid > *,
.advantage-grid > *,
.process-grid > *,
.compliance-grid > *,
.manpower-grid > *,
.coverage-grid > *,
.data-grid > * {
  min-width: 0;
}

.service-step,
.scope-card,
.industry-card,
.project-card,
.advantage-card,
.manpower-card,
.coverage-grid article,
.hero-stats article {
  border-radius: 6px;
}

.button,
.nav-cta {
  border-radius: 4px;
  letter-spacing: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

@media (min-width: 1800px) {
  .hero-copy h1 {
    font-size: clamp(4.5rem, 4.6vw, 6.4rem);
  }

  .section-heading h2,
  .section-copy h2,
  .coverage-panel h2 {
    max-width: 20ch;
  }
}

@media (max-width: 1100px) {
  .nav {
    gap: 14px;
  }

  .site-header .nav > a,
  .site-header .nav-item > a {
    font-size: 12px;
  }

  .hero-copy h1 {
    font-size: clamp(2.7rem, 7vw, 4.8rem);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    align-items: flex-end;
    padding-block: 44px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(3, 7, 12, 0.82) 0%, rgba(3, 7, 12, 0.28) 72%, rgba(3, 7, 12, 0.1) 100%),
      linear-gradient(90deg, rgba(3, 7, 12, 0.4), transparent 76%);
  }

  .hero-image {
    object-position: 58% center;
  }
}

@media (max-width: 640px) {
  :root {
    --preview-gutter: 16px;
    --preview-header-space: 90px;
  }

  .announcement-bar {
    display: none;
  }

  .hero-inner {
    padding-block: 32px;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 14vw, 4rem);
    max-width: 9ch;
  }

  .hero-copy .lead {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-copy .lead + .lead {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 320px);
  }

  .hero-actions .button {
    width: 100%;
    min-height: 46px;
  }

  .section {
    padding-block: 54px;
  }

  .section-heading h2,
  .section-copy h2,
  .coverage-panel h2 {
    font-size: clamp(1.8rem, 9.6vw, 2.8rem);
  }
}

/* Short informational sections can read as one viewport chapter on larger
   screens. min-height lets longer translations or zoomed text grow naturally. */
@media (min-width: 768px) and (min-height: 640px) {
  .main-shell > .viewport-chapter {
    min-height: calc(100svh - var(--preview-header-space));
    min-height: calc(100dvh - var(--preview-header-space));
    display: grid;
    align-items: center;
  }
}

@media (max-width: 360px) {
  :root {
    --preview-gutter: 12px;
  }

  .brand img,
  .site-header .brand img {
    max-width: 104px;
    height: auto;
  }

  .brand-text {
    display: none;
  }

  .hero-copy .eyebrow {
    font-size: 0.62rem;
    line-height: 1.4;
    letter-spacing: 0.12em;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 15vw, 3rem);
  }

  .hero-copy .lead {
    font-size: 0.9rem;
  }

  .section-contact-cta,
  .compact-intake__layout,
  .footer-layout {
    min-width: 0;
  }

  .button,
  .nav-cta {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@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;
  }
}
