/* ============ TOKENS ============ */
:root {
  --sand: #EDE7DD;
  --taupe: #C9BEA8;
  --espresso: #3A342C;
  --bronze: #8A7860;
  --ivory: #F7F4EE;
  --line: rgba(58, 52, 44, 0.14);

  --font-display: 'Fraunces', serif;
  --font-body: 'Sora', sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--espresso);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ ANNOUNCEMENT BAR ============ */
.announcement-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  background: var(--espresso);
  color: var(--ivory);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}
.announcement-bar p {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding-left: 100%;
  animation: announceMarquee 16s linear infinite;
}
@keyframes announceMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-bar p { animation: none; padding-left: 0; text-align: center; display: block; }
}
body.has-announcement .site-header { top: 38px; }
body.has-announcement .hero { padding-top: 38px; }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 6vw;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease), top 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(237, 231, 221, 0.88);
  backdrop-filter: blur(10px);
  padding: 16px 6vw;
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.main-nav {
  display: flex;
  gap: 2.5rem;
}
.main-nav a {
  font-size: 0.92rem;
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--espresso);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--espresso);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.social-icon:hover {
  background: var(--espresso);
  color: var(--ivory);
  transform: translateY(-2px);
}

.nav-cta {
  font-size: 0.88rem;
  border: 1px solid var(--espresso);
  padding: 9px 20px;
  border-radius: 100px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-cta:hover { background: var(--espresso); color: var(--ivory); }

@media (max-width: 780px) {
  .main-nav { display: none; }
  .site-header { padding: 18px 5vw; }
  .site-header.scrolled { padding: 14px 5vw; }
  .header-right { gap: 0.9rem; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 1.05rem; }
  .header-right #socialLinks { display: none; }
  .nav-cta { padding: 8px 16px; font-size: 0.8rem; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end start;
  padding: 0;
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 1.8s var(--ease) forwards;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(58,52,44,0.05) 0%, rgba(58,52,44,0.55) 100%);
}
@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  color: var(--ivory);
  padding: 6vw;
  max-width: 640px;
}
.hero-eyebrow {
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: riseIn 0.9s var(--ease) 0.5s forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.7s forwards;
}
.hero-sub {
  font-size: 1.05rem;
  max-width: 460px;
  margin-bottom: 2.2rem;
  opacity: 0;
  animation: riseIn 0.9s var(--ease) 0.95s forwards;
}
.hero-link {
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(247,244,238,0.5);
  padding-bottom: 3px;
  opacity: 0;
  animation: riseIn 0.9s var(--ease) 1.15s forwards;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 780px) {
  .hero { min-height: 92svh; }
  .hero-copy { padding: 24px 6vw 48px; max-width: 100%; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 3rem); }
  .hero-sub { font-size: 0.95rem; max-width: 100%; }
}

/* ============ SECTION SHARED ============ */
section { padding: 8vw 6vw; }
.section-head {
  max-width: 620px;
  margin-bottom: 3.5rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 0.9rem;
}
.section-head p { color: var(--bronze); font-size: 1.02rem; }
.section-head.light h2 { color: var(--ivory); }
.section-head.light p { color: var(--taupe); }
.section-eyebrow {
  font-size: 0.88rem;
  color: var(--bronze);
  margin-bottom: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ GALLERY / WORK ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  grid-column: span 3;
}
.gallery-item:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.gallery-item:nth-child(4n+1) { grid-column: span 4; }
.gallery-item:nth-child(4n+2) { grid-column: span 2; }
.gallery-item:nth-child(4n+3) { grid-column: span 2; }
.gallery-item:nth-child(4n) { grid-column: span 4; }

.gallery-item .frame {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--taupe);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .caption {
  padding: 1rem 0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.gallery-item .caption h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
}
.gallery-item .caption span {
  font-size: 0.8rem;
  color: var(--bronze);
  white-space: nowrap;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--bronze);
  padding: 3rem 0;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item, .gallery-item:nth-child(4n+1), .gallery-item:nth-child(4n+2),
  .gallery-item:nth-child(4n+3), .gallery-item:nth-child(4n) { grid-column: span 1; }
}

/* ============ ABOUT ============ */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: center;
}
.about-image { border-radius: 6px; overflow: hidden; }
.about-image img { aspect-ratio: 4/5; object-fit: cover; }
.about-copy p { margin-bottom: 1.1rem; color: var(--espresso); max-width: 52ch; }
.about-copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.4rem;
  max-width: 14ch;
}
@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; }
}

/* ============ TESTIMONIALS / REVIEWS ============ */
.testimonials {
  background: var(--espresso);
  color: var(--ivory);
}
.testimonials-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 4rem;
}
.testimonial-card {
  border-top: 1px solid rgba(247,244,238,0.2);
  padding-top: 1.6rem;
}
.stars-display {
  margin-bottom: 0.8rem;
  letter-spacing: 2px;
}
.stars-display .star {
  color: rgba(247,244,238,0.25);
  font-size: 0.95rem;
}
.stars-display .star.filled { color: var(--bronze); }
.testimonial-card p.quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}
.testimonial-card p.name {
  font-size: 0.85rem;
  color: var(--taupe);
}
@media (max-width: 860px) {
  .testimonials-track { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Review submission form ---------- */
.review-form-wrap {
  max-width: 560px;
  border-top: 1px solid rgba(247,244,238,0.2);
  padding-top: 3rem;
}
.review-form-wrap h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.review-form-note {
  font-size: 0.88rem;
  color: var(--taupe);
  margin-bottom: 1.6rem;
}
.review-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.review-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--taupe);
}
.review-form label.full { grid-column: 1 / -1; }
.review-form input[type="text"],
.review-form textarea {
  font-family: var(--font-body);
  background: rgba(247,244,238,0.06);
  border: 1px solid rgba(247,244,238,0.2);
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--ivory);
  font-size: 0.92rem;
}
.review-form input[type="text"]:focus,
.review-form textarea:focus {
  outline: none;
  border-color: var(--bronze);
}
.review-form textarea { min-height: 110px; resize: vertical; }

.star-input {
  display: flex;
  gap: 0.4rem;
}
.star-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(247,244,238,0.25);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.active { color: var(--bronze); }

.review-form-error {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.review-form button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--ivory);
  color: var(--espresso);
  border: none;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.review-form button[type="submit"]:hover { background: var(--bronze); color: var(--ivory); transform: translateY(-2px); }
.review-form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

@media (max-width: 600px) {
  .review-form { grid-template-columns: 1fr; }
}

/* ============ CONTACT ============ */
.contact-inner {
  max-width: 620px;
}
.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.contact-sub {
  color: var(--bronze);
  margin-bottom: 2.2rem;
  font-size: 1.05rem;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--espresso);
  color: var(--ivory);
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.whatsapp-btn:hover {
  background: var(--bronze);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
.site-footer {
  padding: 2.2rem 6vw;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--bronze);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-inner .social-icon { border-color: var(--line); }

/* ============ FOCUS STATES ============ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

/* ============ PRODUCT MODAL ============ */
body.modal-open { overflow: hidden; }

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vw;
}
.product-modal.is-open { display: flex; }

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 52, 44, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: modalBackdropIn 0.35s var(--ease) forwards;
}
@keyframes modalBackdropIn {
  to { opacity: 1; }
}

.product-modal-panel {
  position: relative;
  background: var(--ivory);
  border-radius: 10px;
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  z-index: 1;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  animation: modalPanelIn 0.4s var(--ease) 0.05s forwards;
}
@keyframes modalPanelIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(247,244,238,0.9);
  color: var(--espresso);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.product-modal-close:hover { background: var(--espresso); color: var(--ivory); transform: rotate(90deg); }

.product-modal-image {
  background: var(--taupe);
  min-height: 340px;
}
.product-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-info {
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
}
.product-modal-category {
  font-size: 0.8rem;
  color: var(--bronze);
  margin-bottom: 0.5rem;
}
.product-modal-info h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}
.product-modal-price {
  font-size: 1.15rem;
  color: var(--espresso);
  font-weight: 500;
  margin-bottom: 1rem;
}
.product-modal-description {
  color: var(--espresso);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.4rem;
}

.product-modal-dimensions { margin-bottom: 1.6rem; }
.dim-label {
  font-size: 0.78rem;
  color: var(--bronze);
  margin-bottom: 0.6rem;
}
.dim-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.dim-option {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.dim-option:hover { border-color: var(--bronze); }
.dim-option.selected {
  background: var(--espresso);
  border-color: var(--espresso);
  color: var(--ivory);
}

.modal-whatsapp-btn {
  margin-top: auto;
  justify-content: center;
  width: 100%;
}

@media (max-width: 720px) {
  .product-modal-panel { grid-template-columns: 1fr; }
  .product-modal-image { min-height: 240px; }
  .product-modal-info { padding: 1.8rem; }
}
