/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FAF9F7;
  --text: #1A1816;
  --muted: #6B6560;
  --accent: #8B7355;
  --accent-light: #C4B5A0;
  --border: #E8E4DF;
  --white: #FFFFFF;
  
  --shadow-sm: 0 1px 2px rgba(26,24,22,0.04);
  --shadow-md: 0 4px 12px rgba(26,24,22,0.08);
  --shadow-lg: 0 12px 32px rgba(26,24,22,0.12);
  
  --header-h: 72px;
  --container: 1100px;
  --gutter: 24px;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

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

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

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.center {
  text-align: center;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.125rem; }

.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

.section-title {
  margin-bottom: 48px;
}

/* ===== Button ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--text);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--light {
  background: var(--white);
  color: var(--text);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(250,249,247,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.logo span {
  font-weight: 300;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.lang-switch {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px;
}

.lang-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: none;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--text);
  color: var(--white);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 80px) 0 100px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.92)), url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero__title {
  margin: 16px 0 24px;
}

.hero .lead {
  margin-bottom: 40px;
}

/* ===== Services ===== */
.services {
  padding: 100px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  padding: 40px 32px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card__icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ===== About Section ===== */
.about {
  padding: 100px 0;
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.about__content {
  max-width: 560px;
}

.about__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 24px;
}

.about__lead {
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  font-weight: 500;
}

.about__text {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about__signature {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about__name {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
}

.about__role {
  font-size: 0.875rem;
  color: var(--accent);
}

.about__visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__photo {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* ===== Projects Grid (Instagram style) ===== */
.projects {
  padding: 100px 0;
}

.filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter__btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}

.filter__btn:hover,
.filter__btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--white);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
  background: var(--border);
}

.grid__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,24,22,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}

.grid__item:hover img {
  transform: scale(1.05);
}

.grid__hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.grid__item:hover .grid__hover {
  opacity: 1;
}

.instagram-link {
  text-align: center;
  margin-top: 48px;
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn--outline:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--white);
}

.btn--outline:hover svg {
  stroke: var(--white);
}

/* ===== CTA ===== */
.cta {
  padding: 100px 0;
  background: var(--text);
  color: var(--white);
}

.cta h2 {
  margin-bottom: 16px;
}

.cta .lead {
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}

/* ===== Contact ===== */
.contact {
  padding: 100px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
}

.contact__item {
  margin-bottom: 24px;
}

.contact__item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact__item a,
.contact__item p {
  font-size: 1.125rem;
  color: var(--text);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__form input,
.contact__form textarea {
  padding: 16px 20px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,115,85,0.1);
}

.contact__form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ===== Lightbox (Instagram-style) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  z-index: 10;
}

.lightbox__close:hover {
  opacity: 0.7;
}

.lightbox__container {
  display: flex;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  max-width: 1000px;
  max-height: 90vh;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  position: relative;
}

.lightbox__image-side {
  position: relative;
  flex: 1.2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 105;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lightbox__nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox__prev { left: calc(50% - 560px); }
.lightbox__next { right: calc(50% - 560px); }

.lightbox__info-side {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 400px;
}

.lightbox__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.lightbox__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.lightbox__author strong {
  display: block;
  font-size: 0.875rem;
}

.lightbox__date {
  font-size: 0.75rem;
  color: var(--muted);
}

.lightbox__content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.lightbox__title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.lightbox__description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}

.lightbox__category-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: capitalize;
}

.lightbox__actions {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lightbox__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.lightbox__action-btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.lightbox__action-btn:hover svg {
  stroke: white;
}

/* Carousel Indicators */
.lightbox__indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.lightbox__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.lightbox__indicator:hover {
  background: rgba(255,255,255,0.8);
}

.lightbox__indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Carousel Navigation (inside image) */
.lightbox__carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  color: #333;
}

.lightbox__carousel-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox__carousel-prev { left: 16px; }
.lightbox__carousel-next { right: 16px; }

/* Image caption styling */
.lightbox__caption {
  color: var(--accent);
  font-style: italic;
  font-size: 0.95rem;
}

/* Multi-image indicator on grid */
.grid__multi-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.grid__multi-indicator svg {
  width: 14px;
  height: 14px;
}

/* Responsive Lightbox */
@media (max-width: 800px) {
  .lightbox {
    padding: 0;
  }
  
  .lightbox__container {
    flex-direction: column;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .lightbox__image-side {
    min-height: 300px;
    max-height: 50vh;
  }
  
  .lightbox__info-side {
    min-width: 100%;
    max-width: 100%;
  }
  
  .lightbox__nav {
    width: 44px;
    height: 44px;
    position: fixed;
  }
  
  .lightbox__prev { left: 16px; }
  .lightbox__next { right: 16px; }
  
  /* Carousel responsive */
  .lightbox__carousel-nav {
    width: 36px;
    height: 36px;
  }
  
  .lightbox__carousel-prev { left: 8px; }
  .lightbox__carousel-next { right: 8px; }
  
  .lightbox__indicators {
    bottom: 12px;
    gap: 6px;
  }
  
  .lightbox__indicator {
    width: 6px;
    height: 6px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .services__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .about__visual {
    order: -1;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }
  
  .nav,
  .lang-switch {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero {
    padding-top: calc(var(--header-h) + 48px);
    min-height: auto;
    padding-bottom: 64px;
  }
  
  .services,
  .projects,
  .cta,
  .contact,
  .about {
    padding: 64px 0;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .filter {
    gap: 6px;
  }
  
  .filter__btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }
  
  .footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
