/* =========================================
   CONSTRUCT — Cinematic Construction Landing
   ========================================= */

:root {
  --bg: #080808;
  --bg-mid: #111111;
  --text: #f0ede8;
  --text-muted: #7a7670;
  --accent: #c8a96e;
  --accent-light: #e8d4a8;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles this */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   LOADER
   ========================================= */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 260px;
}

.loader-brand {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
}

.loader-track {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

#loader-percent {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  mix-blend-mode: normal;
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.site-header--dark {
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.25s;
}

.nav-logo:hover {
  opacity: 1;
}

.nav-logo:hover .logo-mark {
  transform: translateY(-1px);
}

.logo-mark {
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.logo-word {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: var(--text); /* stays light — header floats above all overlays */
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  /* Desktop: positioned fixed top-right to mirror header layout */
  position: fixed;
  top: 0;
  right: 3rem;
  height: 4.5rem;
  z-index: 100;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(240, 237, 232, 0.85);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  border: 1px solid rgba(200,169,110,0.4) !important;
  color: var(--accent) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 1;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Lift hamburger above nav overlay and animate to ✕ */
.nav-hamburger.is-open {
  z-index: 300;
}

.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================
   HERO — Standalone 100vh
   ========================================= */
.hero-standalone {
  position: relative;
  height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding-left: 6vw;
  padding-right: 55vw;
  z-index: 10;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 12rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-heading .word {
  display: block;
  overflow: hidden;
}

.hero-heading .word-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(240, 237, 232, 0.75);
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 6vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.hero-scroll-indicator span {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: rgba(240, 237, 232, 0.7);
  writing-mode: horizontal-tb;
}

.scroll-arrow {
  color: var(--accent);
  animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =========================================
   CANVAS WRAP — fixed, full viewport
   ========================================= */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* =========================================
   DARK OVERLAY
   ========================================= */
#dark-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  will-change: opacity;
}

/* =========================================
   PHASE OVERLAY — cream/white (content phase)
   ========================================= */
#phase-overlay {
  position: fixed;
  inset: 0;
  background: rgb(247, 244, 239); /* starting tone — JS animates this */
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  will-change: opacity, background;
}

/* =========================================
   MARQUEE
   ========================================= */
.marquee-wrap {
  position: fixed;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(5rem, 10vw, 14rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(200, 169, 110, 0.55);
  white-space: nowrap;
  will-change: transform;
  line-height: 1;
}

/* =========================================
   SCROLL CONTAINER
   ========================================= */
#scroll-container {
  position: relative;
  height: 1150vh;
  z-index: 5;
}

/* Vertical center line connecting all content sections */
#scroll-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(180, 150, 90, 0.5) 5%,
    rgba(180, 150, 90, 0.5) 95%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* =========================================
   SCROLL SECTIONS — base styles
   ========================================= */
.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateY(-50%);
}

.scroll-section.is-active {
  pointer-events: auto;
}

/* Dot on the center line — sits at the top edge of each section */
.scroll-section::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.2);
  pointer-events: none;
  z-index: 2;
}

/* Side alignment zones */
.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-start;
}

.section-inner {
  max-width: 40vw;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: transparent;
  padding: 3rem 2.5rem 3rem 3rem;
  border-left: 3px solid rgba(180, 150, 90, 0.65);
  border-top: 1px solid rgba(180, 150, 90, 0.45);
  position: relative;
}

/* Gold corner bracket accent — top-left corner dot */
.section-inner::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 1;
}

/* Right-aligned sections: flip border to the right side */
.align-right .section-inner {
  border-left: none;
  border-right: 3px solid rgba(180, 150, 90, 0.65);
  border-top: 1px solid rgba(180, 150, 90, 0.45);
  padding: 3rem 3rem 3rem 2.5rem;
}

.align-right .section-inner::before {
  left: auto;
  right: -5px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: #4a4540;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Short gold rule after the label text */
.section-label::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(180,150,90,0.5) 0%, rgba(180,150,90,0.05) 100%);
  min-width: 2rem;
  max-width: 6rem;
}

/* Right-aligned sections: rule fades from right, matching border direction */
.align-right .section-label::after {
  background: linear-gradient(90deg, rgba(180,150,90,0.05) 0%, rgba(180,150,90,0.5) 100%);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #111111;
}

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  font-weight: 400;
  line-height: 1.85;
  color: #1e1c1a;
  letter-spacing: 0.01em;
}

.section-note {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: rgba(180, 150, 90, 0.7);
  text-transform: uppercase;
}

/* =========================================
   SERVICES LIST
   ========================================= */
.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  transition: padding-left 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.service-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}

.service-item:hover {
  padding-left: 0.75rem;
  border-bottom-color: rgba(180,150,90,0.35);
}

/* Animated gold underline bar on hover */
.service-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.service-item:hover::after {
  width: 100%;
}

.service-num {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(180,150,90,0.85);
  flex-shrink: 0;
  min-width: 1.8rem;
  transition: color 0.3s ease;
}

.service-item:hover .service-num {
  color: var(--accent);
}

.service-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  font-weight: 300;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  flex: 1;
}

.service-item:hover .service-name {
  color: #6a4e1e;
  letter-spacing: 0.01em;
}

/* Arrow icon that slides in from right on hover */
.service-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}

.service-item:hover .service-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================
   STATS SECTION
   ========================================= */
.section-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5vw;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: 1200px;
  border-top: 1px solid rgba(180, 150, 90, 0.45);
  padding-top: 0.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  border-left: 1px solid rgba(0,0,0,0.18);
}

.stat:first-child {
  border-left: none;
}

.stat-top {
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
}

.stat-prefix,
.stat-number,
.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 8rem);
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-suffix,
.stat-prefix {
  font-size: clamp(1.5rem, 3vw, 4rem);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #2a2520;
  text-transform: uppercase;
  margin-top: 0.75rem;
  text-align: center;
}

/* =========================================
   GALLERY LINK
   ========================================= */
.gallery-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: #8a6f3a;
  text-decoration: none;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(180,150,90,0.4);
  transition: border-color 0.3s, color 0.3s;
  margin-top: 0.5rem;
  pointer-events: auto;
}

.gallery-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================
   CTA SECTION
   ========================================= */
.section-cta {
  padding-left: 55vw;
  padding-right: 5vw;
  align-items: flex-start;
  padding-top: 6vh;
  padding-bottom: 6vh;
}

.section-cta .section-inner {
  max-width: 42vw;
  max-height: 88vh;
  overflow-y: auto;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 1rem 2.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
  pointer-events: auto;
  margin-top: 0.5rem;
}

.cta-button:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.cta-sub {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: rgba(0,0,0,0.6);
  margin-top: 1rem;
  text-transform: uppercase;
}

/* =========================================
   CONTACT FORM
   ========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3a3530;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.22);
  color: #1a1a1a;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 300;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.25s;
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(0,0,0,0.3);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(180,150,90,0.6);
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8a96e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field select option {
  background: #f7f4ef;
  color: #1a1a1a;
}

.form-field textarea {
  resize: none;
  line-height: 1.6;
}

/* =========================================
   SECTION POSITIONING (absolute in scroll container)
   ========================================= */
/* Sections are positioned via JS based on enter/leave percentages */

/* =========================================
   MOBILE — ≤768px
   ========================================= */
@media (max-width: 768px) {
  .site-header {
    padding: 1.25rem 1.5rem;
    z-index: 300;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--text);
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero-standalone {
    padding-left: 6vw;
    padding-right: 6vw;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
    padding-top: 6rem;
  }

  .hero-heading {
    font-size: clamp(3rem, 13vw, 5rem);
  }

  .hero-tagline {
    font-size: 0.8rem;
  }

  /* Scroll sections — full width centered */
  .align-left,
  .align-right,
  .section-cta {
    padding-left: 6vw;
    padding-right: 6vw;
    justify-content: center;
  }

  .section-inner {
    max-width: 100%;
    padding: 2rem 1.5rem;
    border-left: none;
    border-right: none;
    border-top: 2px solid rgba(180, 150, 90, 0.35);
  }

  .section-inner::before {
    top: -5px;
    left: 0;
  }

  /* Hide center line and dots on mobile — sections are full-width */
  #scroll-container::before,
  .scroll-section::after {
    display: none;
  }


  .section-cta {
    align-items: center;
    padding-top: 4vh;
    padding-bottom: 4vh;
  }

  .section-cta .section-inner {
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
  }

  #scroll-container {
    padding-bottom: 40vh;
  }

  .site-footer {
    margin-top: 4rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 6vw;
  }

  .footer-copy {
    order: 3;
  }

  .footer-nav {
    gap: 1.5rem;
  }

  .section-heading {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .stat {
    padding: 2rem 1rem;
  }

  .stat:nth-child(3) {
    border-left: none;
  }

  /* Marquee */
  .marquee-text {
    font-size: clamp(3rem, 15vw, 6rem);
  }

  /* Scroll height reduce is handled in JS */

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 6rem;
  position: relative;
  z-index: 10;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 6vw;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.25s;
}

.footer-logo:hover {
  opacity: 1;
}

.footer-logo span {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: #f0ede8;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-align: center;
  flex: 1;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s;
}

.footer-nav a:hover {
  color: #f5d020;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 6vw;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-legal span {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
}

.footer-legal-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-nav a {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: color 0.25s;
}

.footer-legal-nav a:hover {
  color: #f5d020;
}

/* =========================================
   UTILITY
   ========================================= */
::selection {
  background: var(--accent);
  color: var(--bg);
}
