/* ===== DESIGN TOKENS ===== */
:root {
  --bg-base: #F5F1EB;
  --bg-surface: #ede9e0;
  --bg-card: #faf8f5;
  --bg-card-hover: #f0ece4;
  --gold: #C8A96A;
  --gold-light: #d4bc8d;
  --gold-dim: rgba(200,169,106,0.12);
  --cyber-blue: #4a7fa5;
  --cyber-blue-dim: rgba(74,127,165,0.1);
  --electric-white: #1a1815;
  --text-primary: #2A2A2A;
  --text-secondary: #5a5248;
  --text-muted: #9a9080;
  --border: rgba(14,14,12,0.1);
  --border-hover: rgba(200,169,106,0.4);
  --radius: 12px;
  --radius-sm: 6px;
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --transition: 0.4s var(--ease-out);
  --font-display: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-sub: 'Montserrat', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
canvas { display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* Custom Scrollbar */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: rgba(139,111,71,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ===== NAVBAR ===== */
#navbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 50px 80px;
  transition: all 0.4s ease;
}
#navbar.scrolled {
  position: fixed;
  background: rgba(245,241,235,0.95);
  backdrop-filter: blur(15px);
  padding: 20px 80px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}
/* Removed unused nav-logo-icon */
.nav-logo span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.nav-links {
  display: flex; align-items: center; gap: 4rem; list-style: none;
  margin-top: 10px;
}
.nav-link {
  font-size: 0.75rem; font-weight: 300; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-secondary);
  transition: opacity 0.3s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--gold); transition: width 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta {
  background: var(--gold-dim); border: 1px solid var(--border-hover);
  padding: 0.55rem 1.2rem; border-radius: 50px; color: var(--gold) !important;
  transition: background 0.3s, border-color 0.3s !important;
}
.nav-cta:hover { background: var(--gold); color: var(--bg-base) !important; border-color: var(--gold); }
.nav-cta::after { display: none !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; }
.nav-hamburger span {
  display: block; width: 24px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px 80px 80px 80px;
  position: relative;
  z-index: 2;
  max-width: 900px;
}
.hero-right {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 1;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 900px;
}
.hero-eyebrow {
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 2.5rem 0;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #b38b55;
}
.hero-sub {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 4rem 0;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.hero-img-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: heroFadeIn 1.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroFadeIn {
  to { opacity: 1; }
}
.hero-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  animation: heroZoomOut 15s ease-out forwards;
  filter: sepia(0.3) saturate(1.15) brightness(0.95);
}
@keyframes heroZoomOut {
  to { transform: scale(1); }
}
.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(74, 52, 28, 0.25) 0%, rgba(245,242,236,0) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}
.hero-img-wrap:hover img { 
  transform: scale(1.03); 
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* Removed hero logo as requested */

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-base) 0%, rgba(245,241,235,0.8) 15%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 4rem;
  z-index: 2; display: flex; align-items: center; gap: 1rem;
}
.hero-scroll-hint span {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted);
}
.scroll-line {
  width: 50px; height: 1px;
  background: var(--border);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, #6b4f2a 100%);
  color: #f5f2ec; font-family: var(--font-sub); font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.9rem 2.2rem; border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(139,111,71,0.15), 0 0 0 0 rgba(139,111,71,0); 
}
.btn-primary:hover {
  filter: brightness(1.15); 
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139,111,71,0.4), 0 0 20px rgba(139,111,71,0.3);
}
/* Glassmorphism ghost button */
.btn-ghost-glass {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(14,14,12,0.04);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--gold); font-family: var(--font-sub); font-weight: 500;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.9rem 2.2rem; border-radius: 50px;
  border: 1px solid rgba(139,111,71,0.45);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 rgba(139,111,71,0), 0 0 0 rgba(139,111,71,0);
}
.btn-ghost-glass:hover {
  background: rgba(139,111,71,0.12);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: inset 0 0 20px rgba(139,111,71,0.15), 0 8px 24px rgba(139,111,71,0.25);
}
/* Legacy ghost (used elsewhere) */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--text-primary); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-radius: 50px; border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.3s, transform 0.2s, background 0.3s;
}
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-2px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--gold); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  padding: 0.75rem 1.75rem; border-radius: 50px; border: 1px solid var(--border-hover);
  transition: background 0.3s, transform 0.2s;
}
.btn-outline:hover { background: var(--gold-dim); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 7rem 0; }
.section-dark { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tag {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300; line-height: 1.1; margin-bottom: 3rem;
}
.section-title em { font-style: italic; color: var(--gold-light); }

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===== WALL OF RENDERS — Mixed Aspect Ratio Grid ===== */
.projects-grid.edge-to-edge {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 380px;
  gap: 2px;               /* hairline dark gap — editorial divider effect */
  background: #1a1815;    /* gap color rendered as dark lines */
  width: 100%;
}

.projects-grid.edge-to-edge .project-card {
  border-radius: 0;
  border: none;
  height: 100%;           /* fill the grid row precisely */
}
.projects-grid.edge-to-edge .project-img-wrap {
  aspect-ratio: unset;    /* let the grid control height, not aspect-ratio */
  height: 100%;
}

/* Featured card: tall portrait — spans 2 rows */
.projects-grid.edge-to-edge .project-card.featured {
  grid-row: span 2;
}

/* Edge-to-edge hover: no lift, just zoom+brighten */
.projects-grid.edge-to-edge .project-card:hover {
  transform: none;
  box-shadow: none;
  z-index: 10;
}

@media (max-width: 1024px) {
  .projects-grid.edge-to-edge {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
  }
  .projects-grid.edge-to-edge .project-card.featured {
    grid-row: span 2; /* keep tall on tablet */
  }
}
@media (max-width: 768px) {
  .projects-grid.edge-to-edge {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
    gap: 2px;
  }
  .projects-grid.edge-to-edge .project-card.featured {
    grid-row: span 1; /* no spanning on mobile — equal height */
  }
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #000; /* Backdrop for loading images */
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.project-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  z-index: 10;
}
.project-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
/* Subtle Luxury Watermark */
.project-img-wrap::after {
  content: "RENARC DESIGN";
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--gold);
  opacity: 0.35;
  z-index: 10;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.project-img-wrap img, .project-img-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  filter: brightness(0.95) blur(0.4px);
}
.project-card:hover .project-img-wrap img, .project-card:hover .project-img-wrap canvas {
  transform: scale(1.1);
  filter: brightness(1.05) blur(0.4px);
}

/* Smart Overlay with project labels */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,0.88) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
  z-index: 5;
  gap: 0.75rem;
}

/* Project label — left side of overlay */
.project-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}
.project-title {
  color: rgba(255,255,255,0.95);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.project-type {
  color: var(--gold-light);
  font-family: var(--font-sub);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.project-copyright {
  color: rgba(255,255,255,0.9);
  font-family: var(--font-sub);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(139,111,71,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 4px;
  user-select: none;
  flex-shrink: 0;
}

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

.project-card::after {
  display: none;
}

/* Removed project-info styles as they are no longer used */


/* ===== FEATURED SHOWCASE ===== */
.showcase {
  position: relative;
  height: 90vh; /* Taller section for a cinematic feel */
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}
.showcase-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.showcase-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%; /* Keeps the church spires perfectly framed */
  transform: scale(1.05); /* Pre-zoom for parallax feel */
  opacity: 0.9;
  filter: blur(0.4px);
}
.showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,24,21,0.9) 0%, rgba(26,24,21,0.4) 50%, transparent 100%);
  z-index: 2;
}
.showcase-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
  color: #fff;
}
.showcase-content .section-title { color: #fff; margin-bottom: 2rem; }
.showcase-content .section-title em { color: var(--gold); }
.showcase-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.8);
  margin-bottom: 3rem;
  max-width: 480px;
}

/* ===== GLOBAL IMAGE OPTIMIZATION ===== */
img, canvas {
  content-visibility: auto;
  transition: opacity 0.5s ease;
}
/* Project & hero images need full container coverage */
.project-img-wrap img,
.project-img-wrap canvas,
.hero-img-wrap img,
.showcase-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
img.lazy-image, canvas.canvas-lazy {
  opacity: 0;
}
img.visible, img:not(.lazy-image), canvas.canvas-lazy.visible {
  opacity: 1;
}
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem 2rem;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.service-card:hover {
  border-color: var(--border-hover); transform: translateY(-6px);
  background: var(--bg-card-hover);
}
.service-icon {
  width: 52px; height: 52px; margin-bottom: 1.5rem;
  color: var(--gold); opacity: 0.85;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  margin-bottom: 0.75rem;
}
.service-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; }


/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start;
}
.contact-body { color: var(--text-secondary); line-height: 1.9; margin-bottom: 2rem; font-size: 1rem; }
.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { 
  display: flex; align-items: center; gap: 1rem; 
  font-size: 0.9rem; color: var(--text-secondary); 
  transition: color 0.3s; 
}
a.contact-item:hover { color: var(--gold); }
.contact-icon { font-size: 1rem; width: 20px; flex-shrink: 0; display: flex; align-items: center; }
.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.form-group label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  color: var(--text-primary); font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none; resize: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); font-style: italic; font-weight: 300; opacity: 0.8; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-group select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.form-group select option { background: var(--bg-card); }
.form-success {
  text-align: center; color: #6fcf97; font-size: 0.875rem;
  margin-top: 1rem; padding: 0.75rem; background: rgba(111,207,151,0.1);
  border-radius: var(--radius-sm); border: 1px solid rgba(111,207,151,0.25);
}

/* ===== FOOTER ===== */
.footer { background: var(--bg-surface); padding: 2.5rem 0 3.5rem; border-top: 1px solid rgba(14,14,12,0.08); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; padding-right: 4rem; }
.footer-brand { 
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Removed unused footer-logo-icon */
.footer-brand span {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.footer-copy { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-sub); }
.footer-socials { display: flex; gap: 1.5rem; }
.footer-socials a { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); transition: color 0.3s; font-family: var(--font-sub); }
.footer-socials a:hover { color: var(--text-primary); }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(245,242,236,0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  animation: modalFadeIn 0.3s var(--ease-out);
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-img {
  width: 100%; max-width: 1200px; max-height: 90vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 10px 40px rgba(14,14,12,0.18);
  animation: modalSlideUp 0.3s var(--ease-out);
  filter: blur(0.4px); /* micro blur protection */
}
/* Subtle Luxury Watermark in Lightbox */
.lightbox-overlay::after {
  content: "RENARC DESIGN";
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  color: var(--gold);
  opacity: 0.35;
  z-index: 2020;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  white-space: nowrap;
}

.lightbox-close {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 2010;
  height: 44px; border-radius: 50px; padding: 0 1.25rem;
  background: var(--gold); color: #fff;
  font-family: var(--font-sub); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: all 0.3s var(--ease-out);
  cursor: pointer; border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.lightbox-close:hover {
  background: #fff; color: var(--gold); border-color: var(--gold);
  transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* ===== SCROLL REVEALS ===== */
.reveal-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ===== PROJECTS HEADER & FILTER TABS ===== */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.projects-header .section-title { margin-bottom: 0; }
.filter-tabs {
  display: flex;
  gap: 4px;
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px;
  flex-shrink: 0;
}
.filter-tab {
  font-family: var(--font-sub);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--bg-base);
  box-shadow: 0 0 18px rgba(201,168,76,0.35);
}
.project-card.hidden { display: none; }


/* ===== RESPONSIVE ===== */

/* ── Tablet ── */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }

  /* Showcase: reduce padding on tablet */
  .showcase-content { padding: 0 2rem; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {

  /* NAVBAR */
  #navbar { padding: 1rem 1.5rem; }
  #navbar.scrolled { padding: 0.75rem 1.5rem; }
  .nav-logo span { font-size: 1.15rem; }
  .nav-hamburger { display: flex; }

  /* Mobile nav drawer */
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(245,241,235,0.98); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column; gap: 0;
    padding: 5rem 0 2rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-left: 1px solid var(--border);
    z-index: 999;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
  .nav-link {
    display: block; padding: 1.1rem 2rem;
    font-size: 0.85rem; color: var(--text-primary);
  }
  .nav-cta {
    margin: 1.5rem 2rem 0;
    display: block; text-align: center;
    background: var(--gold-dim);
  }

  /* HERO — stack, show image as background */
  .hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
    position: relative;
  }
  /* Show hero image as a background behind text on mobile */
  .hero-right {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 0;
  }
  .hero-img-wrap img { object-position: center center; }
  /* Dark overlay so text stays readable over image */
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(245,241,235,0.85) 0%,
      rgba(245,241,235,0.75) 50%,
      rgba(245,241,235,0.92) 100%
    );
  }
  .hero-left {
    padding: 7rem 1.5rem 5rem;
    max-width: 100%;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    min-height: 100svh;
    justify-content: center;
  }
  .hero-sub { max-width: 100%; font-size: 1rem; margin-bottom: 2.5rem; }
  .hero-actions { flex-wrap: wrap; justify-content: center; gap: 0.875rem; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost-glass {
    width: 100%; justify-content: center;
    max-width: 280px;
  }
  .hero-scroll-hint {
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.5rem;
  }

  /* SECTIONS */
  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }
  .section-title { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 2rem; }

  /* PROJECTS GRID — single column, fixed height */
  .projects-grid.edge-to-edge {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
    gap: 2px;
  }
  .projects-grid.edge-to-edge .project-card.featured {
    grid-row: span 1; /* equal height on mobile */
  }
  /* Fix: ensure images fill their containers without overflow */
  .project-card { overflow: hidden; }
  .project-img-wrap { height: 100%; aspect-ratio: unset; overflow: hidden; }
  .project-img-wrap img,
  .project-img-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
  }
  /* Always show overlay on mobile (no hover on touch) */
  .project-overlay { opacity: 1; }

  /* Projects header */
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  /* Filter tabs: scroll horizontally if needed */
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    max-width: 100%;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }

  /* SHOWCASE */
  .showcase {
    height: 60vh;
    min-height: 380px;
  }
  .showcase-overlay {
    background: linear-gradient(
      to bottom,
      rgba(26,24,21,0.7) 0%,
      rgba(26,24,21,0.5) 60%,
      transparent 100%
    );
  }
  .showcase-content {
    padding: 0 1.5rem;
    max-width: 100%;
  }
  .showcase-body { font-size: 1rem; margin-bottom: 2rem; }

  /* SERVICES */
  .services-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .service-card { padding: 1.75rem 1.25rem; }

  /* CONTACT */
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-form { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }

  /* FOOTER */
  .footer { padding: 2rem 0; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    justify-content: center;
    padding-right: 0;
    padding-bottom: 1.5rem;
  }
  .footer-socials { justify-content: center; }

  /* LIGHTBOX */
  .lightbox-overlay { padding: 1rem; }
  .lightbox-img { max-height: 80vh; border-radius: 4px; }
  .lightbox-close {
    top: 0.75rem; right: 0.75rem;
    height: 36px; padding: 0 1rem; font-size: 0.75rem;
  }
  /* Lightbox watermark */
  .lightbox-overlay::after {
    font-size: 0.65rem; letter-spacing: 0.35em; bottom: 20px;
  }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }

  .hero-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-left { padding: 6rem 1.25rem 4rem; }

  .projects-grid.edge-to-edge { grid-auto-rows: 220px; }

  .filter-tab { padding: 6px 12px; font-size: 0.6rem; }

  .showcase { height: 50vh; min-height: 320px; }
  .showcase-content .section-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .showcase-body { font-size: 0.9rem; max-width: 100%; }

  .btn-primary, .btn-ghost-glass {
    font-size: 0.7rem; padding: 0.8rem 1.75rem;
  }

  .contact-form { padding: 1.25rem; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 1rem; /* prevents iOS zoom on focus */
  }

  .footer-brand span { font-size: 0.9rem; }
}

/* ── Very small (≤ 360px) ── */
@media (max-width: 360px) {
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost-glass { max-width: 100%; }
  .projects-grid.edge-to-edge { grid-auto-rows: 200px; }
}
/* ===== FLOATING WHATSAPP BUTTON ===== */
.whatsapp-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  animation: fabPop 0.5s 1s var(--ease-out) both;
}
.whatsapp-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55), 0 4px 12px rgba(0,0,0,0.2);
}
@keyframes fabPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
@media (max-width: 480px) {
  .whatsapp-fab { bottom: 1.25rem; right: 1.25rem; width: 50px; height: 50px; }
}
