/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--space-4);
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(250, 247, 244, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-block: var(--space-3);
  box-shadow: var(--shadow-subtle);
}

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

.logo {
  font-family: var(--font-family-hebrew);
  font-size: var(--font-size-xl);
  font-weight: 300;
  color: var(--color-text-primary);
  z-index: 101;
}

.header:not(.scrolled) .logo.light-mode {
  color: var(--color-text-light);
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  transition: color var(--transition-fast);
}

.header:not(.scrolled) .nav-link.light-mode {
  color: var(--color-text-light);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width var(--transition-normal);
}

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

/* The target used to be exactly the size of its own icon — 24×24, the
   smallest thing on the page, and the only way into the menu on a phone. The
   padding is negative margined back out so the header bar does not grow. */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  margin: -10px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
  color: var(--color-text-primary);
}

.header:not(.scrolled) .mobile-menu-btn.light-mode {
  color: var(--color-text-light);
}

/* Testimonials */
.testimonials-section {
  background:
    linear-gradient(105deg, rgb(245 230 232 / .75), rgb(250 247 244 / .95)),
    var(--color-bg-secondary);
  text-align: center;
}

.testimonial-card {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4.75rem);
  background: rgb(255 255 255 / .78);
  border: 1px solid rgb(31 22 20 / .09);
  box-shadow: 0 24px 60px rgb(64 34 28 / .1);
  position: relative;
}

.testimonial-card::before {
  content: '“';
  position: absolute;
  inset-inline-start: 1.25rem;
  top: .15rem;
  color: var(--color-accent);
  font-family: var(--font-family-editorial);
  font-size: 7rem;
  line-height: 1;
  opacity: .17;
}

.review-source {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem;
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  border: 1px solid rgb(31 22 20 / .12);
  border-radius: 999px;
}

.review-pin { color: var(--color-accent); font-size: .7rem; }

.stars {
  color: var(--color-highlight);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

.quote-text {
  font-family: var(--font-family-hebrew);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.8rem);
  font-style: normal;
  line-height: 1.75;
  margin-bottom: var(--space-6);
}

.testimonial-footer { display: flex; align-items: center; justify-content: center; gap: .75rem; }
.review-avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; border: 2px solid white; box-shadow: 0 3px 12px rgb(0 0 0 / .12); }
.review-avatar-fallback { display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); font-weight: 700; }
.client-name {
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: 600;
}

/* CTA Section */
.cta-section {
  background-color: var(--color-accent-soft);
  text-align: center;
}

.cta-section h2 {
  font-size: var(--font-size-3xl);
  color: var(--color-accent);
  margin-bottom: var(--space-8);
}

.contact-form {
  max-width: 720px;
  margin: var(--space-8) auto 0;
  text-align: start;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.contact-field { margin-bottom: var(--space-4); }
.contact-field label { display: block; margin-bottom: var(--space-2); font-size: var(--font-size-sm); }
.contact-field label span { color: rgb(255 255 255 / .72); }
.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgb(255 255 255 / .38);
  background: rgb(255 255 255 / .08);
  color: var(--color-text-light);
  font: inherit;
  padding: .85rem 1rem;
  border-radius: 0;
}
.contact-field textarea { resize: vertical; }
.contact-field input:focus,
.contact-field textarea:focus { outline: 2px solid var(--color-highlight); outline-offset: 2px; }
.contact-status { min-height: 1.6em; margin-top: var(--space-4); }
.contact-status.error { color: #ffd0d0; }
.contact-status.success { color: #fff; }

/* Footer */
.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding-block: var(--space-12) var(--space-4);
  text-align: center;
}

.footer-logo {
  font-size: var(--font-size-2xl);
  font-weight: 300;
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.footer-social a {
  color: var(--color-text-light);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-social a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: var(--font-size-sm);
  opacity: 0.5;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-4);
  margin-top: var(--space-8);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  /* visibility, not just opacity: a transparent dialog is still in the
     tab order, so its close/next/prev buttons could take keyboard focus
     while nothing was on screen. The delay lets the fade finish first. */
  visibility: hidden;
  transition: opacity var(--transition-normal),
              visibility 0s linear var(--transition-normal);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: var(--space-4);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.lightbox-prev:hover, .lightbox-next:hover {
  opacity: 1;
}

.lightbox-next { left: var(--space-4); } /* RTL */
.lightbox-prev { right: var(--space-4); } /* RTL */

.lightbox-counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: var(--font-size-sm);
  letter-spacing: 0.1em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-normal);
    z-index: 100;
  }
  
  .nav-links.active {
    right: 0;
  }

  /* The panel is the whole screen, but each link was only as tall as its own
     text — a 21px target in the middle of 844px of nothing. The padding is
     what makes them hittable with a thumb; the underline animation is keyed
     to ::after on the text, so it is unaffected. */
  .nav-links .nav-link {
    display: block;
    padding: 0.85rem 2rem;
    font-size: var(--font-size-base);
  }


  .header:not(.scrolled) .nav-links.active .nav-link {
    color: var(--color-text-primary);
  }
  
  .mobile-menu-btn {
    display: inline-flex;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-item:nth-child(n) {
    grid-column: span 12;
    aspect-ratio: 4/3;
  }
  .hero-monogram { bottom: 6rem; opacity: .72; }
  .hero-edition { display: none; }
  .portfolio-item-content span { opacity: 1; transform: none; }
  .contact-fields { grid-template-columns: 1fr; gap: 0; }
  
  .category-list-item {
    flex-direction: column;
    gap: var(--space-2);
  }
}
