:root {
  --bg: #0b0a09;
  --bg-soft: #121110;
  --surface: #181614;
  --text: #f4efe6;
  --muted: #a9a096;
  --accent: #c8a97e;
  --accent-light: #e5d2b2;
  --line: rgba(244, 239, 230, 0.14);
  --container: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section[id] { scroll-margin-top: 84px; }

img, svg { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--accent);
  color: #14110d;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: var(--progress, 0%); background: var(--accent); transition: width 0.1s linear; }
.site-header.is-scrolled {
  background: rgba(11, 10, 9, 0.88);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}

.header-inner { height: 84px; display: flex; align-items: center; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 14px; letter-spacing: 0.18em; font-weight: 600; }
.brand-text small { font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav a {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.header-cta svg { width: 15px; height: 15px; }
.header-cta:hover { border-color: var(--accent); background: var(--accent); color: #14110d; }

.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 130px;
}
.hero-slides, .hero-shade { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: transform 8s linear; }
.hero-slide.is-active img { transform: scale(1); }
.hero-shade {
  background: linear-gradient(90deg, rgba(11, 10, 9, 0.94) 0%, rgba(11, 10, 9, 0.68) 46%, rgba(11, 10, 9, 0.22) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 30%, transparent 72%, rgba(11, 10, 9, 0.45) 100%);
}

.hero-content { position: relative; z-index: 1; max-width: 900px; }
.eyebrow, .section-index {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 22px 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3.4rem, 9vw, 8rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.hero h1 em, .section-heading h2 em, .section-top h2 em, .contact h2 em { color: var(--accent); font-style: italic; }
.hero-copy { max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.2rem); color: #d5cdc1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #14110d; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(244, 239, 230, 0.3); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.hero-slide-label { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.hero-slide-label #slideIndex { color: var(--accent); font-size: 14px; }
.hero-slide-label .sep { opacity: 0.4; }
.slide-name { margin-left: 18px; text-transform: uppercase; color: var(--text); }
.scroll-cue { display: grid; justify-items: center; gap: 12px; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); }
.scroll-cue i { display: block; width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.06s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.12s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.18s; }

.section { padding: 128px 0; }
.section-heading h2, .section-top h2, .contact h2 {
  margin: 20px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 56px; }
.section-top p { max-width: 40ch; margin: 0 0 6px; color: var(--muted); }

.project-grid, .facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); }
.project-body .lead { margin: 0 0 20px; font-size: 1.25rem; line-height: 1.55; color: var(--text); }
.project-body p:not(.lead) { margin: 0; max-width: 58ch; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); }
.stat { display: grid; gap: 4px; }
.stat-num { font-family: "Playfair Display", Georgia, serif; font-size: 44px; color: var(--accent); line-height: 1; }
.stat-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.departments {
  background: radial-gradient(circle at 8% 0%, rgba(200, 169, 126, 0.08), transparent 42%), var(--bg-soft);
  border-block: 1px solid var(--line);
}
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dept-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), border-color 0.35s ease, box-shadow 0.45s var(--ease);
}
.dept-card.reveal { opacity: 0; transform: translateY(26px); }
.dept-card.reveal.is-visible { opacity: 1; transform: none; }
.dept-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 9, 0.18) 0%, transparent 38%, rgba(11, 10, 9, 0.92) 100%); pointer-events: none; }
.dept-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82) brightness(0.82); transition: transform 0.9s var(--ease), filter 0.5s ease; }
.dept-card:hover, .dept-card:focus-visible { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45); }
.dept-card:hover img, .dept-card:focus-visible img { transform: scale(1.06); filter: saturate(1) brightness(0.92); }
.dept-number { position: absolute; top: 22px; left: 24px; z-index: 1; font-size: 11px; letter-spacing: 0.2em; color: var(--accent-light); }
.dept-content { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px; }
.dept-content h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 500; line-height: 1; }
.dept-tagline { margin: 8px 0 0; font-size: 13px; color: #d5cdc1; }
.dept-description { max-height: 0; margin: 0; overflow: hidden; opacity: 0; font-size: 13px; color: var(--muted); transition: max-height 0.45s var(--ease), opacity 0.35s ease, margin 0.45s var(--ease); }
.dept-card:hover .dept-description, .dept-card:focus-visible .dept-description { max-height: 90px; margin-top: 12px; opacity: 1; }
.dept-arrow {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 239, 230, 0.4);
  border-radius: 50%;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
.dept-card:hover .dept-arrow, .dept-card:focus-visible .dept-arrow { background: var(--accent); border-color: var(--accent); color: #14110d; transform: translateX(3px); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.filter span { margin-left: 8px; font-size: 10px; color: var(--accent); }
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #14110d; }
.filter.is-active span { color: #14110d; opacity: 0.7; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.gallery-item { grid-column: span 4; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.gallery-item.is-wide { grid-column: span 6; }
.gallery-media { overflow: hidden; background: var(--surface); }
.gallery-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), filter 0.4s ease; filter: saturate(0.9); }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); filter: saturate(1.05); }
.gallery-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; }
.gallery-title { font-size: 13px; font-weight: 500; transition: color 0.25s ease; }
.gallery-item:hover .gallery-title { color: var(--accent); }
.gallery-meta { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.facts { background: var(--bg-soft); border-block: 1px solid var(--line); }
.facts-list { margin: 0; }
.facts-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.facts-list > div:first-child { border-top: 1px solid var(--line); }
.facts-list dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.facts-list dd { margin: 0; font-size: 18px; }

.contact { padding: 140px 0; text-align: center; background: linear-gradient(180deg, var(--bg), #17120d 50%, var(--bg)); border-bottom: 1px solid var(--line); }
.contact h2 { margin-top: 20px; font-size: clamp(3rem, 7vw, 6rem); }
.contact p { max-width: 52ch; margin: 22px auto 0; color: var(--muted); }
.contact .hero-actions { justify-content: center; }

.site-footer { padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer nav a, .to-top { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.25s ease; }
.site-footer nav a:hover, .to-top:hover { color: var(--accent); }
.site-footer p { margin: 0; font-size: 12px; color: var(--muted); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top svg { width: 15px; height: 15px; }

.lightbox {
  width: min(1180px, calc(100% - 32px));
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line);
  background: #0f0e0d;
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(6, 5, 4, 0.86); backdrop-filter: blur(10px); }
.lightbox[open] { animation: lbIn 0.28s var(--ease); }
.lightbox.is-closing { animation: lbOut 0.18s ease forwards; }
@keyframes lbIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes lbOut { to { opacity: 0; transform: translateY(8px) scale(0.99); } }
.lightbox-inner { position: relative; padding: 28px; display: grid; place-items: center; }
.lb-figure { display: grid; justify-items: center; gap: 14px; margin: 0; max-width: 100%; }
#lbImage { max-height: 70vh; max-width: 100%; object-fit: contain; background: #000; }
.lb-figure figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 18px; font-size: 14px; }
#lbMeta { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.lb-close, .lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(11, 10, 9, 0.65);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: var(--accent); border-color: var(--accent); color: #14110d; }
.lb-close { top: 18px; right: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-counter { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }

@media (max-width: 1024px) {
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item { grid-column: span 6; }
  .gallery-item.is-wide { grid-column: span 12; }
  .project-grid, .facts-grid { gap: 48px; }
}

@media (max-width: 860px) {
  .container { width: min(100% - 32px, var(--container)); }
  .header-inner { height: 72px; }
  .header-cta { display: none; }
  .menu-toggle {
    display: grid;
    align-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0 10px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 1px; background: var(--text); transition: transform 0.3s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 12px 16px 20px;
    background: rgba(11, 10, 9, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .hero { padding: 110px 0 120px; }
  .section { padding: 96px 0; }
  .section-top { display: grid; gap: 20px; margin-bottom: 40px; }
  .project-grid, .facts-grid { grid-template-columns: 1fr; gap: 40px; }
  .lb-figure figcaption { flex-direction: column; gap: 4px; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: clamp(3rem, 14vw, 4.6rem); }
  .hero-copy { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-bottom { bottom: 24px; }
  .scroll-cue span { display: none; }
  .dept-grid { grid-template-columns: 1fr; }
  .dept-card { aspect-ratio: 4 / 4.4; }
  .dept-description { max-height: 90px; margin-top: 12px; opacity: 1; }
  .gallery-grid { gap: 14px; }
  .gallery-item, .gallery-item.is-wide { grid-column: span 12; }
  .gallery-caption { flex-direction: column; gap: 2px; }
  .facts-list > div { grid-template-columns: 1fr; gap: 4px; }
  .contact { padding: 96px 0; }
  .lightbox-inner { padding: 20px; }
  #lbImage { max-height: 62vh; }
  .lb-nav { top: auto; bottom: 16px; transform: none; }
  .lb-nav:hover { transform: scale(1.06); }
  .lb-counter { bottom: 26px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (hover: none) {
  .dept-description { max-height: 90px; margin-top: 12px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal, .dept-card.reveal { opacity: 1; transform: none; }
  .hero-slide img { transform: none; }
}
