/* ==========================================================================
   SOORYODHAYA | Architectural Builders & Civil Engineers
   Editorial Architectural Style (Ref: Aslam Sham & Stapati)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette from Logo */
  --brand-magenta: #e52471;
  --brand-purple: #6a2e81;
  --brand-plum: #401b50;
  --brand-deep: #170d20;
  --brand-wine: #5f1a4d;

  /* Architectural Canvas & Neutrals */
  --bg-body: #0d0813;
  --bg-surface-1: #150e1d;
  --bg-surface-2: #1e1428;
  --bg-surface-3: #271a34;
  --bg-overlay: rgba(13, 8, 19, 0.94);

  /* Typography Colors */
  --text-main: #f6f3f8;
  --text-muted: #9e91a8;
  --text-dim: #6d6176;
  --text-accent: #e52471;

  /* Borders & Rules */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-brand: rgba(229, 36, 113, 0.25);
  --border-brand-hover: rgba(229, 36, 113, 0.6);

  /* Typography Stacks */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Layout & Spacing */
  --max-width: 1440px;
  --header-height: 104px;
  --header-height-mobile: 80px;
  --radius-card: 4px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 0.35s;
}

/* --------------------------------------------------------------------------
   Reset & Global Baseline
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-body);
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background-color: var(--brand-magenta);
  color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  transition: color var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   Layout Containers & Grid Utilities
   -------------------------------------------------------------------------- */
.wrapper {
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.section-pad {
  padding-block: clamp(4rem, 7vw, 7.5rem);
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-magenta);
  margin-bottom: 0.75rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.section-title-wrap {
  flex: 1 1 auto;
  max-width: 600px;
}

.section-heading {
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
}

.section-heading em {
  font-style: normal;
  color: var(--brand-magenta);
}

/* --------------------------------------------------------------------------
   Site Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color var(--duration) var(--ease), backdrop-filter var(--duration) var(--ease), border-color var(--duration) var(--ease), height var(--duration) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(13, 8, 19, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
  height: 84px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}

.brand-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  transition: height var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.site-header.scrolled .brand-logo-img {
  height: 52px;
}

.brand-logo-wrap:hover .brand-logo-img {
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-item {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 400;
  position: relative;
  padding-block: 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--brand-magenta);
  transition: width var(--duration) var(--ease);
}

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

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  z-index: 1010;
  padding: 0;
  touch-action: manipulation;
}

.mobile-toggle:active {
  background: var(--bg-surface-3);
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Panel */
.mobile-nav-panel {
  display: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 90vh;
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.62) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 8, 19, 0.45) 0%,
    rgba(13, 8, 19, 0.25) 35%,
    rgba(13, 8, 19, 0.88) 80%,
    rgba(13, 8, 19, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-statement {
  max-width: 920px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.6vw, 0.8125rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-magenta);
  margin-bottom: 1.25rem;
  display: inline-block;
  font-weight: 500;
  line-height: 1.4;
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 680px;
  font-weight: 300;
  margin-bottom: 2rem;
}

.hero-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metric-item {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.metric-num span {
  color: var(--brand-magenta);
}

.metric-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Projects Showcase
   -------------------------------------------------------------------------- */
.projects-section {
  position: relative;
  background-color: var(--bg-body);
}

.filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-tab {
  padding: 0.55rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-1);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration) var(--ease);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.filter-tab:hover {
  color: #ffffff;
  border-color: var(--border-brand);
}

.filter-tab:active {
  transform: scale(0.97);
}

.filter-tab.active {
  background: var(--brand-magenta);
  color: #ffffff;
  border-color: var(--brand-magenta);
  font-weight: 500;
}

/* Project Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.75rem, 3.5vw, 3rem);
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
  outline: none;
  width: 100%;
}

.project-card:focus-visible {
  outline: 2px solid var(--brand-magenta);
  outline-offset: 4px;
  border-radius: var(--radius-card);
}

.project-card.featured-card {
  grid-column: 1 / -1 !important;
  width: 100%;
}

.project-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card);
  background: var(--bg-surface-2);
  width: 100%;
}

.project-card.featured-card .project-image-container {
  aspect-ratio: 21 / 9;
  width: 100%;
}

.carousel-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s var(--ease);
  transform: scale(1.02);
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.project-card:hover .carousel-slide.active {
  transform: scale(1.04);
}

.project-card:active .carousel-slide.active {
  transform: scale(1.02);
}

.carousel-dots {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 4;
  background: rgba(13, 8, 19, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.35rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.4s ease;
}

.carousel-dot.active {
  width: 15px;
  border-radius: 4px;
  background: var(--brand-magenta, #e52471);
  box-shadow: 0 0 10px rgba(229, 36, 113, 0.7);
}

.project-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 4;
  background: rgba(13, 8, 19, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-main);
  pointer-events: none;
}

.project-meta {
  padding-top: 1.15rem;
}

.project-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-magenta);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  display: block;
}

.project-title {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.project-info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.65rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.info-item strong {
  font-weight: 500;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Architectural Collaborations & Clients
   -------------------------------------------------------------------------- */
.collaborations-section {
  background-color: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.collab-container {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.collab-block-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.collab-block-title {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 500;
  color: #ffffff;
}

.collab-block-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  max-width: 680px;
}

.brand-logo-grid {
  display: grid;
  gap: 1.15rem;
}

.architects-logo-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.clients-logo-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.brand-logo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem 1.25rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
  min-height: 155px;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}

.brand-logo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(229, 36, 113, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.brand-logo-card:hover {
  background: var(--bg-surface-3);
  border-color: var(--border-brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.brand-logo-card:active {
  transform: scale(0.98);
}

.brand-logo-card:hover::before {
  opacity: 1;
}

.brand-logo-img-wrap {
  height: 52px;
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.brand-partner-logo {
  max-height: 42px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  transition: filter var(--duration) var(--ease), opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

/* Global hover: Reveal original colors by default */
.brand-logo-card:hover .brand-partner-logo {
  filter: none;
  opacity: 1;
  transform: scale(1.04);
}

/* Keep white on hover for Stapati, Thought Parallels, Earthscapes Experience, Chinmaya, Team Thai, Aslam Sham */
.brand-logo-card[data-brand="stapati"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="thought-parallels"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="earthscapes"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="chinmaya"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="team-thai"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="aslam-sham"]:hover .brand-partner-logo {
  filter: brightness(0) invert(1) !important;
  opacity: 1;
  transform: scale(1.04);
}

/* Show original color by default and on hover for Morickap and Vythiri */
.brand-logo-card[data-brand="morickap"] .brand-partner-logo,
.brand-logo-card[data-brand="vythiri"] .brand-partner-logo {
  filter: none !important;
  opacity: 0.95;
}

.brand-logo-card[data-brand="morickap"]:hover .brand-partner-logo,
.brand-logo-card[data-brand="vythiri"]:hover .brand-partner-logo {
  filter: none !important;
  opacity: 1;
  transform: scale(1.04);
}

.brand-card-info {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  position: relative;
  z-index: 1;
}

.brand-card-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.brand-card-loc {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-section {
  position: relative;
  background-color: var(--bg-body);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-text-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-main-p {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  line-height: 1.65;
  color: var(--text-main);
  font-weight: 300;
}

.about-sub-p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-image-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4 / 3;
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Contact & Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #07040a;
  border-top: 1px solid var(--border-subtle);
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  padding-bottom: 2.5rem;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-logo-img {
  height: 58px;
  width: auto;
  margin-bottom: 1.25rem;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.6;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-magenta);
  margin-bottom: 1.25rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.7;
}

.footer-contact-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-block;
  line-height: 1.7;
  transition: color var(--duration) var(--ease);
}

.footer-contact-links a:hover {
  color: #ffffff;
}

.footer-social-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.35rem;
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.footer-social-link svg {
  stroke: var(--brand-magenta);
  flex-shrink: 0;
  transition: transform var(--duration) var(--ease);
}

.footer-social-link:hover {
  color: #ffffff;
}

.footer-social-link:hover svg {
  transform: scale(1.15);
}

.mobile-nav-social-item {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--brand-magenta);
  margin-top: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-brand);
  background: rgba(229, 36, 113, 0.08);
  transition: all var(--duration) var(--ease);
}

.mobile-nav-social-item:hover,
.mobile-nav-social-item:active {
  background: var(--brand-magenta);
  color: #ffffff;
}

.mobile-nav-social-item:hover svg,
.mobile-nav-social-item:active svg {
  stroke: #ffffff;
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Project Modal Details Dialog
   -------------------------------------------------------------------------- */
.project-modal {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
  overscroll-behavior: contain;
}

.project-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-card);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  max-height: 90svh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  -webkit-overflow-scrolling: touch;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 8, 19, 0.85);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--duration) var(--ease);
  touch-action: manipulation;
}

.modal-close-btn:hover {
  background: var(--brand-magenta);
  color: #ffffff;
}

.modal-close-btn:active {
  transform: scale(0.94);
}

.modal-image-wrapper {
  aspect-ratio: 16 / 9;
  position: relative;
  background: var(--bg-surface-2);
  overflow: hidden;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

/* Modal Image Navigation Arrows */
.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(13, 8, 19, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration) var(--ease);
  touch-action: manipulation;
}

.modal-nav-arrow:hover {
  background: var(--brand-magenta);
  border-color: var(--brand-magenta);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(229, 36, 113, 0.6);
}

.modal-nav-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.modal-arrow-prev {
  left: 1rem;
}

.modal-arrow-next {
  right: 1rem;
}

.modal-slide-counter {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  background: rgba(13, 8, 19, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ffffff;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.modal-body {
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
}

.modal-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-magenta);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
  display: block;
}

.modal-title {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.modal-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.15rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: 1.5rem;
}

.modal-spec-item .spec-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.modal-spec-item .spec-val {
  font-size: 0.9375rem;
  color: #ffffff;
  font-weight: 500;
  margin-top: 0.25rem;
}

.modal-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.modal-action-row {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.modal-web-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.35rem;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-btn);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.modal-web-btn:hover {
  background: var(--brand-magenta);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 36, 113, 0.45);
}

.modal-web-btn svg {
  transition: transform var(--duration) var(--ease);
}

.modal-web-btn:hover svg {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Responsive & Mobile Touch Optimizations
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .site-header {
    height: var(--header-height-mobile);
  }

  .site-header.scrolled {
    height: 70px;
  }

  .brand-logo-img {
    height: 52px;
  }

  .site-header.scrolled .brand-logo-img {
    height: 44px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-nav-panel {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    background: rgba(13, 8, 19, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration) var(--ease);
    overscroll-behavior: contain;
  }

  .mobile-nav-panel.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .mobile-nav-close:active {
    background: var(--brand-magenta);
  }

  .mobile-nav-item {
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-main);
    padding: 0.5rem 1.5rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .mobile-nav-item:active {
    color: var(--brand-magenta);
  }

  .hero-section {
    padding-top: calc(var(--header-height-mobile) + 1.25rem);
    padding-bottom: 2rem;
    min-height: auto;
  }

  .section-pad {
    padding-block: 2.75rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .section-title-wrap {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }

  .filter-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    margin-top: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-nav::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card.featured-card {
    grid-column: span 1;
  }

  .project-card.featured-card .project-image-container {
    aspect-ratio: 16 / 10;
  }

  .architects-logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .clients-logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .brand-logo-card {
    min-height: 140px;
    padding: 1.15rem 1rem;
  }

  .brand-logo-img-wrap {
    height: 40px;
    margin-bottom: 0.85rem;
  }

  .brand-partner-logo {
    max-height: 34px;
    max-width: 140px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .modal-spec-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .wrapper {
    width: 92%;
  }

  .architects-logo-grid,
  .clients-logo-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .hero-metrics-row .hero-metric-item:last-child {
    grid-column: span 2;
  }

  .project-info-line {
    flex-direction: column;
    gap: 0.35rem;
  }

  .modal-dialog {
    max-height: 94svh;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
