:root {
  /* dark, refined grey palette */
  --ink: #e9eaea;          /* primary text */
  --ink-2: #f4f5f5;        /* bright headings */
  --muted: #9aa0a3;        /* secondary text */
  --paper: #0d0f10;        /* page background */
  --paper-2: #15181a;      /* alternating band */
  --charcoal: #101315;     /* deep section */
  --charcoal-2: #1b1f22;   /* cards */
  --steel: #c2c8cc;        /* list / labels */
  --accent: #9aa6ad;       /* steel-silver accent */
  --accent-soft: #c3ccd1;  /* lighter accent */
  --copper: #9aa6ad;       /* legacy alias -> accent */
  --copper-soft: #c3ccd1;  /* legacy alias -> accent-soft */
  --line: rgba(255, 255, 255, 0.1);
  --white: #f1f3f3;
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: var(--paper);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring { position: relative; width: 64px; height: 64px; }
.loader-ring span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent-soft);
  animation: spin 1.1s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
.loader-ring span:nth-child(2) { inset: 9px; border-top-color: var(--accent); animation-duration: 1.5s; animation-direction: reverse; }
.loader-ring span:nth-child(3) { inset: 18px; border-top-color: rgba(255,255,255,0.4); animation-duration: 0.9s; }
.loader-word { font-family: var(--serif); letter-spacing: 0.5em; font-size: 13px; color: var(--muted); padding-left: 0.5em; }
@keyframes spin { to { transform: rotate(360deg); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--charcoal); color: var(--white);
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 60; background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--copper), var(--copper-soft));
  transition: width 0.1s linear;
}

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(245, 242, 236, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
  background: rgba(245, 242, 236, 0.86);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  padding-top: 10px; padding-bottom: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-text em { font-style: normal; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.hero-light .brand-text strong { color: var(--white); }
.hero-light .brand-text em { color: rgba(255,250,241,0.7); }

nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 14px; font-weight: 500; }
nav a { text-decoration: none; color: var(--muted); position: relative; padding: 4px 0; transition: color 0.25s; }
nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--copper); transition: width 0.3s ease;
}
nav a:hover { color: var(--ink); }
nav a:hover::after { width: 100%; }
.hero-light nav a { color: rgba(255,250,241,0.78); }
.hero-light nav a:hover { color: var(--white); }
.nav-cta {
  background: var(--copper); color: var(--white) !important;
  padding: 9px 18px !important; border-radius: 999px; font-weight: 600;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent-soft); color: var(--charcoal) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.brand-logo { filter: brightness(0) invert(1); }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
.hero-light .nav-toggle span { background: var(--white); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: var(--white); }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.8s ease;
  will-change: opacity, transform;
}
.hero-slide.is-active { opacity: 1; animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1.0); } to { transform: scale(1.06); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,15,15,0.78) 0%, rgba(15,15,15,0.45) 45%, rgba(15,15,15,0.82) 100%),
    radial-gradient(120% 80% at 20% 30%, rgba(15,15,15,0.55), transparent 60%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: 120px clamp(20px, 4vw, 56px) 60px;
}
.hero-copy { max-width: 720px; }
.eyebrow, .section-kicker {
  display: inline-block; margin: 0 0 20px;
  color: var(--copper-soft); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 12px; font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 22px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(48px, 7vw, 104px); line-height: 0.96; letter-spacing: -0.03em;
}
h1 .accent { color: var(--accent-soft); font-weight: 500; }
.hero .lead { color: rgba(255,250,241,0.85); }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--copper); color: var(--white); text-decoration: none;
  font-weight: 600; font-size: 15px; border: 1px solid var(--copper);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.button:hover { background: var(--accent-soft); color: var(--charcoal); border-color: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
.button.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.button.ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--white); box-shadow: none; }

.hero-emblem { display: grid; place-items: center; }
.hero-emblem img { width: clamp(180px, 24vw, 320px); filter: brightness(0) invert(1) drop-shadow(0 20px 40px rgba(0,0,0,0.4)); opacity: 0.92; }

.hero-marquee {
  position: relative; z-index: 2; overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 18px 0; margin-top: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; width: max-content; will-change: transform;
}
.marquee-group {
  display: flex; align-items: center; flex-shrink: 0;
  font-family: var(--serif); font-size: clamp(15px, 1.5vw, 19px);
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(241,243,243,0.78);
}
.marquee-group span { padding: 0 18px; white-space: nowrap; }
.marquee-group .dot { padding: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.8; }

/* ---------- shared sections ---------- */
.section-pad { padding: clamp(64px, 9vw, 130px) clamp(20px, 4vw, 56px); }
.section-heading { max-width: 860px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-heading.wide { max-width: 1000px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 16px; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.intro p, .section-heading p, .contact p { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: var(--muted); }

.intro { max-width: 1000px; margin: 0 auto; text-align: center; }
.intro h2 { margin-bottom: 22px; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) clamp(20px, 4vw, 40px);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.stats { padding: 0; margin: 0 auto clamp(20px,4vw,40px); width: min(1200px, calc(100% - 40px)); }
.stat { background: var(--paper); padding: clamp(26px, 3vw, 40px); text-align: center; }
.stat strong { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--ink); letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 10px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* ---------- services ---------- */
.services { background: var(--charcoal); color: var(--white); }
.services .section-kicker { color: var(--copper-soft); }
.services p { color: rgba(255,250,241,0.7); }
.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
  max-width: 1320px; margin: 0 auto;
}
.cards article {
  position: relative; padding: clamp(26px, 2.4vw, 36px);
  background: var(--charcoal-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; min-height: 280px; overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.cards article::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: var(--copper); transition: width 0.4s ease;
}
.cards article:hover { transform: translateY(-6px); background: #23282b; border-color: rgba(255,255,255,0.18); }
.cards article:hover::before { width: 100%; }
.card-num { display: block; margin-bottom: 56px; font-family: var(--serif); font-weight: 700; font-size: 30px; color: var(--copper-soft); }
.cards h3 { margin-bottom: 10px; }

/* ---------- project types ---------- */
.project-types {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1fr);
  gap: clamp(30px, 5vw, 70px); align-items: center;
  max-width: 1320px; margin: 0 auto;
}
.project-types .section-heading, .project-types h2 { text-align: left; margin: 0; }
.project-types .section-kicker { display: inline-block; margin-bottom: 16px; }
.project-types ul { list-style: none; margin: 0; padding: 0; }
.project-types li {
  position: relative; padding: 18px 0 18px 34px; border-bottom: 1px solid var(--line);
  color: var(--steel); font-weight: 600; font-size: clamp(16px, 1.6vw, 19px);
}
.project-types li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border: 2px solid var(--copper); border-radius: 3px;
}

/* ---------- gallery ---------- */
.gallery-section { background: var(--paper-2); }
.gallery {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
  max-width: 1320px; margin: 0 auto;
}
.gallery figure {
  margin: 0; position: relative; background: var(--charcoal-2);
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery .g-wide { grid-column: span 2; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 18px 16px; display: grid; gap: 3px; color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(10,10,10,0.85));
  transform: translateY(8px); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease;
}
.gallery figure:hover figcaption { transform: translateY(0); opacity: 1; }
.gallery strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.gallery figcaption span { font-size: 13px; color: rgba(255,255,255,0.8); }

/* ---------- process ---------- */
.process { background: var(--paper); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1320px; margin: 0 auto; }
.steps article {
  position: relative; padding: 36px 30px; border-radius: 20px;
  background: var(--charcoal-2); border: 1px solid var(--line);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.steps article:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.18); box-shadow: 0 24px 50px rgba(0,0,0,0.4); }
.step-num { display: block; font-family: var(--serif); font-size: 44px; font-weight: 700; color: rgba(255,255,255,0.12); line-height: 1; margin-bottom: 16px; transition: color 0.4s ease; }
.steps article:hover .step-num { color: var(--accent-soft); }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); line-height: 1.6; }

/* ---------- contact ---------- */
.contact { background: radial-gradient(120% 120% at 80% 0%, #1c2023, #0a0c0d); color: var(--white); }
.contact-card { max-width: 880px; margin: 0 auto; text-align: center; position: relative; }
.contact-mark { width: 88px; margin: 0 auto 24px; filter: brightness(0) invert(1); opacity: 0.8; }
.contact .section-kicker { color: var(--accent-soft); }
.contact p { color: rgba(241,243,243,0.72); margin-bottom: 38px; }
.contact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; margin-bottom: 40px; text-align: left;
}
.contact-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 24px; background: rgba(255,255,255,0.03); text-decoration: none;
  transition: background 0.3s ease;
}
a.contact-item:hover { background: rgba(255,255,255,0.07); }
.contact-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-size: 15px; line-height: 1.4; color: var(--white); font-weight: 500; }
.contact .button { background: var(--white); color: var(--charcoal); border-color: var(--white); }
.contact .button:hover { background: var(--accent-soft); box-shadow: 0 14px 30px rgba(0,0,0,0.4); }

/* ---------- footer ---------- */
footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 30px clamp(20px, 4vw, 56px); color: var(--muted); font-size: 14px;
  background: var(--charcoal); border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--white); font-family: var(--serif); font-size: 16px; letter-spacing: 0.04em; }
.footer-brand img { filter: brightness(0) invert(1); }
.footer-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer-meta > span:first-child { color: rgba(241,243,243,0.7); }
.footer-note { color: rgba(241,243,243,0.45); max-width: 560px; }

/* ---------- reveal animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal].delay-1 { transition-delay: 0.08s; }
[data-reveal].delay-2 { transition-delay: 0.16s; }
[data-reveal].delay-3 { transition-delay: 0.24s; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-emblem { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .project-types { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 22px; padding: 80px 32px; font-size: 20px;
    background: rgba(20,20,20,0.97); backdrop-filter: blur(10px);
    transform: translateX(100%); transition: transform 0.35s ease;
  }
  nav.open { transform: translateX(0); }
  nav a { color: rgba(255,250,241,0.85); }
  nav a:hover { color: var(--white); }
  .nav-toggle { position: relative; z-index: 60; }
  .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); }
  .gallery { grid-template-columns: 1fr; }
  .gallery .g-wide { grid-column: span 1; }
  .gallery figcaption { opacity: 1; transform: none; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
