/* =============================================================================
   COMPONENTS.CSS — CR8TIF Shared Components
   Header, footer, buttons, sections, marquee, cards, mobile nav
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Header — Fixed, glassmorphism
   --------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem var(--side-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.header--scrolled {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: rgba(245, 240, 232, 0.97);
  border-bottom: 1px solid var(--gold-dim);
}

.header__logo {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 101;
}

.header__logo img {
  height: 48px;
  width: auto;
}

/* Desktop navigation */
.header__nav {
  display: flex;
  gap: 3.25rem;
  list-style: none;
}

.header__nav a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header__nav a:hover,
.header__nav a.is-active {
  color: var(--text);
}

/* When scrolled: light bg, dark text */
.header--scrolled .header__nav a {
  color: var(--text-dark-muted);
}

.header--scrolled .header__nav a:hover,
.header--scrolled .header__nav a.is-active {
  color: var(--text-dark);
}

.header__nav a:hover::after,
.header__nav a.is-active::after {
  width: 100%;
}

/* Active page indicator — persistent copper underline */
.header__nav a.is-active::after {
  width: 100%;
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Hamburger Button (mobile) — .header__menu-toggle
   --------------------------------------------------------------------------- */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 101;
  background: none;
  border: none;
  padding: 0;
  gap: 5px;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              width 0.3s ease;
}

.header__menu-toggle span:nth-child(2) {
  width: 18px;
  margin-left: auto;
}

/* Hamburger bars dark when header scrolled on light bg */
.header--scrolled .header__menu-toggle span {
  background: var(--text-dark);
}

/* Hamburger open state — X shape */
.header__menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.header__menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.header__menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------------------------------------------------------------------------
   Mobile Nav Overlay
   --------------------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(44, 40, 36, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav__list li a,
.mobile-nav__link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  padding: 0.75rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.mobile-nav.is-open .mobile-nav__list li a,
.mobile-nav.is-open .mobile-nav__link {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered entrance */
.mobile-nav.is-open .mobile-nav__list li:nth-child(1) a,
.mobile-nav.is-open .mobile-nav__list li:nth-child(1) .mobile-nav__link { transition-delay: 0.1s; }
.mobile-nav.is-open .mobile-nav__list li:nth-child(2) a,
.mobile-nav.is-open .mobile-nav__list li:nth-child(2) .mobile-nav__link { transition-delay: 0.15s; }
.mobile-nav.is-open .mobile-nav__list li:nth-child(3) a,
.mobile-nav.is-open .mobile-nav__list li:nth-child(3) .mobile-nav__link { transition-delay: 0.2s; }
.mobile-nav.is-open .mobile-nav__list li:nth-child(4) a,
.mobile-nav.is-open .mobile-nav__list li:nth-child(4) .mobile-nav__link { transition-delay: 0.25s; }
.mobile-nav.is-open .mobile-nav__list li:nth-child(5) a,
.mobile-nav.is-open .mobile-nav__list li:nth-child(5) .mobile-nav__link { transition-delay: 0.3s; }

.mobile-nav__list li a:hover,
.mobile-nav__link:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------------------------
   Buttons — .btn, .btn--primary, .btn--secondary
   --------------------------------------------------------------------------- */

/* Primary button (gold filled) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: background 0.35s ease, color 0.35s ease, transform 0.3s ease, box-shadow 0.35s ease;
}

.btn--primary {
  padding: 1.25rem 3.25rem;
  border: none;
  border-radius: 0;
  background: var(--gold);
  color: var(--bg-dark);
}

.btn--primary:hover {
  background: #D4B275;
  box-shadow: 0 12px 40px rgba(196, 162, 101, 0.3);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn--primary:hover svg {
  transform: translateX(4px);
}

/* Secondary button (outline) */
.btn--secondary {
  padding: 1.15rem 3rem;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: transparent;
  color: var(--gold);
  overflow: hidden;
}

.btn--secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.btn--secondary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn--secondary:hover {
  color: var(--bg-dark);
}

.btn--secondary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn--secondary:hover svg {
  transform: translateX(4px);
}

/* Legacy button classes */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.15rem 3rem;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.btn-outline:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-outline:hover {
  color: var(--bg-dark);
}

.btn-outline svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-outline:hover svg {
  transform: translateX(4px);
}

/* Outline on light backgrounds */
.section--light .btn-outline,
.bg-light .btn--secondary {
  border-color: var(--gold);
  color: var(--gold);
}

.section--light .btn-outline:hover,
.bg-light .btn--secondary:hover {
  color: var(--bg-light);
}

/* Solid button (used on contact form) */
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 3.25rem;
  border: none;
  border-radius: 0;
  background: var(--gold);
  color: var(--bg-dark);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, transform 0.3s ease, box-shadow 0.35s ease;
  position: relative;
}

.btn-solid:hover {
  background: #D4B275;
  box-shadow: 0 12px 40px rgba(196, 162, 101, 0.3);
  transform: translateY(-2px);
}

.btn-solid:active {
  transform: translateY(0);
}

.btn-solid svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-solid:hover svg {
  transform: translateX(4px);
}

/* ---------------------------------------------------------------------------
   Section Utilities
   --------------------------------------------------------------------------- */
.section {
  padding: var(--section-pad) var(--side-pad);
  position: relative;
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text);
}

.section--dark-alt {
  background: var(--bg-dark-alt);
  color: var(--text);
}

.section--dark-alt h1, .section--dark-alt h2, .section--dark-alt h3,
.section--dark-alt h4, .section--dark-alt h5, .section--dark-alt h6 {
  color: var(--text);
}

.section--dark-alt p, .section--dark-alt li {
  color: var(--text-muted);
}

.section--light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section--light-alt {
  background: var(--bg-light-alt);
  color: var(--text-dark);
}

.section--light-alt h1, .section--light-alt h2, .section--light-alt h3,
.section--light-alt h4, .section--light-alt h5, .section--light-alt h6 {
  color: var(--text-dark);
}

.section--light-alt p, .section--light-alt li {
  color: var(--text-dark-muted);
}

/* Section label — gold with horizontal line */
.section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* Centered label variant */
.section-label--center {
  justify-content: center;
}

.section-label--center::before {
  display: none;
}

/* Section header — used on homepage sections */
.section-header {
  margin-bottom: clamp(3.5rem, 5vw, 5rem);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

/* ---------------------------------------------------------------------------
   Marquee — Copper Scrolling Band
   --------------------------------------------------------------------------- */
.marquee {
  background: var(--gold);
  padding: 1.4rem 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.marquee__track:hover {
  animation-play-state: paused;
}

.marquee__content {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee__content span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--bg-dark);
  white-space: nowrap;
  padding: 0 2.5rem;
}

.marquee__dot {
  font-size: 0.5rem;
  line-height: 1;
  color: rgba(44, 40, 36, 0.4);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

/* ---------------------------------------------------------------------------
   Page Header Banner — Inner pages
   --------------------------------------------------------------------------- */
.page-header {
  position: relative;
  padding: clamp(10rem, 18vh, 14rem) var(--side-pad) clamp(4rem, 8vh, 6rem);
  background: var(--bg-dark);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

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

.page-header__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.page-header__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 40, 36, 0.4) 0%,
    rgba(44, 40, 36, 0.85) 70%,
    var(--bg-dark) 100%
  );
}

.page-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.page-header__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 600px;
}

/* Decorative gold line on page headers */
.page-header__inner::before {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 2rem;
}

/* Page header with .container (portfolio/contact variant) */
.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header .container::before {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 2rem;
}

/* Ensure page-header text is always light on dark bg */
.page-header .section-label {
  color: var(--gold);
}

.page-header h1 {
  color: var(--text);
}

.page-header p {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Cards — Generic card styles
   --------------------------------------------------------------------------- */
.card {
  padding: clamp(3rem, 4.5vw, 4rem);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.4s ease;
}

.card:hover {
  background: rgba(196, 162, 101, 0.04);
}

/* Gold accent line at top — reveals on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover::before {
  width: 100%;
}

.card__index {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.02em;
  color: var(--gold-dim);
  line-height: 1;
  margin-bottom: 2.5rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.card__text {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* Card on light background */
.section--light .card {
  border-color: var(--border-dark);
}

.section--light .card:hover {
  background: rgba(196, 162, 101, 0.06);
}

.section--light .card__title {
  color: var(--text-dark);
}

.section--light .card__text {
  color: var(--text-dark-muted);
}

/* ---------------------------------------------------------------------------
   Corner Brackets (decorative)
   --------------------------------------------------------------------------- */
.corner-bracket {
  position: absolute;
  width: 56px;
  height: 56px;
  border-color: var(--gold);
  border-style: solid;
  z-index: 2;
  transition: width 0.4s ease, height 0.4s ease;
}

.corner-bracket--tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.corner-bracket--br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* ---------------------------------------------------------------------------
   Footer CTA — Dark section above footer
   --------------------------------------------------------------------------- */
.footer-cta {
  background: var(--bg-dark);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(196, 162, 101, 0.06) 0%, transparent 60%);
  padding: clamp(8rem, 16vh, 14rem) var(--side-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer-cta__content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 3rem;
}

/* Decorative line above CTA */
.footer-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------------------
   Footer — 4-Column Grid + Bottom Bar
   --------------------------------------------------------------------------- */
.footer {
  background: var(--bg-dark-alt);
  padding: clamp(4rem, 6vw, 6rem) var(--side-pad) 2.5rem;
  border-top: 1px solid var(--border);
}

.footer .container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  margin-bottom: 4rem;
}

.footer__col--brand {
  /* Brand column */
}

.footer__logo {
  max-height: 44px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.footer__desc {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 300px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.footer__address {
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.footer__contact {
  list-style: none;
}

.footer__contact li {
  margin-bottom: 0.5rem;
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer__contact a:hover {
  color: var(--gold);
}

.footer__contact svg {
  width: 16px;
  height: 16px;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 2rem;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer__copyright {
  color: var(--text-muted);
}

.footer__made {
  color: var(--text-muted);
}

.footer__bottom a {
  transition: color 0.3s ease;
}

.footer__bottom a:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------------------------
   Footer Light Variant — bg-light-alt with dark text
   --------------------------------------------------------------------------- */
.footer.footer--light {
  background: var(--bg-light-alt);
  border-top: 1px solid var(--border-dark);
}

.footer.footer--light .footer__tagline {
  color: var(--text-dark);
}

.footer.footer--light .footer__desc {
  color: var(--text-dark-muted);
}

.footer.footer--light .footer__heading {
  color: var(--gold);
}

.footer.footer--light .footer__address {
  color: var(--text-dark-muted);
}

.footer.footer--light .footer__contact a {
  color: var(--text-dark-muted);
}

.footer.footer--light .footer__contact a:hover {
  color: var(--gold);
}

.footer.footer--light .footer__divider {
  background: var(--border-dark);
}

.footer.footer--light .footer__copyright,
.footer.footer--light .footer__made {
  color: var(--text-dark-muted);
}
