:root {
  --bg: #f4efe8;
  --bg-alt: #efe7dd;
  --text: #1f2a30;
  --muted: #5f6a70;
  --panel: #ffffff;
  --accent: #b87942;
  --accent-soft: #d9b188;
  --line: #dfd2c4;
  --shadow: 0 20px 50px rgba(31, 42, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #fffaf2, var(--bg));
  scroll-behavior: smooth;
}

h1,
h2,
h3,
.brand {
  font-family: "Playfair Display", serif;
  letter-spacing: 0.02em;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.glass {
  backdrop-filter: blur(12px);
  background: rgba(31, 42, 48, 0.68);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 180ms ease;
}

.nav a:hover {
  color: #fff;
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 3px;
  background: #fff;
  transition: transform 220ms ease, opacity 220ms ease;
}

.mobile-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: linear-gradient(112deg, rgba(14, 20, 25, 0.82), rgba(14, 20, 25, 0.48)), var(--hero-bg-image);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.1), transparent 48%),
    linear-gradient(180deg, rgba(18, 25, 30, 0.08), rgba(18, 25, 30, 0.28));
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.65px, transparent 0.65px);
  background-size: 3px 3px;
  opacity: 0.18;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(12, 18, 22, 0.58), rgba(12, 18, 22, 0.22));
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 700px;
  color: #f9f3ec;
  padding: 4rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.74rem;
  color: var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.05;
}

.lead {
  color: rgba(249, 243, 236, 0.92);
  font-size: 1.06rem;
  max-width: 620px;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.74rem 1.2rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #c98c55, var(--accent));
  box-shadow: 0 10px 24px rgba(184, 121, 66, 0.35);
}

.btn-light {
  color: #1f2a30;
  background: #f7ede2;
}

.btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: transparent;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(244, 239, 232, 0.2), rgba(239, 231, 221, 0.85));
}

.section-head h2 {
  margin: 0.45rem 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.project-filters {
  margin: 1.7rem 0 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.58rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 180ms ease;
}

.filter-btn.active {
  background: #fff;
  color: var(--text);
  border-color: var(--accent);
}

.filter-btn:hover {
  background: #faf5ef;
  color: var(--text);
  border-color: #d6b08d;
}

.project-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.project-viewport {
  overflow: hidden;
}

.project-grid {
  display: flex;
  gap: 1.15rem;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.project-card {
  flex: 0 0 calc((100% - 2.3rem) / 3);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(223, 210, 196, 0.75);
  transform-origin: center;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(31, 42, 48, 0.17);
}

.project-card.is-hidden {
  display: none;
}

.project-carousel.single-card .carousel-btn {
  display: none;
}

.project-carousel.single-card .project-grid {
  justify-content: flex-start;
}

.project-carousel.single-card .project-card {
  flex: 0 0 min(360px, 100%);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -40% -130% -40%;
  height: 180px;
  background: radial-gradient(circle, rgba(201, 140, 85, 0.2), rgba(201, 140, 85, 0));
  opacity: 0;
  transition: opacity 240ms ease;
}

.project-card:hover::after {
  opacity: 1;
}

.project-media {
  height: 180px;
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  transition: transform 350ms ease;
}

.project-card:hover .project-media {
  transform: scale(1.07);
}

.project-body {
  padding: 1rem;
}

.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.status-badge.selling {
  background: rgba(102, 160, 111, 0.15);
  color: #356d3d;
}

.status-badge.completed {
  background: rgba(31, 42, 48, 0.1);
  color: #1f2a30;
}

.project-body h3 {
  margin: 0.25rem 0;
  font-size: 1.35rem;
}

.project-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.project-body ul {
  margin: 0 0 0.7rem;
  padding-left: 1rem;
  color: #3f4950;
}

.project-body li {
  margin-bottom: 0.28rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #6a7379;
  font-size: 0.85rem;
  margin: 0.9rem 0 1rem;
}

.split-boxes {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.split {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fff8f0, #fff);
  padding: 1.2rem;
}

.split-count {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 6vw, 2.8rem);
  color: #24333b;
}

.photo-section {
  position: relative;
  background: linear-gradient(160deg, #f5eee5 0%, #efe5d8 55%, #f4ede5 100%);
  overflow: hidden;
}

.photo-section::before,
.photo-section::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.photo-section::before {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(31, 42, 48, 0.1), rgba(31, 42, 48, 0));
  top: -140px;
  left: -110px;
}

.photo-section::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201, 140, 85, 0.22), rgba(201, 140, 85, 0));
  right: -80px;
  bottom: -120px;
}

.photo-carousel {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.photo-viewport {
  overflow: hidden;
}

.photo-track {
  display: flex;
  gap: 0.8rem;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.photo-item {
  flex: 0 0 calc((100% - 1.6rem) / 3);
  position: relative;
  min-height: 300px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(31, 42, 48, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(31, 42, 48, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #1f2a30;
  cursor: pointer;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(31, 42, 48, 0.12);
  transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.carousel-btn:hover {
  transform: translateY(-1px);
  background: #fff;
}

.carousel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.carousel-dots {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.carousel-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 0;
  background: rgba(31, 42, 48, 0.25);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.14);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 460ms ease;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(12, 18, 21, 0.78), rgba(12, 18, 21, 0.08) 58%);
}

.photo-overlay p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.photo-item:hover img {
  transform: scale(1.09);
}

.photo-item:hover {
  animation: photoPulse 900ms ease;
}

@keyframes photoPulse {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

#about h2 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  margin-bottom: 0.65rem;
}

#about p {
  font-size: 1.08rem;
  line-height: 1.75;
}

.panel-art {
  position: relative;
  min-height: 260px;
}

.about-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-media-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(15, 22, 27, 0.68);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.panel-box {
  position: absolute;
  inset: 20px 90px 30px 0;
  border-radius: 24px;
  background: linear-gradient(130deg, #1f2a30, #3c525d);
  box-shadow: var(--shadow);
}

.panel-box.second {
  inset: 70px 0 0 120px;
  background: linear-gradient(130deg, #c98c55, #e5bf98);
}

.vm-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.vm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(31, 42, 48, 0.08);
}

.ref-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.ref-item {
  border: 1px dashed #c8b9a9;
  border-radius: 14px;
  background: #fff;
  min-height: 78px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.85rem;
  font-weight: 600;
}

.footer {
  background: #1f2a30;
  color: #f4efe8;
  padding-top: 3rem;
}

.contact-title {
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  margin: 0 0 0.8rem;
}

.footer a {
  color: #f4efe8;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 239, 232, 0.35);
}

.footer a:hover {
  color: #fff;
  border-bottom-color: rgba(244, 239, 232, 0.7);
}

.footer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.1fr 1fr;
}

.map-wrap iframe {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 16px;
}

.footer-bottom {
  margin-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.85);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 11, 14, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 50;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(1120px, 100%);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  animation: rise 320ms ease;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1rem;
}

.project-detail-menu {
  display: grid;
  grid-auto-rows: min-content;
  gap: 0.5rem;
  border-right: 1px solid #ece1d5;
  padding-right: 0.8rem;
}

.detail-menu-toggle {
  display: none;
  border: 1px solid #d8c9b8;
  background: #f8f2ea;
  color: #1f2a30;
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.detail-tab-list {
  display: grid;
  gap: 0.5rem;
}

.project-detail-menu h3 {
  margin: 0;
  padding: 0.95rem 0.5rem;
  font-size: 1.48rem;
  border-bottom: 1px solid #ece1d5;
}

.detail-tab {
  border: 1px solid #ded1c2;
  background: #f8f3ec;
  color: #1f2a30;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.78rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.detail-tab.active {
  background: #10171d;
  color: #fff;
  border-color: #10171d;
}

.detail-close-tab {
  display: none;
  border-color: #d8c3ba;
  background: #fbf1ee;
  color: #8a2f2f;
}

.detail-close-tab.active {
  background: #fbf1ee;
  color: #8a2f2f;
  border-color: #d8c3ba;
}

.project-detail-content {
  min-height: 420px;
}

.detail-mobile-title {
  display: none;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-panel h4 {
  margin: 0;
  border: 1px solid #dfd4c8;
  background: #f6f1ea;
  padding: 1rem;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
}

.modal-gallery-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.modal-gallery-item {
  border: 1px solid #d9ccbe;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.modal-gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease;
}

.modal-gallery-item:hover img {
  transform: scale(1.05);
}

.modal-map-wrap {
  margin-top: 0.8rem;
  border: 1px solid #ddcfbf;
  border-radius: 12px;
  overflow: hidden;
  background: #fdf8f2;
}

.modal-map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.modal-map-link {
  margin-top: 0.8rem;
  color: #1f2a30;
  border-color: #b9aa98;
}

#detailPanelFeatures #modalSummary {
  margin-top: 0.9rem;
  color: #36444b;
}

#detailPanelFeatures #modalDetails {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

#detailPanelFeatures #modalDetails li {
  margin: 0;
  border: 1px solid #dfd3c6;
  background: #fcf8f2;
  border-radius: 8px;
  padding: 0.7rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 12;
}

.modal-meta {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  color: #63707a;
  font-size: 0.9rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 13, 0.9);
  z-index: 70;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  width: min(86vw, 920px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.lightbox-nav.prev {
  left: 1rem;
}

.lightbox-nav.next {
  right: 1rem;
}

.lightbox-counter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  font-size: 0.9rem;
  padding: 0.35rem 0.7rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.hero-float {
  position: absolute;
  border-radius: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201, 140, 85, 0.42), rgba(201, 140, 85, 0));
  right: -80px;
  top: -40px;
  animation: drift 7s ease-in-out infinite;
}

.hero-float.second {
  width: 220px;
  height: 220px;
  right: 30%;
  top: auto;
  bottom: -80px;
  animation-duration: 9s;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-16px) scale(1.05);
  }
}

@keyframes rise {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }

  .nav-admin-link {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    display: grid;
    gap: 0.35rem;
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(25, 35, 41, 0.95), rgba(18, 25, 30, 0.95));
    transition: max-height 280ms ease, padding 280ms ease;
  }

  .mobile-menu.open {
    max-height: 420px;
    padding: 0.75rem 1rem 1rem;
  }

  .mobile-menu a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }

  .mobile-admin-btn {
    margin-top: 0.4rem;
    text-align: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.08);
  }

  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-layout {
    grid-template-columns: 1fr;
  }

  .project-detail-menu {
    border-right: 0;
    border-bottom: 1px solid #ece1d5;
    padding: 0 0 0.75rem;
    grid-template-columns: 1fr;
  }

  .project-detail-menu h3 {
    grid-column: auto;
  }

  .hero {
    min-height: 78vh;
    background-position: 58% center;
  }

  .brand {
    font-size: 1.2rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .photo-item {
    flex-basis: calc((100% - 0.8rem) / 2);
  }

  .project-card {
    flex-basis: calc((100% - 1.15rem) / 2);
  }

  .photo-item {
    min-height: 250px;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 4.2rem 0;
  }

  .container {
    width: calc(100% - 1.4rem);
  }

  .project-meta,
  .modal-meta {
    flex-direction: column;
  }

  .detail-panel h4 {
    font-size: 1.3rem;
    padding: 0.8rem;
  }

  .modal {
    padding: 0.4rem;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 0.8rem);
    overflow-y: auto;
    padding-top: 3.6rem;
  }

  .modal-close {
    position: fixed;
    right: 0.8rem;
    top: calc(0.6rem + env(safe-area-inset-top));
    width: 42px;
    height: 42px;
    background: rgba(16, 23, 29, 0.96);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 1.35rem;
    z-index: 80;
  }

  .project-detail-menu {
    display: none;
  }

  .project-detail-content {
    min-height: auto;
    display: grid;
    gap: 0.9rem;
  }

  .detail-mobile-title {
    display: block;
    margin: 0;
    padding: 0.2rem 0 0.25rem;
    font-size: 1.65rem;
    border-bottom: 1px solid #e8ddd1;
  }

  .detail-panel,
  .detail-panel.active {
    display: block;
  }

  .project-detail-menu {
    gap: 0.65rem;
    padding-bottom: 0.85rem;
  }

  .project-detail-menu h3 {
    margin: 0;
    font-size: 1.85rem;
  }

  .detail-menu-toggle {
    display: block;
  }

  .detail-tab-list {
    display: none;
  }

  .project-detail-menu.open .detail-tab-list {
    display: grid;
  }

  .detail-tab {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: #f4f4f4;
    text-align: center;
    font-size: 1.18rem;
  }

  .detail-tab.active {
    background: #05090d;
  }

  .detail-close-tab {
    display: block;
    background: #f8ecea;
  }

  .modal-map-wrap iframe {
    height: 260px;
  }

  .modal-gallery-grid,
  #detailPanelFeatures #modalDetails {
    grid-template-columns: 1fr;
  }

  .modal-gallery-item img {
    height: 190px;
  }

  .photo-carousel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .project-carousel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .carousel-btn {
    display: none;
  }

  .photo-item {
    flex-basis: 100%;
    min-height: 230px;
  }

  .hero-content {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.9rem);
  }

  .lead {
    font-size: 1rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .project-card {
    flex-basis: 100%;
  }

  .ref-grid {
    margin-top: 0.8rem;
    gap: 0.7rem;
  }
}

@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;
  }
}
