/* Landing page — unified design system (reference structure + RDA brand) */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --primary: #003d7a;
  --primary-light: #0056b3;
  --primary-dark: #0a2540;
  --primary-pale: #e8f1fb;
  --accent: #c62828;
  --accent-light: #e53935;
  --accent-pale: #fdecea;
  --text: #1a2b3c;
  --text-muted: #6b7c8d;
  --border: #dde3ea;
  --shadow: 0 8px 32px rgba(0, 61, 122, 0.08);
  --shadow-hover: 0 16px 48px rgba(0, 61, 122, 0.12);
  --tricolor: linear-gradient(90deg, #fff 0%, #fff 33.33%, var(--primary-light) 33.33%, var(--primary-light) 66.66%, var(--accent) 66.66%);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --header-h: 72px;
  --header-offset: 88px;
  --section-py: clamp(72px, 9vw, 108px);
  --container: min(1120px, 100% - 48px);
}

body {
  background: var(--bg);
}

.container {
  max-width: 1120px;
  padding: 0 24px;
}

/* ── Compact landing header ── */
.site-header--landing {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, box-shadow 0.25s, border-color 0.25s, backdrop-filter 0.3s;
}

.site-header--landing:not(.is-scrolled) .logo-text strong,
.site-header--landing:not(.is-scrolled) .logo-text span,
.site-header--landing:not(.is-scrolled) .nav-links a,
.site-header--landing:not(.is-scrolled) .header-phone {
  color: #fff;
}

.site-header--landing:not(.is-scrolled) .nav-links a:hover,
.site-header--landing:not(.is-scrolled) .nav-links a.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.site-header--landing:not(.is-scrolled) .logo-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.site-header--landing.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

.site-header--landing.is-scrolled .logo-text strong,
.site-header--landing.is-scrolled .nav-links a,
.site-header--landing.is-scrolled .header-phone {
  color: inherit;
}

.site-header--landing::after {
  content: '';
  display: block;
  height: 3px;
  background: var(--tricolor);
}

.site-header--landing .header-top,
.site-header--landing .slogan-box { display: none; }

.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.site-header--landing .logo-text strong { font-size: 13px; }
.site-header--landing .logo-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }

.site-header--landing .main-nav {
  justify-content: center;
  border: none;
  padding: 0;
}

.site-header--landing .nav-links a {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border-bottom: 2px solid transparent;
}

.site-header--landing .nav-links a:hover,
.site-header--landing .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.header-bar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.site-header--landing .nav-toggle { display: none; }

/* ── Hero — full-width banner (Nord Clan style) ── */
.hero--banner {
  position: relative;
  min-height: clamp(400px, 66vh, 620px);
  padding: 0;
  display: flex;
  align-items: stretch;
  background: var(--primary-dark);
  overflow: hidden;
}

.hero--banner::before,
.hero--banner::after {
  display: none;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 45%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 37, 64, 0.2) 0%, rgba(10, 37, 64, 0.25) 40%, rgba(10, 37, 64, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 37, 64, 0.15) 0%, transparent 40%, rgba(10, 37, 64, 0.45) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: inherit;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 36px) 24px 44px;
}

.hero__panel {
  max-width: 560px;
  margin-left: auto;
}

.hero__brand {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hero--banner .hero-desc {
  font-size: clamp(15px, 1.45vw, 17px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  max-width: 480px;
  min-height: auto;
}

.hero--banner .hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 0;
}

.btn--hero {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  flex: 0 1 auto;
  padding: 12px 14px 12px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}

.btn--hero:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  color: #fff;
}

.btn--hero-accent {
  border-color: rgba(198, 40, 40, 0.85);
  background: rgba(198, 40, 40, 0.15);
}

.btn--hero-accent:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 15px;
  line-height: 1;
}

/* Legacy hero (other pages) */
.hero {
  padding: 48px 0 var(--section-py);
  background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary) 52%, #0d2f52 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 85% 35%, rgba(0, 86, 179, 0.28) 0%, transparent 52%),
    radial-gradient(ellipse at 10% 90%, rgba(198, 40, 40, 0.12) 0%, transparent 45%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--tricolor);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 20px;
  min-height: 2.2em;
}

.hero-desc {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 32px;
  max-width: 480px;
  min-height: 4.5em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__content { min-width: 0; }

.hero-copy {
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.hero__media {
  width: 100%;
  min-width: 0;
}

.media-frame {
  background: var(--bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero .media-frame--hero {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.media-frame--hero {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame--hero img { object-fit: cover; }

.integrator-card__img {
  object-fit: contain;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg);
}

.integrator-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-white);
  box-shadow: var(--shadow);
}

.integrator-icon-wrap--brand {
  width: 160px;
  height: 160px;
  margin: 0;
  border: 3px solid var(--border);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.integrator-icon-wrap--brand img {
  object-fit: contain;
  padding: 12px;
  background: #fff;
}

.director-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.partner-item img {
  width: auto;
  max-width: 100%;
  max-height: 56px;
  height: auto;
  object-fit: contain;
}

.hero-tabs { margin-bottom: 24px; }

.hero-tab {
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
}

.hero-tab:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.hero-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hero-arrow {
  border-radius: 12px;
  width: 40px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ── Buttons ── */
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.35);
}

.hero .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--primary-pale);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ── Sections spacing ── */
main > section { scroll-margin-top: var(--header-offset); }

.section {
  padding: var(--section-py) 0;
}

.section--white { background: var(--surface); }
.section--grey { background: var(--bg); }
.section--hidden { display: none !important; }

.section-title {
  text-transform: none;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-desc { max-width: 640px; }

/* ── Values strip ── */
.values-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.value-item { padding: 36px 24px; }

.values-strip--3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

.case-cards--single {
  max-width: 960px;
  margin: 0 auto;
}

.case-cards--single .case-card {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
  .case-cards--single .case-card {
    grid-template-columns: 1fr;
  }
}

.partners-info__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.partners-info__card {
  padding: 32px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.25s ease;
}

.partners-info__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--accent);
}

.partners-info__card h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 12px;
}

.partners-info__card p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .partners-info__grid { grid-template-columns: 1fr; }
  .values-strip--3 { grid-template-columns: 1fr !important; }
}

/* ── Showcase / cards ── */
.showcase-row { gap: clamp(32px, 5vw, 56px); }

.media-card,
.integrator-card,
.director-card,
.case-card,
.service-tile,
.process-step,
.pricing-card,
.stat-card {
  border-radius: var(--radius-lg);
}

.case-card__media,
.case-card__media img {
  background: var(--bg);
  min-height: 260px;
}

.case-card__media img { object-fit: contain; padding: 12px; background: var(--bg); }

.showcase-row__media .media-frame img { object-fit: contain; }

.contact-form__title {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 20px;
}

.form-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .form-row--3 { grid-template-columns: 1fr; }
}

/* ── Warehouse — no photo bg, clean cards ── */
.warehouse-section {
  padding: var(--section-py) 0;
  background: var(--surface);
}

.warehouse-section__bg,
.warehouse-section__overlay { display: none; }

.warehouse-section .section-title,
.warehouse-section .section-desc { color: var(--text); }

#technologies .stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  #technologies .stats-grid { grid-template-columns: 1fr; }
}

/* ── Partners ── */
.partners-grid { gap: 16px; }

.partner-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  min-height: 130px;
}

/* ── Contact ── */
.contact-project {
  padding: var(--section-py) 0;
  background: var(--bg);
}

.contact-cards { gap: 20px; }

.contact-card {
  border-radius: var(--radius-xl);
}

/* ── Reveal — hero always visible ── */
.hero__media,
.hero__content { opacity: 1 !important; transform: none !important; }

/* ── Mobile nav ── */
@media (max-width: 960px) {
  .header-bar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    position: relative;
  }

  .site-header--landing .logo-block {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    text-align: left;
  }

  .site-header--landing .logo-text {
    text-align: left;
  }

  .header-bar__actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-header--landing .nav-toggle {
    display: flex;
  }

  .site-header--landing .nav-toggle span {
    transition: transform 0.28s ease, opacity 0.2s ease;
  }

  .site-header--landing.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header--landing.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header--landing.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header--landing .main-nav {
    position: fixed;
    top: calc(var(--header-h) + 3px);
    left: 0;
    right: 0;
    z-index: 299;
    width: 100%;
    padding: 12px 24px 0;
    margin: 0;
    border: none;
    pointer-events: none;
  }

  .site-header--landing .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 56px rgba(10, 37, 64, 0.18);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px);
    padding: 0;
    margin: 0;
    pointer-events: none;
    transition:
      max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.28s ease,
      transform 0.28s ease,
      padding 0.28s ease;
  }

  .site-header--landing .nav-links a,
  .site-header--landing:not(.is-scrolled) .nav-links a {
    color: var(--text);
    border-bottom: none;
    padding: 14px 16px;
    font-size: 15px;
  }

  .site-header--landing .nav-links a:hover,
  .site-header--landing .nav-links a.active,
  .site-header--landing:not(.is-scrolled) .nav-links a:hover,
  .site-header--landing:not(.is-scrolled) .nav-links a.active {
    color: var(--primary);
    background: var(--primary-pale);
    border-bottom: none;
  }

  .site-header--landing .nav-links li + li {
    border-top: 1px solid var(--border);
  }

  .site-header--landing.nav-open .main-nav {
    pointer-events: auto;
  }

  .site-header--landing.nav-open .nav-links {
    max-height: min(72vh, 420px);
    opacity: 1;
    transform: translateY(0);
    padding: 8px;
    pointer-events: auto;
  }

  .site-header--landing::before {
    content: '';
    position: fixed;
    inset: 0;
    top: calc(var(--header-h) + 3px);
    z-index: 298;
    background: rgba(10, 37, 64, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .site-header--landing.nav-open::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header-phone { display: none; }

  .hero--banner .hero__inner {
    display: grid;
    grid-template-rows: minmax(180px, 1fr) auto;
    align-content: end;
    justify-content: stretch;
    padding-top: calc(var(--header-h) + 12px);
    padding-bottom: 28px;
  }

  .hero--banner .hero__panel {
    grid-row: 2;
    max-width: 100%;
    margin-left: 0;
    margin-top: 0;
  }

  .hero--banner .hero__bg img {
    object-position: 26% 42%;
  }

  .hero--banner .hero__overlay {
    background:
      linear-gradient(180deg, rgba(10, 37, 64, 0.08) 0%, rgba(10, 37, 64, 0.2) 38%, rgba(10, 37, 64, 0.72) 100%),
      linear-gradient(90deg, rgba(10, 37, 64, 0.15) 0%, transparent 55%, rgba(10, 37, 64, 0.45) 100%);
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__media { order: -1; }

  .hero-copy { min-height: auto; }
  .hero h1, .hero-desc { min-height: auto; }

  .hero { padding-top: 32px; }
}

body.nav-menu-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .header-bar__actions .btn { display: none; }

  .hero--banner {
    min-height: clamp(520px, 82vh, 660px);
  }

  .hero--banner .hero__inner {
    grid-template-rows: minmax(210px, 1.1fr) auto;
    padding-bottom: 22px;
  }

  .hero--banner .hero__brand {
    font-size: clamp(34px, 9vw, 44px);
    margin-bottom: 8px;
  }

  .hero--banner .hero-desc {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .hero--banner .hero__bg img {
    object-position: 22% 40%;
  }

  .hero--banner .btn--hero {
    padding: 10px 12px 10px 14px;
    font-size: 13px;
  }

  .hero--banner .btn__arrow {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .hero--banner .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero--banner .btn--hero {
    flex: 1 1 auto;
    min-width: min(100%, 200px);
  }

  .section-head--row { flex-direction: column; align-items: flex-start; }

  .pricing-grid { grid-template-columns: 1fr !important; }
  .service-grid { grid-template-columns: 1fr !important; }
  .process-grid { grid-template-columns: 1fr !important; }
  .process-step--wide { max-width: none !important; }
  .showcase-row { grid-template-columns: 1fr !important; }
  .contact-cards { grid-template-columns: 1fr !important; }
  .values-strip { grid-template-columns: 1fr !important; }
  .value-item { border-right: none !important; border-bottom: 1px solid var(--border); }
}

@media (min-width: 961px) {
  .hero__grid {
    min-height: 420px;
  }

  .media-frame--hero {
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
