/* ============================================================
   TORRES ESPACIOS INTERIORES — styles.css
   Terraform Studios
   ============================================================ */

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================================
   2. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --cream: #F7F3EE;
  --ink: #1A1410;
  --sand: #C4A882;
  --terracotta: #B5906A;
  --ink-mid: #7A6252;
  --bg-warm: #DDD4C6;
  --bg-dark: #1A1410;
  --white: #FFFFFF;

  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;

  --max-width: 1200px;
  --nav-height: 80px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
  --border-radius: 2px;
  --border-radius-lg: 4px;
}

/* ============================================================
   3. TYPOGRAPHY BASE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 300;
  color: var(--ink-mid);
}

.section-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: block;
  margin-bottom: 1rem;
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: 96px 0;
}

.section-pad-sm {
  padding: 64px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ============================================================
   5. SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--terracotta);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   6. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition);
}

.site-header.scrolled {
  background: rgba(247, 243, 238, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 20, 16, 0.08);
  height: 64px;
}

.site-header.hero-dark {
  background: transparent;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo svg {
  height: 44px;
  width: auto;
  transition: height var(--transition);
}

.site-header.scrolled .nav-logo svg {
  height: 36px;
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  transition: color var(--transition);
}

.logo-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color var(--transition);
}

.site-header.hero-dark .logo-name,
.site-header.hero-dark .logo-sub {
  color: var(--cream);
}

/* Desktop Nav */
.nav-links {
  display: none;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  transition: color var(--transition);
}

.site-header.hero-dark .nav-links a {
  color: rgba(247, 243, 238, 0.8);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--terracotta);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.site-header.hero-dark .nav-links a:hover,
.site-header.hero-dark .nav-links a.active {
  color: var(--cream);
}

.nav-cta {
  display: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream) !important;
  background: var(--terracotta);
  padding: 10px 24px;
  border-radius: var(--border-radius);
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

.nav-cta::after {
  display: none !important;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
  transform-origin: center;
}

.site-header.hero-dark .nav-toggle span {
  background: var(--cream);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--terracotta);
}

.mobile-nav-phone {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-mid);
  margin-top: 16px;
}

/* ============================================================
   7. HERO — HOMEPAGE
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(26, 20, 16, 0.72) 0%,
      rgba(26, 20, 16, 0.45) 60%,
      rgba(181, 144, 106, 0.2) 100%
    ),
    var(--bg-warm);
  background-size: cover;
  background-position: center;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .hero-bg-img { background-attachment: fixed; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 24px;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--sand);
}

.hero h1 {
  color: var(--cream);
  margin-bottom: 24px;
  font-style: italic;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(247, 243, 238, 0.75);
  margin-bottom: 40px;
  max-width: 500px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.hero-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 238, 0.7);
  transition: color var(--transition);
}

.hero-phone svg {
  width: 14px;
  height: 14px;
  stroke: var(--sand);
}

.hero-phone:hover {
  color: var(--cream);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

.hero-scroll span {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--sand), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   8. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--border-radius);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn:hover::before {
  transform: translateX(0);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 4px 20px rgba(181, 144, 106, 0.3);
}

.btn-primary:hover {
  background: #a07a5a;
  box-shadow: 0 8px 32px rgba(181, 144, 106, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(247, 243, 238, 0.4);
}

.btn-outline:hover {
  border-color: var(--sand);
  color: var(--sand);
}

.btn-dark {
  background: var(--ink);
  color: var(--cream);
}

.btn-dark:hover {
  background: #2d2420;
}

.btn-sand {
  background: transparent;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
}

.btn-sand:hover {
  background: var(--terracotta);
  color: var(--cream);
}

/* ============================================================
   9. SERVICES STRIP (HOMEPAGE)
   ============================================================ */
.services-strip {
  background: var(--ink);
  padding: 80px 0;
}

.services-strip .section-label {
  color: var(--sand);
}

.services-strip .section-title {
  color: var(--cream);
  margin-bottom: 56px;
}

.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(196, 168, 130, 0.15);
}

.service-card {
  background: var(--ink);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: background var(--transition);
  cursor: default;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.5s ease;
}

.service-card:hover {
  background: #241e1a;
}

.service-card:hover::after {
  width: 100%;
}

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
  stroke: var(--sand);
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  color: var(--cream);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.service-card p {
  color: rgba(247, 243, 238, 0.5);
  font-size: 0.85rem;
  line-height: 1.7;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  transition: gap var(--transition), color var(--transition);
}

.service-card:hover .service-card-link {
  gap: 10px;
  color: var(--terracotta);
}

/* ============================================================
   10. ABOUT SECTION (HOMEPAGE)
   ============================================================ */
.about-section {
  padding: 112px 0;
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-img-wrap {
  aspect-ratio: 4 / 5;
  background: var(--bg-warm);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
}

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

.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--sand) 60%, var(--terracotta) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.img-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.4;
}

.about-badge {
  position: absolute;
  bottom: -24px;
  right: -16px;
  background: var(--terracotta);
  color: var(--cream);
  padding: 20px 24px;
  text-align: center;
  border-radius: var(--border-radius);
}

.about-badge-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.8rem;
  line-height: 1;
  display: block;
}

.about-badge-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  display: block;
  margin-top: 4px;
}

.about-text .section-title {
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--bg-warm);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--terracotta);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-top: 6px;
  display: block;
}

/* ============================================================
   11. FEATURED PROJECTS (HOMEPAGE)
   ============================================================ */
.projects-section {
  padding: 96px 0;
  background: var(--bg-warm);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 56px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: var(--bg-warm);
}

.project-card-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--sand) 0%, var(--terracotta) 50%, var(--ink-mid) 100%);
  overflow: hidden;
  position: relative;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card-img img {
  transform: scale(1.06);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 6px;
}

.project-overlay h4 {
  color: var(--cream);
  font-size: 1.3rem;
}

.project-card-info {
  padding: 20px 0 4px;
}

.project-card-info h4 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.project-card-info span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-mid);
  letter-spacing: 0.05em;
}

/* ============================================================
   12. CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--ink);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 144, 106, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 168, 130, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.cta-inner .section-label {
  color: var(--sand);
}

.cta-inner h2 {
  color: var(--cream);
  margin-bottom: 20px;
  font-style: italic;
}

.cta-inner p {
  color: rgba(247, 243, 238, 0.6);
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-phone {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(247, 243, 238, 0.5);
  transition: color var(--transition);
}

.cta-phone:hover {
  color: var(--sand);
}

/* ============================================================
   13. PAGE HERO (INNER PAGES)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--terracotta), transparent);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--ink) 50%, #2d1f16 100%);
  opacity: 0.95;
}

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

.page-hero h1 {
  color: var(--cream);
  margin-bottom: 16px;
  font-style: italic;
}

.page-hero p {
  color: rgba(247, 243, 238, 0.65);
  font-size: 1.05rem;
  max-width: 560px;
}

/* ============================================================
   14. SERVICES PAGE
   ============================================================ */
.service-detail {
  padding: 96px 0;
}

.service-detail:nth-child(even) {
  background: var(--bg-warm);
}

.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.service-detail-img {
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--sand) 100%);
}

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

.service-detail-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 5rem;
  color: rgba(181, 144, 106, 0.15);
  line-height: 1;
  margin-bottom: -20px;
}

.service-detail-text h2 {
  margin-bottom: 20px;
}

.service-detail-text p {
  margin-bottom: 24px;
}

.service-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
}

.service-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-mid);
}

.service-feature-item::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--terracotta);
  margin-top: 10px;
  flex-shrink: 0;
}

/* ============================================================
   15. PROJECTS PAGE — GALLERY
   ============================================================ */
.projects-page {
  padding: 80px 0;
  background: var(--cream);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

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

.filter-btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(122, 98, 82, 0.25);
  color: var(--ink-mid);
  background: transparent;
  white-space: nowrap;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.filter-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.gallery-item-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--sand) 100%);
}

.gallery-item:nth-child(2) .gallery-item-img {
  background: linear-gradient(135deg, var(--sand) 0%, var(--terracotta) 100%);
}

.gallery-item:nth-child(3) .gallery-item-img {
  background: linear-gradient(135deg, var(--ink-mid) 0%, var(--sand) 100%);
}

.gallery-item:nth-child(4) .gallery-item-img {
  background: linear-gradient(135deg, var(--terracotta) 0%, #8a6040 100%);
}

.gallery-item:nth-child(5) .gallery-item-img {
  background: linear-gradient(135deg, #9e8070 0%, var(--bg-warm) 100%);
}

.gallery-item:nth-child(6) .gallery-item-img {
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--ink-mid) 100%);
}

.gallery-item:nth-child(7) .gallery-item-img {
  background: linear-gradient(135deg, var(--sand) 0%, #c09060 100%);
}

.gallery-item:nth-child(8) .gallery-item-img {
  background: linear-gradient(135deg, #b0956a 0%, var(--bg-warm) 100%);
}

.gallery-item:nth-child(9) .gallery-item-img {
  background: linear-gradient(135deg, var(--ink-mid) 0%, var(--terracotta) 100%);
}

.gallery-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-item-img img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.88) 0%, rgba(26, 20, 16, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 6px;
}

.gallery-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cream);
}

/* Placeholder watermark */
.gallery-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gallery-watermark svg {
  width: 56px;
  height: 56px;
  opacity: 0.18;
}

/* ============================================================
   16. CONTACT PAGE
   ============================================================ */
.contact-section {
  padding: 80px 0 112px;
  background: var(--cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

/* Form */
.contact-form-wrap h2 {
  margin-bottom: 8px;
}

.contact-form-wrap > p {
  margin-bottom: 40px;
  color: var(--ink-mid);
}

.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(122, 98, 82, 0.3);
  padding: 16px 0 10px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6252' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--terracotta);
}

.form-group input.valid,
.form-group textarea.valid {
  border-bottom-color: #6a9f6a;
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-bottom-color: #c0504a;
}

.form-label {
  position: absolute;
  top: 16px;
  left: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  pointer-events: none;
  transition: top 0.25s ease, font-size 0.25s ease, color 0.25s ease;
}

.form-group input:focus ~ .form-label,
.form-group input:not(:placeholder-shown) ~ .form-label,
.form-group textarea:focus ~ .form-label,
.form-group textarea:not(:placeholder-shown) ~ .form-label {
  top: -2px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--terracotta);
}

.form-group textarea {
  resize: none;
  min-height: 100px;
}

.form-error {
  display: none;
  font-size: 0.7rem;
  color: #c0504a;
  margin-top: 4px;
  font-family: var(--font-body);
}

.form-group.has-error .form-error {
  display: block;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-bottom-color: #c0504a;
}

.btn-submit {
  position: relative;
  width: 100%;
  padding: 16px 32px;
  font-size: 0.8rem;
}

.btn-submit .btn-text { transition: opacity var(--transition); }
.btn-submit .btn-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-submit.loading .btn-text { opacity: 0; }
.btn-submit.loading .btn-loading { opacity: 1; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(247, 243, 238, 0.3);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-success {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.form-success.visible {
  display: block;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(181, 144, 106, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--terracotta);
}

.form-success h3 {
  margin-bottom: 8px;
}

/* Contact Info */
.contact-info-wrap {
  padding-top: 8px;
}

.contact-info-wrap h3 {
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(181, 144, 106, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--terracotta);
  fill: none;
  stroke-width: 1.5;
}

.contact-detail-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 4px;
  font-weight: 400;
}

.contact-detail-text a,
.contact-detail-text p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink);
  transition: color var(--transition);
}

.contact-detail-text a:hover {
  color: var(--terracotta);
}

.contact-areas {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(122, 98, 82, 0.15);
}

.contact-areas h4 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-tag {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--ink-mid);
  background: var(--bg-warm);
  padding: 6px 14px;
  border-radius: 100px;
}

.map-placeholder {
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: var(--bg-warm);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
}

.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--sand) 100%);
  opacity: 0.4;
}

/* ============================================================
   17. FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(196, 168, 130, 0.1);
  margin-bottom: 32px;
}

.footer-brand .logo-name {
  color: var(--cream);
}

.footer-brand .logo-sub {
  color: rgba(247, 243, 238, 0.4);
}

.footer-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  color: rgba(247, 243, 238, 0.45);
  margin-top: 20px;
  line-height: 1.7;
  max-width: 240px;
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(196, 168, 130, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.social-link svg {
  width: 15px;
  height: 15px;
  stroke: rgba(247, 243, 238, 0.5);
  fill: none;
  stroke-width: 1.5;
  transition: stroke var(--transition);
}

.social-link:hover {
  border-color: var(--terracotta);
  background: rgba(181, 144, 106, 0.1);
}

.social-link:hover svg {
  stroke: var(--terracotta);
}

.footer-col h5 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.88rem;
  color: rgba(247, 243, 238, 0.5);
  transition: color var(--transition);
  position: relative;
  display: inline-block;
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-contact-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--sand);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item a,
.footer-contact-item p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  color: rgba(247, 243, 238, 0.5);
  transition: color var(--transition);
}

.footer-contact-item a:hover {
  color: var(--sand);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.footer-copyright {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  color: rgba(247, 243, 238, 0.3);
  letter-spacing: 0.05em;
}

/* ============================================================
   18. BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
  box-shadow: 0 4px 16px rgba(181, 144, 106, 0.35);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--ink);
}

#back-to-top svg {
  width: 16px;
  height: 16px;
  stroke: var(--cream);
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   19. SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   20. 404 PAGE
   ============================================================ */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--cream);
  padding: 40px;
}

.not-found-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(6rem, 20vw, 12rem);
  color: rgba(181, 144, 106, 0.2);
  line-height: 1;
  margin-bottom: -16px;
}

.not-found h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 16px;
}

.not-found p {
  margin-bottom: 32px;
}

/* ============================================================
   21. MEDIA QUERIES
   ============================================================ */

/* Tablet — 768px */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }

  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }

  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid .project-card:first-child {
    grid-column: span 2;
  }

  .project-grid .project-card:first-child .project-card-img {
    aspect-ratio: 16 / 7;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .cta-actions {
    flex-direction: row;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .service-detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .service-detail:nth-child(even) .service-detail-grid {
    direction: rtl;
  }
  .service-detail:nth-child(even) .service-detail-grid > * {
    direction: ltr;
  }

  .service-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop — 1024px */
@media (min-width: 1024px) {
  .service-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid .gallery-item:first-child {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

/* Wide — 1280px */
@media (min-width: 1280px) {
  .container { padding: 0 40px; }
}

/* ============================================================
   MOBILE — max 767px
   ============================================================ */
@media (max-width: 767px) {

  /* Prevent iOS bounce / overflow */
  html { -webkit-text-size-adjust: 100%; }

  /* Tighter container */
  .container { padding: 0 20px; }

  /* ---- HEADER ---- */
  :root { --nav-height: 64px; }

  .nav-logo svg { height: 36px; }

  .logo-name { font-size: 1.1rem; }
  .logo-sub  { font-size: 0.5rem; letter-spacing: 0.18em; }

  /* ---- HERO ---- */
  .hero {
    align-items: center;
    padding-top: calc(var(--nav-height) + 40px + env(safe-area-inset-top));
    padding-bottom: 60px;
    min-height: 100svh;
  }

  /* Disable parallax fixed bg on mobile — causes iOS Safari blankness */
  .hero-bg-img {
    background-attachment: scroll;
    opacity: 0.5;
  }

  .hero-content { max-width: 100%; }

  .hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); line-height: 1.1; }

  .hero-sub {
    font-size: 0.92rem;
    margin-bottom: 32px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-actions .btn { width: 100%; justify-content: center; padding: 16px 24px; }

  .hero-phone { font-size: 0.95rem; }

  .hero-scroll { display: none; }

  /* ---- SECTION SPACING ---- */
  .section-pad   { padding: 64px 0; }
  .section-pad-sm { padding: 48px 0; }

  /* ---- SERVICES STRIP ---- */
  .services-strip { padding: 64px 0; }

  .services-strip .section-title { margin-bottom: 36px; }

  .service-cards { grid-template-columns: 1fr; gap: 1px; }

  .service-card { padding: 32px 24px; }

  .service-card h3 { font-size: 1.25rem; }

  /* ---- ABOUT ---- */
  .about-section { padding: 72px 0; }

  .about-grid { gap: 48px; }

  /* On mobile show portrait cropped square-ish, not tall 4:5 */
  .about-img-wrap { aspect-ratio: 3 / 2; }

  /* Badge would overflow off-screen — tuck it inside */
  .about-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 20px;
  }

  .about-badge-num  { font-size: 2rem; }
  .about-badge-label { font-size: 0.6rem; text-align: left; }

  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; padding-top: 32px; }

  .stat-num   { font-size: 1.9rem; }
  .stat-label { font-size: 0.62rem; }

  /* ---- PROJECTS (homepage) ---- */
  .projects-section { padding: 72px 0; }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .project-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Remove wide first card on mobile */
  .project-grid .project-card:first-child { grid-column: span 1; }
  .project-grid .project-card:first-child .project-card-img { aspect-ratio: 4 / 3; }

  /* Always show overlay on mobile (no hover) */
  .project-overlay { opacity: 1; }

  /* ---- CTA BANNER ---- */
  .cta-banner { padding: 72px 0; }

  .cta-inner h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .cta-actions .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* ---- PAGE HERO (inner pages) ---- */
  .page-hero {
    padding-top: calc(var(--nav-height) + 56px + env(safe-area-inset-top));
    padding-bottom: 56px;
  }

  .page-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }

  /* ---- SERVICES PAGE ---- */
  .service-detail { padding: 64px 0; }

  .service-detail-grid { grid-template-columns: 1fr; gap: 36px; }

  /* Remove rtl flip on mobile */
  .service-detail:nth-child(even) .service-detail-grid { direction: ltr; }

  .service-detail-img { aspect-ratio: 16 / 10; border-radius: var(--border-radius-lg); overflow: hidden; }
  .service-detail-img img { width: 100%; height: 100%; object-fit: cover; }

  .service-detail-num { font-size: 3.5rem; margin-bottom: -12px; }

  .service-detail-text h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }

  .service-features { grid-template-columns: 1fr; gap: 10px; }

  /* ---- PROJECTS PAGE ---- */
  .projects-page { padding: 56px 0; }

  .filter-bar { gap: 6px; margin-bottom: 36px; }

  .filter-btn { padding: 7px 16px; font-size: 0.68rem; }

  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Always show gallery overlay on touch devices */
  .gallery-overlay { opacity: 1; }

  /* ---- CONTACT PAGE ---- */
  .contact-section { padding: 56px 0 80px; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  .contact-form-wrap h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }

  .form-group { margin-bottom: 24px; }

  /* Larger touch targets on form */
  .form-group input,
  .form-group textarea,
  .form-group select { font-size: 1rem; padding: 18px 0 10px; }

  .btn-submit { padding: 18px 24px; }

  .contact-areas { margin-top: 32px; padding-top: 32px; }

  .map-placeholder { aspect-ratio: 4 / 3; }

  /* ---- FOOTER ---- */
  .site-footer { padding: 56px 0 28px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
    margin-bottom: 24px;
  }

  .footer-tagline { max-width: 100%; }

  /* Hide redundant nav cols on mobile, keep brand + contact */
  .footer-col:nth-child(2),
  .footer-col:nth-child(3) { display: none; }

  .footer-col h5 { margin-bottom: 14px; }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
  }

  /* ---- BACK TO TOP ---- */
  #back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }

  /* ---- 404 ---- */
  .not-found { padding: 24px; }
}

/* Small phones — 390px and below */
@media (max-width: 390px) {
  .hero h1 { font-size: 2rem; }
  .about-stats { gap: 8px; }
  .stat-num { font-size: 1.6rem; }
  .mobile-nav a { font-size: 2rem; }
}

/* Extra-small phones — 360px and below */
@media (max-width: 360px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.85rem; }
  .hero-sub { font-size: 0.88rem; }
  .service-card { padding: 28px 20px; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .about-stats .stat-item:last-child { grid-column: 1 / -1; }
  .mobile-nav a { font-size: 1.75rem; }
  .filter-btn { padding: 6px 14px; font-size: 0.65rem; }
}

/* ============================================================
   22. SAFE-AREA INSETS (iPhone notched devices)
   ============================================================ */
.site-header {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  height: calc(var(--nav-height) + env(safe-area-inset-top));
}

.site-header.scrolled {
  height: calc(64px + env(safe-area-inset-top));
}

.mobile-nav {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  #back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   23. MOBILE STICKY CTA BAR
   ============================================================ */
.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-left: calc(12px + env(safe-area-inset-left));
  padding-right: calc(12px + env(safe-area-inset-right));
  background: rgba(26, 20, 16, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(196, 168, 130, 0.18);
  gap: 8px;
  transform: translateY(110%);
  transition: transform 0.35s ease;
}

.mobile-cta-bar.visible {
  transform: translateY(0);
}

.mobile-cta-bar a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 12px;
  border-radius: var(--border-radius);
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 48px;
}

.mobile-cta-bar a svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  fill: none;
  stroke: currentColor;
}

.mobile-cta-bar .mcb-call {
  background: transparent;
  color: var(--sand);
  border: 1px solid rgba(196, 168, 130, 0.45);
}

.mobile-cta-bar .mcb-call:active {
  background: rgba(196, 168, 130, 0.18);
}

.mobile-cta-bar .mcb-quote {
  background: var(--terracotta);
  color: var(--cream);
}

.mobile-cta-bar .mcb-quote:active {
  background: #a07a5a;
}

@media (max-width: 767px) {
  .mobile-cta-bar { display: flex; }

  body.has-mobile-cta .mobile-cta-bar.visible ~ #back-to-top.visible,
  body.has-mobile-cta #back-to-top.visible.lifted {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body.has-mobile-cta .site-footer { padding-bottom: 96px; }
}

/* ============================================================
   24. HOVER-ONLY EFFECTS (prevent sticky :hover on touch)
   ============================================================ */
@media (hover: none) {
  .project-card:hover .project-card-img img,
  .gallery-item:hover .gallery-item-img img { transform: none; }

  .btn:hover { transform: none; }
  .btn:hover::before { transform: translateX(-100%); }

  .service-card:hover { background: var(--ink); }
  .service-card:hover::after { width: 0; }
  .service-card:hover .service-card-link { gap: 6px; color: var(--sand); }

  .nav-cta:hover { transform: none; background: var(--terracotta); }

  .social-link:hover { border-color: rgba(196, 168, 130, 0.2); background: transparent; }
  .social-link:hover svg { stroke: rgba(247, 243, 238, 0.5); }

  .project-overlay, .gallery-overlay { opacity: 1; }
}

/* ============================================================
   25. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-scroll-line { animation: none; }
  html { scroll-behavior: auto; }
}
