/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* ===== DESIGN SYSTEM ===== */
:root {
  --background: #ffffff;
  --foreground: #000000;
  --primary: #E60000;
  --primary-foreground: #ffffff;
  --border: #e5e5e5;
  --muted-foreground: #737373;
  --container-padding: 1rem;
  --section-padding-y: 4rem;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.loaded {
  opacity: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  max-width: 65ch;
  margin-bottom: 1rem;
}

/* Utilities */
.font-light { font-weight: 300; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.italic { font-style: italic; }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.flex-1 { flex: 1; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-10 { padding-top: 2.5rem; }
.pt-12 { padding-top: 3rem; }
.pb-20 { padding-bottom: 5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.max-w-none { max-width: none; }
.prose { max-width: 65ch; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
}
.logo img {
  height: 3rem;
  width: auto;
  transition: opacity var(--transition-fast);
}
.logo:hover { opacity: 0.8; }

/* Desktop nav */
.desktop-nav {
  display: none;
  gap: 2.5rem;
}
.desktop-nav a {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--foreground);
  text-decoration: none;
  transition: color var(--transition-normal);
}
.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary);
}

/* Mobile toggle */
.mobile-toggle {
  display: block;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.mobile-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile nav sheet */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--background);
  border-left: 1px solid var(--border);
  padding: 2rem;
  transition: right var(--transition-normal);
  z-index: 100;
}
.mobile-nav.open { right: 0; }
.mobile-nav nav a {
  display: block;
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground);
  text-decoration: none;
  transition: color var(--transition-normal);
}
.mobile-nav nav a:hover,
.mobile-nav nav a.active {
  color: var(--primary);
}
.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .mobile-toggle, .mobile-nav { display: none; }
  .py-16 { padding-top: 5rem; padding-bottom: 5rem; }
}

/* ===== HERO GALLERY (homepage) ===== */
.hero-gallery {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
}
@media (min-width: 768px) { .hero-gallery { height: 70vh; } }
@media (min-width: 1024px) { .hero-gallery { height: 80vh; } }

.gallery-track {
  display: flex;
  animation: scroll 30s linear infinite;
  width: max-content;
}
.gallery-track img {
  width: 100vw;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

/* ===== CATEGORIES (homepage) ===== */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.category-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition: transform var(--transition-normal);
}
.category-item:hover { transform: translateY(-0.5rem); }
.category-icon svg {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--foreground);
  stroke-width: 1;
  transition: color var(--transition-normal), transform var(--transition-slow);
}
.category-item:hover .category-icon svg {
  color: var(--primary);
  transform: scale(1.1);
}
@media (min-width: 768px) {
  .category-icon svg { width: 5rem; height: 5rem; }
}
.category-label {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition-normal);
}
.category-item:hover .category-label {
  color: var(--primary);
}

/* ===== WORK PAGE FILTERS ===== */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.filter-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.025em;
  color: var(--foreground);
  cursor: pointer;
  transition: color var(--transition-normal);
  padding: 0.5rem 0;
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--primary);
}

/* ===== WORK GALLERY (masonry) ===== */
.work-grid {
  column-count: 1;
  column-gap: 0.5rem;
}
@media (min-width: 640px) { .work-grid { column-count: 2; } }
@media (min-width: 1024px) { .work-grid { column-count: 3; } }
@media (min-width: 1280px) { .work-grid { column-count: 4; } }

.work-item {
  break-inside: avoid;
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.work-item.animate-in,
body.loaded .work-item {
  opacity: 1;
  transform: translateY(0);
}
.work-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}
.work-item:hover img {
  transform: scale(1.05);
}
.work-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition-slow);
}
.work-item:hover .work-item-overlay {
  background: rgba(0,0,0,0.1);
}

/* ===== LIGHTBOX (added) ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.lightbox.active {
  display: flex;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  cursor: default;
}
.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  font-weight: 300;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}
.lightbox-close:hover {
  color: #ccc;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 48rem;
  font-weight: 300;
}
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.form-label .required { color: var(--primary); }
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  background: var(--background);
  color: var(--foreground);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 150px;
}
.form-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--foreground);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.form-submit:hover { background: var(--primary); }
.form-submit:active { transform: scale(0.98); }
.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
@media (min-width: 768px) {
  .form-submit { width: auto; }
}
.form-message {
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  animation: slideIn 0.3s ease;
}
.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 2rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--foreground);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-normal);
}
.footer-links a:hover { color: var(--primary); }
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: #25D366;
  color: white;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  transition: background var(--transition-fast);
}
.whatsapp-btn:hover { background: #20BA5A; }
.whatsapp-btn svg {
  width: 1rem;
  height: 1rem;
}

/* ===== ANIMATION HELPERS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.animate-in,
body.loaded .fade-in {
  opacity: 1;
  transform: translateY(0);
}
img[data-src] {
  opacity: 0;
  transition: opacity 0.2s;
}
img.loaded {
  opacity: 1;
}



.work-item {
  opacity: 1 !important;
  transform: none !important;
}