/* INVICTA — Design & Construction */
:root {
  --navy: #0a1626;
  --navy-2: #0d1d33;
  --navy-3: #122540;
  --gold: #c9926b;
  --gold-light: #e8c39a;
  --gold-dim: rgba(201, 146, 107, 0.35);
  --ink: #e9eef5;
  --ink-dim: #9fb0c4;
  --serif: "Marcellus", serif;
  --sans: "Jost", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.serif { font-family: var(--serif); font-weight: 400; }
.gold { color: var(--gold-light); }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  background: linear-gradient(to bottom, rgba(10, 22, 38, 0.85), rgba(10, 22, 38, 0));
  backdrop-filter: blur(2px);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-logo img {
  display: block;
  height: 46px;
  width: auto;
}
.nav-logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
}
.nav-logo-text {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.38em;
  color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1px; background: var(--gold);
  transition: right 0.3s cubic-bezier(0.22,1,0.36,1);
}
.nav-links a:not(.nav-cta):hover { color: var(--gold-light); }
.nav-links a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  border: 1px solid var(--gold);
  padding: 10px 22px;
  color: var(--gold-light) !important;
  transition: background 0.25s, color 0.25s;
}
.nav-cta:hover { background: var(--gold); color: var(--navy) !important; }

/* mobile menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  background: rgba(13, 29, 51, 0.85); border: 1px solid var(--gold);
  cursor: pointer; flex: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 0 auto;
  background: var(--gold-light); transition: transform 0.3s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO SCRUB ---------- */
.scrub-section { height: 520vh; position: relative; }
.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.scrub-sticky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scrub-loader {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: rgba(233, 238, 245, 0.12);
  transition: opacity 0.6s;
  z-index: 5;
}
.scrub-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.scrub-loader.done { opacity: 0; }

.scrub-copy { position: absolute; inset: 0; pointer-events: none; }
.copy-line {
  position: absolute;
  opacity: 0;
  will-change: opacity, transform;
}
.hero-line-1 { left: 8%; top: 24%; max-width: 560px; }
.hero-line-1 h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.12;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(10, 22, 38, 0.8);
}
.hero-line-2 {
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
}
.hero-line-2 h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 46px);
  letter-spacing: 0.14em;
  color: var(--gold-light);
  text-shadow: 0 2px 40px rgba(10, 22, 38, 0.9);
}

.scroll-hint {
  position: absolute;
  right: 42px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  z-index: 5;
}
.scroll-hint-line {
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: hint 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

/* staggered waterfall for grouped reveals */
.service-row:nth-child(2) { transition-delay: 0.1s; }
.service-row:nth-child(3) { transition-delay: 0.2s; }
.process-step:nth-child(2) { transition-delay: 0.1s; }
.process-step:nth-child(3) { transition-delay: 0.2s; }
.process-step:nth-child(4) { transition-delay: 0.3s; }

/* tactile press feedback */
.nav-cta:active,
.contact-card:active {
  transform: scale(0.98);
}

/* ---------- STATEMENT ---------- */
.statement {
  padding: 170px 0 150px;
  background: linear-gradient(to bottom, var(--navy), var(--navy-2));
}
.statement .container { padding-left: max(32px, 14vw); }
.statement h2 {
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.35;
  max-width: 880px;
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(201, 146, 107, 0.18);
  border-bottom: 1px solid rgba(201, 146, 107, 0.18);
  background: var(--navy-2);
  padding: 26px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.marquee-track .dia {
  width: 7px;
  height: 7px;
  background: var(--gold-dim);
  transform: rotate(45deg);
  flex: none;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- SERVICES ---------- */
.services { padding: 120px 0 140px; background: var(--navy-2); }
.section-head { margin-bottom: 90px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 50px); }

.service-rows { display: grid; }
.service-row {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1.1fr;
  gap: 48px;
  align-items: start;
  padding: 64px 0;
  border-top: 1px solid rgba(201, 146, 107, 0.18);
  transition: background 0.4s;
}
.service-row:last-child { border-bottom: 1px solid rgba(201, 146, 107, 0.18); }
.service-row:hover { background: rgba(201, 146, 107, 0.03); }
.service-row:nth-child(2) .service-main { padding-left: 3vw; }
.service-row:nth-child(3) .service-main { padding-left: 6vw; }

.service-index {
  font-family: var(--serif);
  font-size: clamp(72px, 9vw, 130px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-dim);
  transition: -webkit-text-stroke-color 0.4s;
}
.service-row:hover .service-index { -webkit-text-stroke-color: var(--gold); }

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--gold-light);
  margin-bottom: 24px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-main h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.service-main p { color: var(--ink-dim); font-size: 15px; max-width: 46ch; }

.service-list { list-style: none; margin-top: 8px; }
.service-list li {
  font-size: 14px;
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px solid rgba(201, 146, 107, 0.14);
  letter-spacing: 0.04em;
}
.service-list li::before {
  content: "—";
  color: var(--gold);
  margin-right: 10px;
}

/* ---------- PROCESS ---------- */
.process {
  padding: 130px 0;
  background: linear-gradient(to bottom, var(--navy-2), var(--navy));
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.process-step {
  padding: 34px 26px;
  border-top: 1px solid var(--gold-dim);
}
.process-step:nth-child(2) { margin-top: 44px; }
.process-step:nth-child(3) { margin-top: 88px; }
.process-step:nth-child(4) { margin-top: 132px; }
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold);
  margin-bottom: 18px;
}
.process-step h4 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.process-step p { color: var(--ink-dim); font-size: 14px; }

/* ---------- ABOUT / STATS ---------- */
.about { padding: 130px 0; background: var(--navy); }
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-copy h2 { font-size: clamp(28px, 3.2vw, 44px); margin-bottom: 24px; }
.about-text { color: var(--ink-dim); font-size: 16px; max-width: 480px; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: rgba(201, 146, 107, 0.18);
  border: 1px solid rgba(201, 146, 107, 0.18);
}
.stat {
  background: var(--navy-2);
  padding: 40px 32px;
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 46px;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- CONTACT ---------- */
.contact {
  position: relative;
  padding: 0 0 130px;
  background: linear-gradient(to bottom, var(--navy), #081220);
}
.skyline-divider {
  color: var(--gold);
  margin-bottom: 90px;
}
/* the divider draws itself instead of using the standard reveal slide */
.skyline-divider.reveal { opacity: 0.55; transform: none; transition: none; }
.skyline-divider svg { display: block; width: 100%; height: 120px; }
.skyline-divider svg path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.skyline-divider.visible svg path {
  animation: skyline-draw 2.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes skyline-draw {
  to { stroke-dashoffset: 0; }
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-copy h2 { font-size: clamp(36px, 4.4vw, 62px); margin-bottom: 20px; }
.contact-sub { color: var(--ink-dim); font-size: 17px; }

.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 28px;
  border: 1px solid rgba(201, 146, 107, 0.22);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.contact-card:hover {
  border-color: var(--gold);
  background: rgba(201, 146, 107, 0.06);
  transform: translateX(6px);
}
.contact-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact-value {
  font-size: 17px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid rgba(201, 146, 107, 0.16);
  padding: 34px 0;
  background: #081220;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--serif);
  letter-spacing: 0.3em;
  font-size: 15px;
}
.footer-brand em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 10px;
}
.footer-tag, .footer-copy { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.06em; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 48px 0;
  }
  .service-row:nth-child(2) .service-main,
  .service-row:nth-child(3) .service-main { padding-left: 0; }
  .service-index { font-size: 64px; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-step:nth-child(2),
  .process-step:nth-child(3),
  .process-step:nth-child(4) { margin-top: 0; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-line-1 { left: 7%; right: 7%; top: 20%; }
  .statement, .about, .process { padding: 90px 0; }
  .statement .container { padding-left: 32px; }
  .marquee-track span { font-size: 15px; }
}

/* nav collapses to a mobile menu */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 22, 38, 0.98); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(201, 146, 107, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    padding: 4px 0;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease;
  }
  .nav-links.open { max-height: 360px; opacity: 1; pointer-events: auto; }
  .nav-links a {
    padding: 17px 40px; font-size: 15px; color: var(--ink);
    border-bottom: 1px solid rgba(201, 146, 107, 0.1);
  }
  .nav-links a::after { display: none !important; }
  .nav-cta {
    border: none !important; margin: 0;
    color: var(--gold-light) !important;
  }
  .nav-cta:hover { background: rgba(201, 146, 107, 0.08); color: var(--gold-light) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .scroll-hint-line, .skyline-divider.visible svg path { animation: none; }
  .skyline-divider svg path { stroke-dashoffset: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .container { padding: 0 22px; }
  .nav { padding: 14px 22px; }
  .nav-logo-text { font-size: 16px; letter-spacing: 0.28em; }
  .nav-logo img { height: 38px; }
  .nav-links a { padding-left: 22px; padding-right: 22px; }
  .scroll-hint { right: 22px; }
}
