/* ============================================================================
   garaliving — Home page layout
   Section-level layout only. Consumes tokens.css. No raw literals.
   ========================================================================== */

/* --- Logo ----------------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-navy);
}
.logo__mark { color: var(--color-navy); flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__word {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-wordmark);
  color: var(--color-navy);
}
.logo__tagline {
  font-size: 0.5rem;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.logo--light { color: var(--color-navy); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 72px;
}
.primary-nav { margin-inline: auto; }
.primary-nav ul {
  display: flex;
  gap: var(--space-5);
}
.primary-nav a {
  display: inline-block;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  transition: color var(--motion-base) var(--motion-ease),
              border-color var(--motion-base) var(--motion-ease);
}
.primary-nav a:hover { color: var(--color-navy); }
.primary-nav a[aria-current="page"] {
  color: var(--color-navy);
  border-bottom-color: var(--color-navy);
  font-weight: 600;
}
.site-header__actions { display: flex; gap: var(--space-1); }
.nav-toggle { display: none; }

/* --- Hero (full-bleed background with overlaid text) ---------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 620px;
  overflow: hidden;
  background-color: var(--color-surface-alt);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: var(--img-tone);
}
/* Mobile-first: light vertical cream veil — only lightly tints behind the top
   text so the photo stays clearly visible; text halo keeps navy readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    var(--scrim-hero-m) 0%,
    var(--scrim-hero-m) 55%,
    var(--scrim-hero-m-soft) 72%,
    transparent 90%
  );
}
.hero__content { text-shadow: var(--text-halo); }
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: var(--space-8);
}
.hero__content { max-width: 34rem; }
.hero__wordmark {
  font-weight: 300;
  letter-spacing: var(--tracking-wordmark);
  margin-block: var(--space-2) var(--space-1);
  line-height: 1;
}
.hero__subhead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.hero__intro {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  max-width: 40ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

@media (min-width: 768px) {
  .hero { min-height: 640px; align-items: center; }
  .hero__content { text-shadow: none; }
  /* Desktop: fade the cream veil to the right so the photo shows through */
  .hero::after {
    background: linear-gradient(
      to right,
      var(--scrim-hero) 0%,
      var(--scrim-hero) 34%,
      var(--scrim-hero-soft) 52%,
      transparent 78%
    );
  }
}

/* --- Category strip ------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.category { text-align: center; }
.category__icon {
  display: inline-flex;
  color: var(--color-navy);
  margin-bottom: var(--space-3);
}
.category__icon svg { width: 40px; height: 40px; }
.category__title { margin-bottom: var(--space-2); }
.category__desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-inline: auto;
  margin-bottom: var(--space-3);
  max-width: 28ch;
}
.category .link-arrow { justify-content: center; }

/* --- Row head (section title + trailing link) ---------------------------- */
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

/* --- Product grid --------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.product { cursor: pointer; }
.product__media { position: relative; overflow: hidden; }
.product__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: var(--img-tone);
  transition: transform var(--motion-base) var(--motion-ease);
}
.product:hover .product__media img,
.product:focus-visible .product__media img { transform: scale(1.05); }
.product__zoom {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-navy);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--motion-base) var(--motion-ease),
              color var(--motion-base) var(--motion-ease);
}
.product__zoom svg { width: 20px; height: 20px; }
.product:hover .product__zoom,
.product:focus-visible .product__zoom { background-color: var(--color-navy); color: var(--color-text-on-brand); }
.product__body { padding: var(--space-4); }
.product .link-arrow { pointer-events: none; }
.product__name { font-size: var(--text-base); margin-bottom: var(--space-1); }
.product__price {
  color: var(--color-navy);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

/* --- Value props ---------------------------------------------------------- */
.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.value__icon { display: inline-flex; color: var(--color-navy); margin-bottom: var(--space-3); }
.value__icon svg { width: 32px; height: 32px; }
.value__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.value__desc { color: var(--color-text-muted); font-size: var(--text-sm); }

/* --- Gallery -------------------------------------------------------------- */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.gallery-item { overflow: hidden; border-radius: var(--radius-md); }
.gallery-btn {
  display: block;
  width: 100%;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.gallery-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: transparent;
  transition: background-color var(--motion-base) var(--motion-ease);
}
.gallery-btn:hover::after,
.gallery-btn:focus-visible::after { background-color: var(--scrim-image); }
.gallery-item img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  filter: var(--img-tone);
  transition: transform var(--motion-base) var(--motion-ease);
}
.gallery-btn:hover img,
.gallery-btn:focus-visible img { transform: scale(1.04); }
.gallery-item[hidden] { display: none; }
.gallery-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding-block: var(--space-6);
}
.gallery-more { text-align: center; margin-top: var(--space-6); }

/* --- Testimonials --------------------------------------------------------- */
.testimonial-shell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.testimonial-nav { flex-shrink: 0; }
.testimonial-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: var(--space-2);
  scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: var(--space-5);
}
.testimonial .stars { margin-bottom: var(--space-3); }
.testimonial__quote {
  color: var(--color-text);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}
.testimonial__author { display: flex; align-items: center; gap: var(--space-3); }
.testimonial__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}
.testimonial__name { font-weight: 600; color: var(--color-navy); }
.testimonial__city { font-size: var(--text-sm); color: var(--color-text-muted); }

/* --- CTA band ------------------------------------------------------------- */
.cta-band {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: stretch;
  padding: var(--space-7);
  background-color: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cta-band__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}
.cta-band__text { max-width: 46ch; }
.cta-band h2 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.cta-band p { color: var(--color-text-muted); }
.cta-band__btn { flex-shrink: 0; white-space: nowrap; }
.cta-band__btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.cta-band__figure { overflow: hidden; border-radius: var(--radius-md); }
.cta-band__figure img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: var(--img-tone);
}

@media (min-width: 768px) {
  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-7);
    padding-block: var(--space-8);
    padding-inline: var(--space-8);
  }
  .cta-band__main {
    flex: 1 1 auto;
  }
  .cta-band__text { flex: 1 1 auto; }
  .cta-band__figure {
    flex: 0 0 30%;
    max-width: 320px;
    align-self: stretch;
  }
  .cta-band__figure img { aspect-ratio: auto; min-height: 100%; }
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-7);
  margin-top: var(--space-7);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.footer-brand__desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-block: var(--space-4);
  max-width: 34ch;
}
.footer-social { display: flex; gap: var(--space-1); }
.footer-col__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a,
.footer-contact span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--motion-base) var(--motion-ease);
}
.footer-col a:hover { color: var(--color-navy); }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-navy); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.footer-bottom p { font-size: var(--text-sm); color: var(--color-text-subtle); }

/* --- Back-to-top (inline, footer bar) ------------------------------------- */
.footer-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-navy);
  transition: border-color var(--motion-base) var(--motion-ease),
              background-color var(--motion-base) var(--motion-ease);
}
.footer-top svg { width: 20px; height: 20px; }
.footer-top:hover { border-color: var(--color-navy); background-color: var(--color-surface-alt); }

/* --- WhatsApp header icon -------------------------------------------------- */
.icon-btn--wa:hover { background-color: var(--color-surface-alt); color: var(--color-navy); }

/* --- Modal (product + lightbox) ------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--scrim-modal);
  animation: modal-fade var(--motion-base) var(--motion-ease);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow: hidden auto;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-pop var(--motion-base) var(--motion-ease);
}
.modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-navy);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { background-color: var(--color-surface-alt); }
.modal__media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: var(--img-tone); }
.modal__body { padding: var(--space-6); }
.modal__title { margin-bottom: var(--space-2); }
.modal__price { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: var(--color-navy); margin-bottom: var(--space-4); }
.modal__desc { color: var(--color-text-muted); margin-bottom: var(--space-5); }
.modal__cta svg { width: 24px; height: 24px; flex-shrink: 0; }

.modal--lightbox { padding: var(--space-6); }
.lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 90vh;
  animation: modal-pop var(--motion-base) var(--motion-ease);
}
.lightbox__inner img {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  filter: var(--img-tone);
}

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

body.modal-open { overflow: hidden; }

/* ==========================================================================
   RESPONSIVE — mobile-first min-width breakpoints
   sm 480 · md 768 · lg 1024 · xl 1280
   ========================================================================== */

@media (min-width: 480px) {
  .category-grid,
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial { flex: 0 0 calc(50% - var(--space-2)); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
  .modal__dialog { grid-template-columns: 1fr 1fr; }
  .modal__media img { height: 100%; aspect-ratio: auto; }
}

@media (min-width: 1024px) {
  .category-grid,
  .value-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
}

/* --- Mobile nav (enhanced only when JS present) -------------------------- */
@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-header__actions { order: 3; }

  .js .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--motion-base) var(--motion-ease);
  }
  .js .primary-nav.is-open { max-height: 420px; }
  .js .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--container-pad);
  }
  .js .primary-nav a { display: block; padding: var(--space-3) 0; }

  .hero__cta .btn { flex: 1 1 auto; }
  .row-head { justify-content: center; text-align: center; }
}
