/* -----------------------------------------------
   CSS VARIABLES & RESET
----------------------------------------------- */
:root {
  --cream:       #F5F0E8;
  --cream-dark:  #EDE6D8;
  --gold:        #B8935A;
  --gold-light:  #D4AC72;
  --gold-pale:   #E8D5B0;
  --charcoal:    #1A1A1A;
  --dark-bg:     #111009;
  --moss:        #1C1E17;
  --text:        #1A1A1A;
  --text-muted:  #5A5044;
  --text-light:  #F0EAE0;
  --white:       #FFFFFF;
  --border:      rgba(184,147,90,0.25);

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  --transition:  0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
}

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

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

body {
  background-color: var(--cream);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.gallery-item img,
.service-card img,
.project-card img,
.about-photo-wrap img {
  pointer-events: auto;
}

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

/* -----------------------------------------------
   UTILITY CLASSES
----------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.gold-line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 32px;
}

.gold-line--left {
  margin: 0 0 24px;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

/* Scroll reveal base state */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* -----------------------------------------------
   NAVBAR
----------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 28px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: var(--cream);
  padding: 16px 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color var(--transition-fast);
}

#navbar.scrolled .nav-logo {
  color: var(--charcoal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color var(--transition-fast);
  position: relative;
}

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

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

#navbar.scrolled .nav-links a {
  color: var(--text-muted);
}

#navbar.scrolled .nav-links a:hover {
  color: var(--charcoal);
}

/* Language toggle */
.lang-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(240,234,224,0.75);
  background: transparent;
  border: 1px solid rgba(184,147,90,0.35);
  padding: 5px 11px;
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.lang-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

#navbar.scrolled .lang-btn {
  color: var(--text-muted);
}

#navbar.scrolled .lang-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all var(--transition-fast);
}

#navbar.scrolled .nav-hamburger span {
  background: var(--charcoal);
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  transition: color var(--transition-fast);
}

.nav-drawer a:hover { color: var(--gold); }

/* -----------------------------------------------
   HERO
----------------------------------------------- */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* REPLACE: hero-background.jpg — recommended: dramatic architectural interior with rich textures */
  /* background set dynamically by main.js */
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
  filter: brightness(0.42) saturate(0.7);
}

#hero.loaded .hero-bg {
  transform: scale(1);
}

/* Subtle warm overlay */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12,9,4,0.15) 0%,
    rgba(12,9,4,0.05) 40%,
    rgba(12,9,4,0.55) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1.1s 0.3s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1.1s 0.55s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-pale);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 300;
  font-style: italic;
  color: rgba(240,234,224,0.82);
  letter-spacing: 0.03em;
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 1.1s 0.8s forwards;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1.1s 1.05s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--charcoal);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
}

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

/* Scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s 1.6s forwards;
}

.hero-scroll span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s 2s infinite;
}

/* -----------------------------------------------
   SECTION WRAPPER
----------------------------------------------- */
.section {
  padding: 120px 0;
}

.section--dark {
  background: var(--dark-bg);
  color: var(--text-light);
}

.section--moss {
  background: var(--moss);
  color: var(--text-light);
}

.section--cream-alt {
  background: var(--cream-dark);
}

/* Decorative gold divider */
.gold-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.4;
}

/* -----------------------------------------------
   ABOUT — SECTION A (Bio)
----------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}

.about-photo-wrap::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  right: 16px;
  bottom: 16px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  /* REPLACE: rafael-cueto-portrait.jpg — Foto profesional de Rafael Cueto en su estudio */
  filter: saturate(0.85);
}

.about-text {
  padding-top: 8px;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: 32px;
}

.about-text h2 em {
  font-style: italic;
  color: var(--gold);
}

.about-text p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.about-text p strong {
  color: var(--charcoal);
  font-weight: 400;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}


.stat-num {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* -----------------------------------------------
   SERVICES
----------------------------------------------- */
.services-header {
  text-align: center;
  margin-bottom: 80px;
}

.services-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.1;
  margin-bottom: 20px;
}

.services-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  font-style: italic;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 460px 460px;
  gap: 2px;
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  height: 100%;
}

.service-card:first-child,
.service-card:nth-child(4) {
  grid-column: span 2;
}

.service-card--large {
  grid-column: span 2;
}

.service-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65) saturate(0.75);
  transition: transform 0.8s ease, filter 0.8s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.service-card:hover .service-card-img {
  transform: scale(1.06);
  filter: brightness(0.5) saturate(0.6);
}

.service-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 32px;
}

.service-num {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.service-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.1;
}

.service-desc {
  font-size: 13px;
  color: rgba(240,234,224,0.72);
  line-height: 1.65;
  max-width: 360px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-card:hover .service-desc {
  opacity: 1;
  transform: translateY(0);
}

.service-card[data-technique] {
  cursor: pointer;
}

.service-view-works {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.service-card[data-technique]:hover .service-view-works {
  opacity: 1;
  transform: translateY(0);
}

.service-line {
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 12px;
}

.services-note {
  text-align: center;
  margin-top: 64px;
  padding: 40px;
  border: 1px solid var(--border);
}

.services-note p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .service-card--mobile-active .service-card-img {
    filter: brightness(0.5) saturate(0.6);
  }
  .service-card--mobile-active .service-desc {
    opacity: 1;
    transform: translateY(0);
  }
  .service-card--mobile-active .service-view-works {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -----------------------------------------------
   GALLERY
----------------------------------------------- */
.gallery-header {
  text-align: center;
  margin-bottom: 60px;
}

.gallery-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 48px;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid rgba(184,147,90,0.3);
  background: transparent;
  color: rgba(240,234,224,0.6);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

/* Gallery — Technique Description Block */
.technique-desc-block {
  display: grid;
  grid-template-columns: 35fr 65fr;
  column-gap: 80px;
  align-items: start;
  padding: 32px 0 0;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.technique-desc-block::after {
  content: '';
  display: block;
  grid-column: 1 / -1;
  height: 1px;
  background: var(--gold);
  opacity: 0.2;
  margin-top: 48px;
}

.technique-desc-block.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.technique-desc-title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.technique-desc-sep {
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin: 10px 0 12px;
}

.technique-desc-meta {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.5;
}

.technique-desc-text {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.75;
  color: rgba(240, 234, 224, 0.65);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--charcoal);
}

.gallery-item--tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

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

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.5s ease;
  filter: saturate(0.82);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
  filter: saturate(1) brightness(0.75);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,9,4,0);
  transition: background 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(12,9,4,0.35);
}

.gallery-icon {
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: var(--white);
}

.gallery-item:hover .gallery-icon {
  opacity: 1;
  transform: scale(1);
}

.gallery-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--white);
  fill: none;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8,6,3,0.95);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

#lightbox.open { display: flex; }

#lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.lightbox-close:hover { color: var(--white); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  padding: 14px 18px;
  cursor: pointer;
  font-size: 20px;
  transition: all var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Masonry-style gallery for visual interest */
.gallery-item:nth-child(3) { grid-row: span 2; aspect-ratio: auto; }
.gallery-item:nth-child(7) { grid-column: span 2; }
.gallery-item:nth-child(11) { grid-row: span 2; aspect-ratio: auto; }

/* -----------------------------------------------
   GALLERY VIEW TABS
----------------------------------------------- */
.gallery-view-tabs {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 40px;
}

.gallery-tab-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 40px;
  background: transparent;
  color: rgba(240,234,224,0.45);
  border: 1px solid rgba(184,147,90,0.2);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-tab-btn.active {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.gallery-tab-btn:hover:not(.active) {
  color: rgba(240,234,224,0.8);
  border-color: rgba(184,147,90,0.5);
}

/* -----------------------------------------------
   PROJECTS GRID
----------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--charcoal);
  aspect-ratio: 4/3;
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(0.8);
  transition: transform 0.7s ease, filter 0.5s ease;
}

.project-card:hover .project-card-img {
  transform: scale(1.06);
  filter: brightness(0.5) saturate(0.6);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
  background: linear-gradient(to top, rgba(12,9,4,0.85) 0%, transparent 65%);
}

.project-card-name {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.1;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 3px 8px;
  border: 1px solid rgba(184,147,90,0.4);
  background: rgba(12,9,4,0.4);
}

/* -----------------------------------------------
   PROJECT MODAL
----------------------------------------------- */
#project-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(8,6,3,0.97);
  align-items: center;
  justify-content: center;
}

#project-modal.open { display: flex; }

.project-modal-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 360px;
  width: 92vw;
  max-width: 1120px;
  max-height: 88vh;
  overflow: hidden;
}

.project-modal-images {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal-main-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.project-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition-fast);
  z-index: 1;
}

.project-modal-nav:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.project-modal-prev { left: 12px; }
.project-modal-next { right: 12px; }


.project-modal-info {
  background: var(--dark-bg);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.project-modal-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.project-modal-name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.05;
  margin-bottom: 24px;
}

.project-modal-desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(240,234,224,0.6);
  margin-bottom: 36px;
}

.project-modal-tags-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,234,224,0.3);
  margin-bottom: 12px;
}

.project-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-modal-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 6px 14px;
  border: 1px solid rgba(184,147,90,0.35);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.project-modal-tag:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.project-modal-counter {
  margin-top: 28px;
  font-size: 11px;
  color: rgba(240,234,224,0.22);
  letter-spacing: 0.12em;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: color var(--transition-fast);
}

.project-modal-close:hover { color: var(--white); }

/* -----------------------------------------------
   CONTACT
----------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.05;
  margin-bottom: 24px;
}

.contact-left h2 em {
  font-style: italic;
  color: var(--gold);
}

.contact-left p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-info-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.contact-info-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-info-text a:hover { color: var(--gold); }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link:hover {
  border-color: var(--gold);
  background: var(--gold);
}

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

.social-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  transition: stroke var(--transition-fast);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-label .req { color: var(--gold); }

.form-input,
.form-select,
.form-textarea {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  width: 100%;
}

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

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #c0392b;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select-wrap {
  position: relative;
}

.form-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.form-error {
  font-size: 11px;
  color: #c0392b;
  letter-spacing: 0.05em;
  display: none;
}

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

.form-submit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.btn-submit {
  flex: 1;
  padding: 18px;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-submit:hover { background: var(--gold); color: var(--charcoal); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Form feedback */
.form-feedback {
  display: none;
  padding: 18px 20px;
  border-left: 3px solid;
  font-size: 13px;
}

.form-feedback.success {
  display: block;
  border-color: var(--gold);
  background: rgba(184,147,90,0.08);
  color: var(--text-muted);
}

.form-feedback.error-msg {
  display: block;
  border-color: #c0392b;
  background: rgba(192,57,43,0.08);
  color: #c0392b;
}

/* -----------------------------------------------
   FOOTER
----------------------------------------------- */
footer {
  background: var(--dark-bg);
  padding: 64px 0 40px;
  color: var(--text-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 60px;
  margin-bottom: 56px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.footer-tagline {
  font-size: 12px;
  color: rgba(240,234,224,0.45);
  letter-spacing: 0.12em;
  font-style: italic;
}

.footer-center {
  text-align: center;
}

.footer-center .gold-line {
  margin: 0 auto 20px;
  width: 40px;
}

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

.footer-nav a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240,234,224,0.5);
  transition: color var(--transition-fast);
}

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

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-link {
  font-size: 13px;
  color: rgba(240,234,224,0.6);
  transition: color var(--transition-fast);
}

.footer-contact-link:hover { color: var(--gold); }

.footer-location {
  font-size: 12px;
  color: rgba(240,234,224,0.35);
  font-style: italic;
}

.footer-social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.footer-social .social-link {
  border-color: rgba(240,234,224,0.15);
}

.footer-social .social-link svg { stroke: rgba(240,234,224,0.45); }

.footer-bottom {
  border-top: 1px solid rgba(240,234,224,0.08);
  padding-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-copy {
  font-size: 11px;
  color: rgba(240,234,224,0.25);
  letter-spacing: 0.1em;
}

/* -----------------------------------------------
   KEYFRAMES
----------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (max-width: 1100px) {
  .about-grid { grid-template-columns: 300px 1fr; gap: 56px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: 380px 380px; }
  .service-card:first-child,
  .service-card:nth-child(4) { grid-column: span 2; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(11) { grid-row: span 1; }
}

@media (max-width: 900px) {
  .container { padding: 0 32px; }
  .section { padding: 88px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo { aspect-ratio: 4/3; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-center { display: none; }
  .footer-right { text-align: left; }
  .footer-social { justify-content: flex-start; }

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

  .project-modal-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    width: 100vw;
    max-height: 100dvh;
    overflow-y: auto;
  }
  .project-modal-main-img { max-height: 88vh; }
  .project-modal-info { padding: 28px 24px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo { font-size: 19px; }

  .hero-actions .btn { padding: 14px 28px; font-size: 10px; }

  .services-grid { grid-template-columns: 1fr; grid-template-rows: unset; }
  .service-card,
  .service-card:first-child,
  .service-card:nth-child(4) { grid-column: 1; aspect-ratio: 4/3; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(3) { grid-row: span 1; }
  .gallery-item:nth-child(7) { grid-column: span 1; }

  .technique-desc-block { grid-template-columns: 1fr; column-gap: 0; row-gap: 24px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-right { text-align: left; }
  .footer-social { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .hero-title { font-size: 44px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .about-stats { gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .projects-grid { grid-template-columns: 1fr; }
  .gallery-tab-btn { padding: 11px 24px; }
}
