/* ==========================================================================
   DESIGN TOKENS — S.I.S CANONICAL LUXURY BRAND SYSTEM
   ========================================================================== */
:root {
  --garnet: #A21C40;
  --garnet-subtle: rgba(162, 28, 64, 0.12);
  --garnet-hairline: rgba(162, 28, 64, 0.35);
  --garnet-glow: rgba(162, 28, 64, 0.25);
  --pewter: #6E6F71;
  --warm-white: #F3EFE7;
  --charcoal: #2A2723;
  --charcoal-deep: #1B1816;
  --travertine: #E3D9C6;
  --limestone: #CFC5B4;
  --warm-concrete: #B9AFA0;
  --accent: #2D3A2D;

  --surface-page: var(--warm-white);
  --surface-card: #FFFFFF;
  --surface-sunken: var(--travertine);
  --surface-dark: var(--charcoal);
  --text-primary: var(--charcoal);
  --text-secondary: var(--pewter);
  --text-on-dark: var(--warm-white);
  --text-on-dark-muted: var(--limestone);
  --interactive: var(--garnet);
  --border-subtle: var(--limestone);
  --border-hairline: 1px solid rgba(207, 197, 180, 0.65);
  --border-on-dark: rgba(243, 239, 231, 0.18);
  --structure: var(--pewter);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 144px;
  --margin-page: clamp(24px, 7vw, 120px);

  --ease-reveal: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-reveal: 640ms;

  --font-display: 'Faculty Glyphic', Georgia, serif;
  --font-text: 'Familjen Grotesk', Georgia, serif;
  --font-sans: 'Familjen Grotesk', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Familjen Grotesk', 'Söhne Mono', ui-monospace, monospace;

  --text-display-xl: 400 clamp(2.75rem, 5vw, 4.75rem)/1.05 var(--font-display);
  --text-display-lg: 400 clamp(2.25rem, 3.6vw, 3.25rem)/1.1 var(--font-display);
  --text-display-md: 400 2rem/1.18 var(--font-display);
  --text-heading: 600 1.375rem/1.35 var(--font-sans);
  --text-subheading: 600 0.78rem/1.4 var(--font-sans);
  --text-body: italic 400 1.0625rem/1.75 var(--font-text);
  --text-body-sm: italic 400 0.9375rem/1.65 var(--font-text);
  --text-caption: 400 0.8125rem/1.5 var(--font-sans);
  --text-ui: 500 0.9375rem/1.3 var(--font-sans);
  --text-ui-sm: 500 0.8125rem/1.3 var(--font-sans);
  --text-numeral: 600 0.9375rem/1.2 var(--font-mono);
  --tracking-label: 0.14em;
}

/* ==========================================================================
   BASE & FOUNDATIONS
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--surface-page);
  background-image: radial-gradient(rgba(42, 39, 35, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--text-primary);
  overflow-x: hidden;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--interactive); text-decoration: none; transition: opacity 0.25s ease; }
a:hover { opacity: 0.75; }
img { max-width: 100%; display: block; }

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.kb-slow img { animation: kenburns 22s var(--ease-cinematic) infinite alternate; }

/* Scroll-reveal */
[data-reveal-id] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-reveal), transform var(--duration-reveal) var(--ease-reveal);
}
[data-reveal-id].is-revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal-id] { opacity: 1 !important; transform: none !important; }
}

.eyebrow {
  display: block;
  font: var(--text-subheading);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.eyebrow.on-dark { color: var(--text-on-dark-muted); }

.section-rule {
  width: 52px;
  height: 2px;
  background: var(--interactive);
  margin: 0 0 var(--space-5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s var(--ease-cinematic) 0.15s;
}
[data-reveal-id].is-revealed .section-rule { transform: scaleX(1); }
.section-rule.center { margin-left: auto; margin-right: auto; transform-origin: center; }

/* Link Underline Sweep */
.link-sweep {
  font: var(--text-ui-sm);
  color: var(--interactive);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 1px;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease-reveal), opacity 0.2s;
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding-left: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-sweep:hover { background-size: 100% 1px; opacity: 1; }
.link-sweep.on-dark { color: var(--warm-white); }

/* Canonical S.I.S Buttons & Button Sweep */
button.btn {
  margin: 0;
  border-radius: 3px !important;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-position 0.5s, box-shadow 0.3s, transform 0.15s, border-color 0.2s, opacity 0.2s;
  background-size: 200% auto;
  background-position: left center;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  padding-left: 24px !important;
  padding-right: 24px !important;
  font-weight: 700;
  border: 1px solid transparent;
}
.btn-sm { padding: 10px 20px; font: 700 0.75rem/1 var(--font-sans); }
.btn-lg { padding: 18px 38px; font: 700 0.875rem/1 var(--font-sans); }
.btn-accent {
  background-image: linear-gradient(45deg, #7A1631 0%, #A21C40 51%, #7A1631 100%);
  color: var(--text-on-dark);
  border: 0;
  box-shadow: 0 0 14px -6px rgba(162, 28, 64, 0.75);
}
.btn-accent:hover { background-position: right center; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--structure);
  color: var(--text-primary);
}
.btn-secondary.on-dark {
  border-color: var(--border-on-dark);
  color: var(--text-on-dark);
}
.btn-secondary:hover {
  border-color: var(--interactive);
  color: var(--interactive);
}
.btn-secondary.on-dark:hover {
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
  background: rgba(243, 239, 231, 0.08);
}
.btn:active { transform: scale(0.96); }

.btn-sweep {
  position: relative;
  display: inline-block;
  border-radius: 4px;
}
.btn-sweep button { outline: none !important; }
.btn-sweep .btn-sweep-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.btn-sweep .btn-sweep-shine span {
  position: absolute;
  background: var(--interactive);
}
.btn-sweep.on-dark .btn-sweep-shine span { background: var(--text-on-dark); }
.btn-sweep.on-fill .btn-sweep-shine span { background: #fff; }
.btn-sweep .btn-sweep-shine .side-top { top: 0; left: 0; height: 1.5px; width: 0; transition: width 0.22s ease; }
.btn-sweep .btn-sweep-shine .side-right { top: 0; right: 0; width: 1.5px; height: 0; transition: height 0.22s ease; }
.btn-sweep .btn-sweep-shine .side-bottom { bottom: 0; right: 0; height: 1.5px; width: 0; transition: width 0.22s ease; }
.btn-sweep .btn-sweep-shine .side-left { bottom: 0; left: 0; width: 1.5px; height: 0; transition: height 0.22s ease; }
.btn-sweep:hover .side-top { width: 100%; transition-delay: 0s; }
.btn-sweep:hover .side-right { height: 100%; transition-delay: 0.22s; }
.btn-sweep:hover .side-bottom { width: 100%; transition-delay: 0.44s; }
.btn-sweep:hover .side-left { height: 100%; transition-delay: 0.66s; }

/* ==========================================================================
   CANONICAL S.I.S HEADER
   ========================================================================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px var(--margin-page);
  background: color-mix(in oklab, var(--charcoal) 35%, transparent);
  box-shadow: none;
  transform: translateY(0);
  transition: transform 0.4s var(--ease-reveal), background 0.4s, box-shadow 0.4s;
}
#site-header.is-scrolled {
  background: color-mix(in oklab, var(--charcoal) 92%, transparent);
  box-shadow: 0 8px 32px color-mix(in oklab, var(--charcoal) 10%, transparent);
}
#site-header.is-hidden { transform: translateY(-100%); }

.menu-btn {
  justify-self: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  position: relative;
  z-index: 110;
  background: none;
  border: 0;
  padding: 0;
}
.menu-btn span {
  display: block;
  height: 1px;
  background: var(--warm-white);
  transition: background 0.4s;
}
.logo-wrap {
  position: relative;
  width: 80px;
  height: 32px;
  justify-self: center;
}
.logo-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); height: 100px; width: 100px;
  max-width: none;
}
.header-cta { justify-self: end; }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--charcoal) 94%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-close {
  position: absolute;
  top: 34px;
  left: var(--margin-page);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  background: none;
  border: 0;
  padding: 0;
}
.mobile-menu-close span { display: block; height: 1px; background: var(--warm-white); }
.mobile-menu-close span:first-child { transform: translateY(3px) rotate(45deg); }
.mobile-menu-close span:last-child { transform: translateY(-3px) rotate(-45deg); }
.mobile-link { font: var(--text-display-md); color: var(--text-on-dark-muted); }
.mobile-link:hover { color: var(--warm-white); opacity: 1; }
.mobile-link.is-current { color: var(--text-on-dark); }

/* ==========================================================================
   HERO SECTION (Canonical Full-Bleed S.I.S Atmosphere)
   ========================================================================== */
.projects-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 520px;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--surface-dark);
  padding: 80px var(--margin-page) 36px;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}
.hero-video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  opacity: 1;
  border: 0;
  z-index: 1;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 20, 15, 0.45) 0%, rgba(23, 20, 15, 0.52) 45%, rgba(23, 20, 15, 0.88) 100%);
  pointer-events: none;
  z-index: 1;
}
.sound-toggle {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in oklab, white 35%, transparent);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--warm-white);
  background: rgba(23, 20, 15, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}
.sound-toggle:hover {
  background: var(--interactive);
  border-color: var(--interactive);
}
.sound-toggle svg { display: none; }
.sound-toggle[data-sound="off"] .icon-on { display: block; }
.sound-toggle[data-sound="on"] .icon-off { display: block; }
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.hero-copy .eyebrow {
  color: var(--travertine);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  font-size: 0.76rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 10px;
}
.hero-copy h1 span {
  color: var(--warm-white);
  position: relative;
  display: inline-block;
}
.hero-copy h1 span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--interactive);
  opacity: 0.8;
}
.hero-copy p {
  font: var(--text-body);
  color: var(--warm-white);
  margin: 0 auto;
  max-width: 650px;
  opacity: 0.95;
  font-size: 1.02rem;
  line-height: 1.58;
}

/* ==========================================================================
   STICKY PORTFOLIO CONTROLS (TABS, CITIES, SEARCH)
   ========================================================================== */
.portfolio-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(243, 239, 231, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(207, 197, 180, 0.75);
  box-shadow: 0 4px 16px rgba(42, 39, 35, 0.04);
  transition: all 0.3s ease;
  margin-bottom: 28px;
  padding: 8px 0;
}
.portfolio-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.portfolio-tabs {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 36px);
  overflow-x: auto;
  scrollbar-width: none;
}
.portfolio-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  font: var(--text-ui-sm);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  white-space: nowrap;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--interactive);
  transition: width 0.35s var(--ease-cinematic), left 0.35s var(--ease-cinematic);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn:hover::after,
.tab-btn.is-active::after {
  width: 100%;
  left: 0;
}
.tab-btn.is-active {
  color: var(--garnet);
  font-weight: 600;
}
.tab-count {
  font: var(--text-numeral);
  font-size: 0.72rem;
  color: var(--interactive);
  background: var(--garnet-subtle);
  padding: 2px 7px;
  border-radius: 12px;
}

/* Status Pulse Indicator */
.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--garnet);
  display: inline-block;
  box-shadow: 0 0 8px var(--garnet);
  animation: pulse-glow 2s infinite ease-in-out;
  margin-right: 2px;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 12px var(--garnet); }
}

.portfolio-aux-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

/* Typology Filter Pills */
.typology-filter-group {
  display: flex;
  align-items: center;
  background: rgba(42, 39, 35, 0.06);
  padding: 3px;
  border-radius: 4px;
}
.type-pill {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font: var(--text-ui-sm);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.type-pill.is-active {
  background: #FFFFFF;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Location Filter Dropdown in Sticky Controls */
.location-filter-dropdown {
  position: relative;
  display: inline-block;
}
.location-dropdown-btn {
  background: rgba(42, 39, 35, 0.06);
  border: 1px solid rgba(207, 197, 180, 0.7);
  padding: 6px 14px;
  font: var(--text-ui-sm);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.location-dropdown-btn:hover,
.location-filter-dropdown.is-open .location-dropdown-btn {
  background: #FFFFFF;
  border-color: var(--garnet);
  box-shadow: 0 2px 8px rgba(42, 39, 35, 0.08);
}
.location-dropdown-btn strong {
  color: var(--garnet);
  font-weight: 700;
}
.loc-dropdown-chevron {
  transition: transform 0.25s ease;
  color: var(--pewter);
}
.location-filter-dropdown.is-open .loc-dropdown-chevron {
  transform: rotate(180deg);
  color: var(--garnet);
}
.location-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 175px;
  background: #FFFFFF;
  border: 1px solid rgba(207, 197, 180, 0.85);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(42, 39, 35, 0.12);
  padding: 6px 0;
  display: none;
  z-index: 100;
  animation: fadeInDown 0.2s ease;
}
.location-filter-dropdown.is-open .location-dropdown-menu {
  display: block;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.loc-dropdown-opt {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: transparent;
  border: none;
  font: var(--text-ui-sm);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.loc-dropdown-opt:hover {
  background: rgba(162, 28, 64, 0.06);
  color: var(--garnet);
}
.loc-dropdown-opt.is-active {
  color: var(--garnet);
  font-weight: 700;
  background: rgba(162, 28, 64, 0.08);
}
.loc-opt-count {
  font: var(--text-numeral);
  font-size: 0.72rem;
  color: var(--pewter);
}
.loc-dropdown-opt.is-active .loc-opt-count {
  color: var(--garnet);
}

/* Fallback City Filter Pills */
.city-filter-group {
  display: flex;
  align-items: center;
  background: rgba(42, 39, 35, 0.06);
  padding: 3px;
  border-radius: 4px;
}
.city-pill {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font: var(--text-ui-sm);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.city-pill.is-active {
  background: #FFFFFF;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Clean Direct Navigation Links */
.card-loc-link {
  color: var(--pewter);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  font-size: 0.68rem;
}
.card-loc-link:hover {
  color: var(--garnet);
}
.card-action-sublink {
  font: var(--text-ui-sm);
  font-size: 0.7rem;
  color: var(--pewter);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.card-action-sublink:hover {
  color: var(--garnet);
}
.card-status-badge-inline {
  font: var(--text-ui-sm);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pewter);
}

/* Search Box */
.portfolio-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.portfolio-search-box input {
  padding: 6px 10px 6px 30px;
  font: var(--text-ui-sm);
  font-size: 0.78rem;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-primary);
  width: 165px;
  height: 32px;
  transition: width 0.3s ease, border-color 0.2s ease;
  outline: none;
}
.portfolio-search-box input:focus {
  width: 240px;
  border-color: var(--garnet);
}
.search-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: var(--pewter);
  display: flex;
}

/* Section Blocks & Headers for Ongoing / Completed */
.portfolio-section-block {
  margin-bottom: 56px;
  scroll-margin-top: 110px;
  transition: opacity 0.3s ease;
}
.portfolio-section-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(207, 197, 180, 0.6);
  padding-bottom: 14px;
}
.portfolio-section-header h2 {
  font: var(--text-display-md);
  font-size: 1.55rem;
  color: var(--text-primary);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}
.portfolio-section-header p {
  font: var(--text-body-sm);
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 700px;
  line-height: 1.55;
}
.section-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: var(--text-subheading);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: 8px;
}
.section-badge-pill.completed-pill {
  color: var(--pewter);
}
.section-counter-badge {
  font: var(--text-numeral);
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(42, 39, 35, 0.05);
  border: 1px solid rgba(207, 197, 180, 0.6);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Interstitial Milestone Ribbon */
.portfolio-milestone-band {
  margin: 52px 0 58px;
  padding: 32px 40px;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(42, 39, 35, 0.08);
}
.milestone-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 28px;
  text-align: center;
}
.milestone-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.milestone-num {
  font: var(--text-display-md);
  font-size: 1.4rem;
  color: var(--travertine);
  line-height: 1;
}
.milestone-text {
  font: var(--text-ui-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--limestone);
  font-size: 0.76rem;
}
.milestone-separator {
  color: var(--garnet);
  font-size: 1.1rem;
  opacity: 0.85;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(207, 197, 180, 0.85);
  border-radius: 4px;
  color: var(--text-secondary);
  font: var(--text-body);
}

/* ==========================================================================
   MAIN PORTFOLIO SECTION & COMPLETE 12 LANDMARKS GRID
   ========================================================================== */
.portfolio-catalog-section {
  padding: 76px var(--margin-page) 110px;
  background: var(--surface-page);
}
.catalog-container {
  max-width: 1400px;
  margin: 0 auto;
}
.catalog-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(207, 197, 180, 0.6);
  padding-bottom: 16px;
}
.catalog-header-bar h2 {
  font: var(--text-display-md);
  font-size: 1.55rem;
  color: var(--text-primary);
  margin: 0;
}
.catalog-header-bar .eyebrow {
  margin-bottom: 6px;
  font-size: 0.74rem;
}
.catalog-header-bar .section-rule {
  width: 44px;
  height: 2px;
  margin: 0 0 8px;
}
.catalog-header-bar h2 {
  font: var(--text-display-md);
  color: var(--text-primary);
  margin: 0;
}
.catalog-counter-badge {
  font: var(--text-subheading);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* 3-COLUMN ARCHITECTURAL GRID */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 20px;
}

/* INDIVIDUAL ARCHITECTURAL CARD */
.project-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid rgba(207, 197, 180, 0.65);
  position: relative;
  transition: transform 0.4s var(--ease-cinematic), box-shadow 0.4s var(--ease-cinematic), opacity 0.3s ease;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(42, 39, 35, 0.08);
}
.project-card.is-hidden {
  display: none !important;
}

/* Card Media Stage — Flush Full-Width Horizontal Fill */
.card-media-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  height: 230px;
  max-height: 250px;
  overflow: hidden;
  background: var(--surface-dark);
  display: block;
}
.card-media-stage a {
  display: block;
  width: 100%;
  height: 100%;
}
.card-media-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.85s var(--ease-cinematic);
  padding: 0;
  margin: 0;
  display: block;
}
.card-media-stage.is-photo img {
  object-fit: cover;
  padding: 0;
}
.project-card:hover .card-media-stage img {
  transform: scale(1.05);
}

/* Status Pill */
.card-status-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(27, 24, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--warm-white);
  font: var(--text-ui-sm);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--interactive);
  display: inline-block;
  box-shadow: 0 0 8px var(--interactive);
}
.status-dot.ready { background: #4E8752; box-shadow: 0 0 8px #4E8752; }
.status-dot.planning { background: #D6A848; box-shadow: 0 0 8px #D6A848; }
.status-dot.delivered { background: #6E6F71; box-shadow: none; }

.card-category-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font: var(--text-ui-sm);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: rgba(243, 239, 231, 0.9);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid rgba(207, 197, 180, 0.7);
}

/* Card Content Body */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-eyebrow {
  font: var(--text-subheading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pewter);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-bullet { color: var(--limestone); }

.card-title {
  font: var(--text-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.28;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.card-title a {
  color: var(--text-primary) !important;
  text-decoration: none !important;
}
.project-card:hover .card-title {
  border-color: var(--garnet);
}

.card-desc {
  font: var(--text-body-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.55;
  min-height: 4.2em;
}

/* Specification Ledger */
.card-specs-ledger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(207, 197, 180, 0.55);
  border-bottom: 1px solid rgba(207, 197, 180, 0.55);
  padding: 10px 0;
  margin-bottom: 14px;
  margin-top: auto;
}
.specs-meta {
  font: 500 0.74rem/1.3 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.specs-tag {
  font: var(--text-numeral);
  font-size: 0.68rem;
  color: var(--interactive);
  letter-spacing: 0.03em;
}

/* Card Footer Actions */
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}
.card-actions .link-sweep {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--interactive);
}

/* ==========================================================================
   PHILOSOPHY INTERSTITIAL
   ========================================================================== */
.portfolio-interstitial {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 100px var(--margin-page);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.interstitial-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.interstitial-inner p {
  font: 400 clamp(1.6rem, 2.8vw, 2.35rem)/1.4 var(--font-display);
  color: var(--warm-white);
  margin: 0 0 var(--space-5);
}
.interstitial-inner p em {
  font-family: var(--font-text);
  font-style: italic;
  color: var(--travertine);
}
.interstitial-author {
  font: var(--text-subheading);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--limestone);
  display: block;
}

/* ==========================================================================
   MODAL DIALOG (CANONICAL BRAND SYSTEM)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(27, 24, 22, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}
.modal-window {
  background: var(--surface-page);
  width: 100%;
  max-width: 520px;
  position: relative;
  padding: 44px 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  transform: translateY(24px);
  transition: transform 0.35s var(--ease-cinematic);
  border: 1px solid rgba(207, 197, 180, 0.8);
}
.modal-overlay.is-active .modal-window {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close::before, .modal-close::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }

.modal-window h3 {
  font: var(--text-display-md);
  margin: 0 0 8px;
  color: var(--text-primary);
}
.modal-window p {
  font: var(--text-body-sm);
  color: var(--text-secondary);
  margin: 0 0 24px;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.form-field label {
  font: var(--text-subheading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.form-field input, .form-field select {
  font: var(--text-ui);
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.form-field input:focus, .form-field select:focus {
  border-color: var(--interactive);
}

/* ==========================================================================
   CANONICAL S.I.S FOOTER (MATCHES index.html EXACTLY)
   ========================================================================== */
footer {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
}

@media (max-width: 1024px) {
  .hero-slide-container {
    padding: 90px var(--margin-page) 130px;
  }
}

@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; gap: 40px; }
  .catalog-header-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .portfolio-catalog-section { padding: 48px var(--margin-page) 72px; }
  .hero-slider-tabs { width: 100%; }
  .hero-slider-bottom-bar { padding-bottom: 20px; }
  .portfolio-aux-filters { width: 100%; justify-content: space-between; }
  .portfolio-search-box input { width: 100%; }
  .portfolio-search-box input:focus { width: 100%; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr !important; }
  .footer-cta { flex-direction: column !important; align-items: flex-start !important; }
  .hero-slide-title { font-size: 2.2rem; }
  .hero-slide-actions { flex-direction: column; align-items: flex-start; width: 100%; }
  .hero-slide-actions .btn-sweep { width: 100%; }
  .hero-slide-actions button { width: 100%; }
}
/* ==========================================================================
   VIEW SWITCHER (GRID VIEW vs. GEOGRAPHIC EXPLORER)
   ========================================================================== */
.portfolio-view-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(227, 217, 198, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  padding: 3px;
  gap: 2px;
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font: var(--text-ui-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s var(--ease-cinematic);
}
.view-btn:hover {
  color: var(--text-primary);
}
.view-btn.is-active {
  background: var(--surface-card);
  color: var(--interactive);
  box-shadow: 0 2px 8px rgba(42, 39, 35, 0.08);
  font-weight: 600;
}
.view-btn svg {
  transition: transform 0.25s;
}
.view-btn:hover svg {
  transform: scale(1.1);
}

/* ==========================================================================
   GEOGRAPHIC EXPLORER / INTERACTIVE MAP SECTION
   ========================================================================== */
.portfolio-map-section {
  display: none;
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  animation: fadeInMap 0.5s var(--ease-cinematic);
}
.portfolio-map-section.is-active {
  display: block;
}

@keyframes fadeInMap {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.map-explorer-container {
  background: var(--warm-white, #F3EFE7);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(42, 39, 35, 0.06);
}

.map-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--warm-white, #F3EFE7);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}
.map-header-info h3 {
  font: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.map-header-info p {
  margin: 0;
  font: var(--text-caption);
  color: var(--text-secondary);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: var(--text-ui-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.ongoing { background: var(--garnet); box-shadow: 0 0 0 3px rgba(162, 28, 64, 0.2); }
.legend-dot.ready { background: #2E7D32; box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2); }
.legend-dot.delivered { background: #8D7B68; box-shadow: 0 0 0 3px rgba(141, 123, 104, 0.2); }

.map-corridor-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--warm-white, #F3EFE7);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.corridor-pill {
  padding: 6px 14px;
  font: var(--text-ui-sm);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.corridor-pill:hover {
  background: rgba(162, 28, 64, 0.06);
  color: var(--garnet);
  border-color: rgba(162, 28, 64, 0.3);
}
.corridor-pill.is-active {
  background: var(--charcoal);
  color: var(--warm-white);
  border-color: var(--charcoal);
  font-weight: 600;
}

/* Map Explorer Dual Stage Grid */
.map-dual-stage {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 580px;
  background: var(--warm-white, #F3EFE7);
  position: relative;
}

.map-canvas-area {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.map-svg-wrap {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
  border-radius: 4px;
  background: radial-gradient(circle at 75% 20%, #EFE7DA 0%, #E6DDCE 60%, #DDD2C1 100%);
  border: 1px solid rgba(207, 197, 180, 0.8);
  box-shadow: inset 0 2px 12px rgba(42, 39, 35, 0.04);
}

.map-svg-element {
  width: 100%;
  height: 100%;
  display: block;
}

/* Map Pins */
.map-pin {
  cursor: pointer;
  transition: transform 0.25s var(--ease-cinematic);
}
.map-pin:hover, .map-pin.is-active {
  transform: scale(1.22);
}
.map-pin .pin-circle {
  transition: r 0.25s, fill 0.25s, stroke-width 0.25s;
}
.map-pin:hover .pin-circle, .map-pin.is-active .pin-circle {
  stroke-width: 3px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}
.map-pin.pin-ongoing .pin-circle { fill: #A21C40; stroke: #FFFFFF; }
.map-pin.pin-ready .pin-circle { fill: #2E7D32; stroke: #FFFFFF; }
.map-pin.pin-delivered .pin-circle { fill: #6B5B4D; stroke: #FFFFFF; }

.map-pin text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  fill: #FFFFFF;
  pointer-events: none;
}

.map-pin-pulse {
  animation: pinPulse 2.4s infinite;
  transform-origin: center;
}
@keyframes pinPulse {
  0% { r: 12px; opacity: 0.6; }
  50% { r: 24px; opacity: 0; }
  100% { r: 24px; opacity: 0; }
}

/* Map Inset for Trichy Hub */
.map-trichy-inset {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 200px;
  height: 170px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(42, 39, 35, 0.12);
  padding: 10px;
  z-index: 10;
}
.trichy-inset-title {
  font: var(--text-subheading);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}
.trichy-inset-svg {
  width: 100%;
  height: 120px;
  background: #FAF8F5;
  border-radius: 2px;
}

/* Map Hover Quick-Popover */
.map-pin-popover {
  position: absolute;
  z-index: 50;
  width: 280px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(42, 39, 35, 0.18);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -100%) translateY(-14px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.map-pin-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -100%) translateY(-20px);
}
.map-pin-popover::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.popover-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.popover-content {
  padding: 14px 16px 16px;
}
.popover-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.popover-title {
  font: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.popover-loc {
  font: var(--text-caption);
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-bottom: 10px;
}
.popover-meta {
  font: var(--text-numeral);
  font-size: 0.76rem;
  color: var(--pewter);
  background: var(--surface-sunken);
  padding: 4px 8px;
  border-radius: 2px;
  margin-bottom: 12px;
  display: block;
}
.popover-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 12px;
  background: var(--charcoal);
  color: var(--warm-white);
  border: none;
  font: var(--text-ui-sm);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}
.popover-btn:hover {
  background: var(--garnet);
}

/* Map Interactive Side Ledger */
.map-ledger-panel {
  border-left: 1px solid var(--border-subtle);
  background: var(--warm-white, #F3EFE7);
  display: flex;
  flex-direction: column;
  max-height: 640px;
}
.map-ledger-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--warm-white, #F3EFE7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.map-ledger-head h4 {
  margin: 0;
  font: var(--text-heading);
  font-size: 1rem;
}
.map-ledger-counter {
  font: var(--text-subheading);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.map-ledger-scroll {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.map-ledger-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.22s var(--ease-cinematic);
}
.map-ledger-card:hover, .map-ledger-card.is-active {
  border-color: var(--garnet);
  box-shadow: 0 4px 16px rgba(162, 28, 64, 0.1);
  transform: translateX(3px);
  background: #FFFDFD;
}
.ledger-card-thumb {
  width: 72px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.ledger-card-body {
  flex: 1;
  min-width: 0;
}
.ledger-card-body h5 {
  margin: 0 0 3px;
  font: var(--text-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ledger-card-loc {
  font: var(--text-caption);
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ledger-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: var(--text-subheading);
  font-size: 0.68rem;
  color: var(--pewter);
}
.ledger-card-tag {
  color: var(--interactive);
  font-weight: 600;
}

/* ==========================================================================
   ARCHITECTURAL MONOGRAPH DRAWER / LIGHTBOX MODAL
   ========================================================================== */
.monograph-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(27, 24, 22, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-cinematic), visibility 0.35s;
}
.monograph-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.monograph-drawer-window {
  width: 100%;
  max-width: 860px;
  height: 100vh;
  background: var(--surface-page);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 60px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.monograph-drawer-overlay.is-active .monograph-drawer-window {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px 36px 20px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
}
.drawer-header-left {
  flex: 1;
}
.drawer-meta-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.drawer-cat-badge {
  font: var(--text-subheading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pewter);
  font-size: 0.74rem;
}
.drawer-title {
  font: var(--text-display-md);
  font-size: 2.15rem;
  margin: 0 0 6px;
  color: var(--text-primary);
  line-height: 1.15;
}
.drawer-subline {
  display: flex;
  align-items: center;
  gap: 14px;
  font: var(--text-caption);
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.drawer-map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--interactive);
  font-weight: 500;
}
.drawer-map-link:hover {
  text-decoration: underline;
}

.drawer-close-btn {
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--charcoal);
  transition: all 0.2s;
  flex-shrink: 0;
}
.drawer-close-btn:hover {
  background: var(--garnet);
  color: #FFFFFF;
  border-color: var(--garnet);
  transform: rotate(90deg);
}

.drawer-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px 48px;
  -webkit-overflow-scrolling: touch;
}

/* Master Gallery Viewport */
.drawer-gallery-stage {
  margin-bottom: 32px;
  position: relative;
}
.drawer-gallery-frame {
  position: relative;
  width: 100%;
  height: 400px;
  background: var(--charcoal-deep);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(42, 39, 35, 0.12);
}
.drawer-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.gallery-counter-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(27, 24, 22, 0.75);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 20px;
  font: var(--text-numeral);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.gallery-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: all 0.2s;
  color: var(--charcoal);
  z-index: 5;
}
.gallery-nav-arrow:hover {
  background: #FFFFFF;
  transform: translateY(-50%) scale(1.08);
  color: var(--garnet);
}
.gallery-nav-prev { left: 16px; }
.gallery-nav-next { right: 16px; }

.drawer-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb-item {
  width: 88px;
  height: 56px;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  opacity: 0.65;
  transition: all 0.2s;
}
.gallery-thumb-item:hover {
  opacity: 1;
}
.gallery-thumb-item.is-active {
  opacity: 1;
  border-color: var(--garnet);
}
.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Key Metrics Ledger Grid */
.drawer-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.drawer-metric-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
}
.drawer-metric-box .metric-label {
  font: var(--text-subheading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pewter);
  font-size: 0.7rem;
  margin-bottom: 6px;
}
.drawer-metric-box .metric-val {
  font: var(--text-numeral);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

/* Narrative & Concept */
.drawer-narrative-section {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 28px 30px;
  margin-bottom: 32px;
}
.drawer-narrative-section h4 {
  font: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.drawer-narrative-text {
  font: var(--text-body);
  color: var(--text-primary);
  line-height: 1.85;
  margin: 0;
  font-size: 1.02rem;
}

/* Amenities Grid */
.drawer-amenities-section {
  margin-bottom: 32px;
}
.drawer-section-title {
  font: var(--text-subheading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.drawer-amenities-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.drawer-amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  font: var(--text-ui-sm);
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(42, 39, 35, 0.04);
}
.drawer-amenity-chip svg {
  color: var(--garnet);
}

/* Drawer Location Accordion */
.drawer-location-section {
  margin-bottom: 24px;
}

/* Drawer Footer Fixed Action Bar */
.drawer-footer-actions {
  padding: 20px 36px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(42, 39, 35, 0.04);
}
.drawer-footer-actions .btn-sweep {
  margin: 0;
}

/* Card Hover Quick Inspect Button */
.card-media-stage {
  position: relative;
  overflow: hidden;
}
.card-quick-inspect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--charcoal);
  padding: 10px 20px;
  border-radius: 30px;
  font: var(--text-ui-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-cinematic);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  z-index: 4;
}
.project-card:hover .card-quick-inspect {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Responsive adjustments for Drawer & Map */
@media (max-width: 900px) {
  .map-dual-stage {
    grid-template-columns: 1fr;
  }
  .map-ledger-panel {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 380px;
  }
  .drawer-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .drawer-header {
    padding: 20px 24px;
  }
  .drawer-content-scroll {
    padding: 24px;
  }
  .drawer-footer-actions {
    padding: 16px 24px;
    flex-direction: column;
    align-items: stretch;
  }
  .drawer-footer-actions .btn-sweep {
    width: 100%;
  }
  .drawer-footer-actions button,
  .drawer-footer-actions a {
    width: 100%;
  }
}
@media (max-width: 600px) {
  .map-trichy-inset {
    width: 160px;
    height: 140px;
    bottom: 12px;
    left: 12px;
  }
  .drawer-gallery-frame {
    height: 260px;
  }
  .drawer-title {
    font-size: 1.7rem;
  }
  .map-header-bar {
    padding: 16px;
  }
}

/* ==========================================================================
   MAP EXPLORER: MapLibre GL + CARTO Positron basemap
   ========================================================================== */
.map-svg-wrap { overflow: hidden; }
#sis-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: 500px;
  background: var(--warm-white, #F3EFE7);
  font-family: var(--font-sans);
}
#sis-map .maplibregl-canvas-container canvas { outline: none; }

.sis-popup { z-index: 5; }
.sis-popup .maplibregl-popup-content {
  padding: 0;
  width: 280px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(42, 39, 35, 0.2);
  font-family: var(--font-sans);
}
.sis-popup .popover-img { display: block; }
.sis-popup .popover-btn { text-decoration: none; box-sizing: border-box; }
.sis-popup .popover-btn:hover { color: var(--warm-white); }
.sis-popup .popover-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 12px 0 14px; padding: 12px 0 0; border-top: 1px solid var(--border-subtle); }
.sis-popup .popover-facts dt { font: var(--text-subheading); font-size: 0.62rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-secondary); margin: 0 0 2px; }
.sis-popup .popover-facts dd { font: var(--text-ui); font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.sis-popup .maplibregl-popup-close-button { top: 10px; right: 10px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--charcoal); font-size: 20px; line-height: 28px; text-align: center; cursor: pointer; box-shadow: 0 2px 8px rgba(42, 39, 35, 0.25); transition: background 0.2s ease, color 0.2s ease; }
.sis-popup .maplibregl-popup-close-button:hover { background: var(--interactive); color: #fff; }
.sis-popup .maplibregl-popup-close-button:focus-visible { outline: 2px solid var(--interactive); outline-offset: 2px; }

@media (max-width: 900px) {
  #sis-map { min-height: 420px; }
}
