/* ============================================================
   LAYOUT — Navigation, Hero, Footer, Page Hero, Grid
   ============================================================ */

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

/* Transparent nav (over hero) */
.nav--hero-page {
  background: transparent;
}
.nav--hero-page.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Light nav (inner pages) */
.nav--light {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.nav__brand-icon {
  width: 36px; height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: var(--weight-black);
  color: var(--color-white);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav__brand-text {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1.1;
}
.nav__brand-text span {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* On transparent hero nav, brand text is white */
.nav--hero-page:not(.scrolled) .nav__brand-text,
.nav--hero-page:not(.scrolled) .nav__brand-text span { color: var(--color-white); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-mid);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}
.nav__link:hover { color: var(--color-primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.active { color: var(--color-primary); }
.nav__link.active::after { transform: scaleX(1); }

/* On transparent hero nav, links are white */
.nav--hero-page:not(.scrolled) .nav__link { color: rgba(255,255,255,0.85); }
.nav--hero-page:not(.scrolled) .nav__link:hover { color: var(--color-white); }

.nav__cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.nav__hamburger:hover { background: var(--color-light); }
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav--hero-page:not(.scrolled) .nav__hamburger span { background: var(--color-white); }

/* Mobile menu overlay */
.nav__mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-white);
  z-index: 999;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-xl);
}
.nav__mobile-overlay.open { display: flex; }
.nav__mobile-close {
  align-self: flex-end;
  font-size: var(--text-xl);
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-sm);
  line-height: 1;
}
.nav__mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}
.nav__mobile-links a {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.nav__mobile-links a:hover { color: var(--color-primary); }
.nav__mobile-cta { margin-top: var(--space-2xl); }

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero/hero-main.jpg');
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero__bg.loaded { transform: scale(1); }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 30, 80, 0.78) 0%,
    rgba(26, 86, 219, 0.45) 60%,
    rgba(10, 30, 80, 0.30) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-xl) var(--space-3xl);
  width: 100%;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  color: var(--color-white);
  line-height: var(--leading-tight);
  max-width: 720px;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.02em;
}
.hero__title em {
  font-style: normal;
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2xl);
}

.hero__actions {
  display: flex;
  gap: var(--space-base);
  flex-wrap: wrap;
  align-items: center;
}

.hero__stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero__stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  color: var(--color-white);
  line-height: 1;
}
.hero__stat-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  margin-top: var(--space-xs);
}

/* ── Page Hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-xl) var(--space-2xl);
  text-align: center;
}
.page-hero h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}
.page-hero p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.80);
  max-width: 560px;
  margin: 0 auto;
}
.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.60);
  margin-bottom: var(--space-base);
}
.page-hero__breadcrumb a { color: rgba(255,255,255,0.80); transition: color var(--transition-fast); }
.page-hero__breadcrumb a:hover { color: var(--color-white); }
.page-hero__breadcrumb span { color: rgba(255,255,255,0.40); }

/* ── Grid System ──────────────────────────────────────────── */
.grid { display: grid; gap: var(--space-xl); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.75);
  padding: var(--space-4xl) 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
}
.footer__brand-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}
.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.55);
  max-width: 300px;
}
.footer__heading {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}
.footer__links { display: flex; flex-direction: column; gap: var(--space-md); }
.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer__links a:hover { color: var(--color-white); }
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-md);
}
.footer__contact-icon {
  font-size: var(--text-base);
  margin-top: 1px;
  flex-shrink: 0;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-lg) var(--space-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-base);
}
.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
}
.footer__w4b {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
}
.footer__w4b img { height: 18px; width: auto; opacity: 0.6; filter: brightness(0) invert(1); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .hero__title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero__stats { gap: var(--space-xl); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .section { padding: var(--space-3xl) 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-base); }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}
