/* ============================================
   LAYOUT — Navigation, Header, Footer, Grid (Light Theme)
   ============================================ */

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-lg) 0;
  transition: all var(--transition-base);
  background: transparent;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* On hero pages, nav starts transparent over dark image */
.nav--hero-page {
  background: transparent;
}

.nav--hero-page.scrolled {
  background: rgba(255, 255, 255, 0.97);
}

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

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav.scrolled .nav__brand {
  color: var(--color-text);
}

/* Light nav pages (non-hero) */
.nav--light .nav__brand {
  color: var(--color-text);
}

.nav__brand-icon {
  width: 34px;
  height: 34px;
  background: var(--color-primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--color-white);
  font-weight: 800;
  flex-shrink: 0;
}

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

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
  position: relative;
}

.nav.scrolled .nav__link {
  color: var(--color-text-mid);
}

.nav--light .nav__link {
  color: var(--color-text-mid);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-white);
}

.nav.scrolled .nav__link:hover,
.nav.scrolled .nav__link.active,
.nav--light .nav__link:hover,
.nav--light .nav__link.active {
  color: var(--color-text);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.01em;
}

.nav__cta:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.nav.scrolled .nav__toggle span,
.nav--light .nav__toggle span {
  background: var(--color-text);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section (full bleed, dark image) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.35) 40%,
    rgba(10, 10, 10, 0.65) 80%,
    rgba(10, 10, 10, 0.92) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 0 var(--space-xl);
}

.hero__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--space-xl);
  color: var(--color-white);
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-2xl);
  font-weight: 400;
  line-height: 1.65;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Page Hero (inner pages, light) --- */
.page-hero {
  padding: calc(80px + var(--space-4xl)) 0 var(--space-4xl);
  text-align: center;
  background: var(--color-off-white);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(184,134,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.page-hero__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.page-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Footer --- */
.footer {
  padding: var(--space-4xl) 0 var(--space-2xl);
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.footer__brand-text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 280px;
}

.footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--space-sm);
}

.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-primary-light);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  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.4);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.footer__w4b:hover {
  opacity: 0.8;
  color: rgba(255,255,255,0.4);
}

.footer__w4b img {
  height: 20px;
  width: auto;
  opacity: 0.55;
  filter: brightness(10);
  transition: opacity var(--transition-fast);
}

.footer__w4b:hover img {
  opacity: 0.8;
}

/* --- Grid Layouts --- */
.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); }

/* --- W4B Demo Badge (floating) --- */
.w4b-badge {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-decoration: none;
  z-index: 999;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.w4b-badge:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.w4b-badge img {
  height: 16px;
  width: auto;
}

.w4b-badge span {
  font-weight: 500;
}

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

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    z-index: 1000;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links .nav__link {
    font-size: var(--text-xl);
    color: var(--color-text);
  }

  .nav__links .nav__cta {
    font-size: var(--text-base);
    padding: 14px 32px;
  }

  .nav__toggle {
    display: flex;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .w4b-badge {
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-3xl) 0;
  }
}
