/* ============================================
   MAIN.CSS — Full stylesheet (loaded deferred)
   All sections, gallery, contact, footer,
   animations, lightbox.
   ============================================ */

/* --- Font Faces --- */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Section Base --- */
.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.section__header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-gold);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 3rem;
}
.section__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 2px;
  background: var(--c-gold);
  transform: translateY(-50%);
}

.section__heading {
  font-family: var(--f-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
}

/* --- Glass Card --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about__grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about__body {
  color: var(--c-white-muted);
  line-height: 1.8;
  margin-top: 1.5rem;
}

.about__image-wrap {
  position: relative;
}

.about__image {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(215,183,121,0.08);
  width: 100%;
  height: auto;
}

.about__stat-card {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 2rem;
}

.about__stat-item { text-align: center; }

.about__stat-number {
  display: block;
  font-family: var(--f-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-gold);
}

.about__stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--c-white-muted);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.about__stat-divider {
  width: 1px;
  height: 3rem;
  background: rgba(215,183,121,0.2);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}

.services__card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-black-card);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.4s ease;
}

.services__card:hover {
  transform: translateY(-6px);
  border-color: rgba(215,183,121,0.25);
  box-shadow: 0 20px 50px rgba(215,183,121,0.08);
}

.services__card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.services__card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out-expo);
}

.services__card:hover .services__card-bg {
  transform: scale(1.08);
}

.services__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.4) 100%);
}

.services__card-icon {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  width: 44px;
  height: 44px;
  color: var(--c-gold);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(215,183,121,0.2);
  border-radius: 10px;
  padding: 8px;
  z-index: 1;
}
.services__card-icon svg {
  width: 100%;
  height: 100%;
}

.services__card-content {
  padding: 1.5rem 1.25rem 1.75rem;
}

.services__card-title {
  font-family: var(--f-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--c-gold);
  margin-bottom: 0.75rem;
}

.services__card-desc {
  color: var(--c-white-muted);
  font-size: 0.8125rem;
  line-height: 1.8;
}

/* ============================================
   GALLERY SECTION — Brick Wall
   ============================================ */
.container--wide {
  max-width: 1440px;
}

.gallery__bricks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: 100px;
  grid-auto-flow: dense;
  gap: 4px;
}

.gallery__brick {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  display: block;
  grid-row: span 1;
}

.gallery__brick--tall {
  grid-row: span 2;
}

.gallery__brick--hidden {
  display: none;
}

.gallery__brick-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-out-expo), filter 0.4s ease;
}

.gallery__brick:hover .gallery__brick-img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.gallery__brick-glow {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

.gallery__brick:hover .gallery__brick-glow {
  border-color: var(--c-gold);
  box-shadow: inset 0 0 20px rgba(215,183,121,0.15), 0 0 12px rgba(215,183,121,0.1);
}

.gallery__load-more-wrap {
  text-align: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ============================================
   WHY US SECTION
   ============================================ */
.section--why-us {
  background: var(--c-black-soft);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why__grid > :nth-child(n+4) {
  grid-column: span 1;
}

/* Center the last row (items 4 & 5) */
@media (min-width: 769px) {
  .why__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .why__grid > :nth-child(1) { grid-column: 1 / 3; }
  .why__grid > :nth-child(2) { grid-column: 3 / 5; }
  .why__grid > :nth-child(3) { grid-column: 5 / 7; }
  .why__grid > :nth-child(4) { grid-column: 2 / 4; }
  .why__grid > :nth-child(5) { grid-column: 4 / 6; }
}

.why__card {
  background: var(--c-black-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.4s ease;
}

.why__card:hover {
  transform: translateY(-8px);
  border-color: rgba(215,183,121,0.3);
  box-shadow: 0 16px 40px rgba(215,183,121,0.06);
}

.why__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  color: var(--c-gold);
}

.why__icon svg {
  width: 100%;
  height: 100%;
}

.why__title {
  font-family: var(--f-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.why__desc {
  color: var(--c-white-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Honeypot — visually hidden */
.contact__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form__group {
  margin-bottom: 1.5rem;
}

.form__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-white-muted);
  margin-bottom: 0.5rem;
}

.form__optional {
  font-weight: 400;
  color: rgba(160,160,160,0.6);
}

.form__input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--f-body);
  color: var(--c-white);
  background: #1a1a1a;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form__input:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(215,183,121,0.15);
}

.form__input--error {
  border-color: #e74c3c;
}

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

.form__error {
  display: block;
  font-size: 0.75rem;
  color: #e74c3c;
  margin-top: 0.375rem;
  min-height: 1rem;
}

.contact__submit {
  width: 100%;
  position: relative;
}

.contact__submit--loading .contact__submit-text { opacity: 0; }
.contact__submit-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.contact__submit--loading .contact__submit-spinner {
  opacity: 1;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.contact__feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  text-align: center;
}
.contact__feedback:empty { display: none; }

.contact__feedback--success {
  background: rgba(39,174,96,0.12);
  color: #27ae60;
  border: 1px solid rgba(39,174,96,0.2);
}

.contact__feedback--error {
  background: rgba(231,76,60,0.12);
  color: #e74c3c;
  border: 1px solid rgba(231,76,60,0.2);
}

/* Contact Info Card */
.contact__info-card {
  position: sticky;
  top: 6rem;
}

.contact__info-title {
  font-family: var(--f-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--c-gold);
}

.contact__info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact__info-icon {
  width: 24px;
  height: 24px;
  color: var(--c-gold);
  flex-shrink: 0;
}

.contact__info-link,
.contact__info-text {
  color: var(--c-white-muted);
  font-size: 0.9375rem;
  transition: color 0.3s ease;
}

.contact__info-link:hover { color: var(--c-gold); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--c-black-soft);
  padding-top: 0;
}

.footer__border {
  height: 1px;
  background: rgba(215,183,121,0.3);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.footer__logo {
  margin-bottom: 1rem;
}

.footer__tagline {
  color: var(--c-white-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  color: var(--c-gold);
  transition: color 0.3s ease, transform 0.3s ease;
}
.footer__social-link:hover {
  color: var(--c-gold-light);
  transform: translateY(-2px);
}

.footer__col-title {
  font-family: var(--f-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--c-white);
}

.footer__link {
  display: block;
  color: var(--c-white-muted);
  font-size: 0.875rem;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}
.footer__link:hover { color: var(--c-gold); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
}

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

.footer__copyright {
  font-size: 0.8125rem;
  color: var(--c-white-muted);
}

.footer__cookie-link {
  font-size: 0.8125rem;
  color: var(--c-white-muted);
  transition: color 0.3s ease;
}
.footer__cookie-link:hover { color: var(--c-gold); }

.footer__legal-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__legal-sep {
  color: rgba(255,255,255,0.15);
  font-size: 0.75rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  color: var(--c-white);
  padding: 0.5rem;
  transition: color 0.3s ease;
}
.lightbox__close:hover { color: var(--c-gold); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: var(--c-white);
  padding: 1rem;
  transition: color 0.3s ease;
}
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }
.lightbox__prev:hover,
.lightbox__next:hover { color: var(--c-gold); }

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--c-white-muted);
  font-size: 0.8125rem;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

/* Base states — elements start hidden */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.92); }

.reveal-stagger {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.gold-line-draw::before {
  transform-origin: left;
  transform: translateY(-50%) scaleX(0);
  transition: transform 0.6s var(--ease-out-expo) 0.2s;
}

/* Revealed states */
.revealed.reveal-up,
.revealed.reveal-left,
.revealed.reveal-right,
.revealed.reveal-scale {
  opacity: 1;
  transform: none;
}

.revealed.reveal-stagger {
  opacity: 1;
  transform: none;
}

.revealed.gold-line-draw::before {
  transform: translateY(-50%) scaleX(1);
}

/* Support stagger delay via CSS variable */
[style*="--delay"] {
  transition-delay: var(--delay);
}

/* Stagger children */
.revealed .reveal-stagger:nth-child(1) { transition-delay: 0ms; }
.revealed .reveal-stagger:nth-child(2) { transition-delay: 80ms; }
.revealed .reveal-stagger:nth-child(3) { transition-delay: 160ms; }
.revealed .reveal-stagger:nth-child(4) { transition-delay: 240ms; }
.revealed .reveal-stagger:nth-child(5) { transition-delay: 320ms; }

/* Native scroll-driven animation support (progressive enhancement) */
@supports (animation-timeline: view()) {
  .reveal-up,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    animation: revealIn 1s var(--ease-out-expo) both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
    transition: none;
  }

  @keyframes revealIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: none; }
  }
}

/* ============================================
   RESPONSIVE — Tablet (769–1024px)
   ============================================ */
@media (max-width: 1024px) {
  .section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__stat-card {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1rem;
    display: inline-flex;
  }

  .services__grid {
    grid-template-columns: 1fr 1fr;
  }

  .services__card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
  }

  .services__card-img-wrap {
    height: 200px;
  }

  .gallery__bricks {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-auto-rows: 90px;
  }

  .why__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .why__grid > :nth-child(1) { grid-column: 1 / 3; }
  .why__grid > :nth-child(2) { grid-column: 3 / 5; }
  .why__grid > :nth-child(3) { grid-column: 5 / 7; }
  .why__grid > :nth-child(4) { grid-column: 2 / 4; }
  .why__grid > :nth-child(5) { grid-column: 4 / 6; }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact__info-card {
    position: static;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* ============================================
   RESPONSIVE — Mobile (≤768px)
   ============================================ */
@media (max-width: 768px) {
  .section {
    padding: clamp(3rem, 8vw, 4.5rem) 0;
  }

  .section__heading {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .about__body {
    font-size: 0.9rem;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .services__card:last-child {
    grid-column: auto;
    max-width: 100%;
  }

  .services__card-img-wrap {
    height: 180px;
  }

  .gallery__bricks {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: 80px;
    gap: 3px;
  }

  .why__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .why__grid > :nth-child(n) { grid-column: auto; }
  .why__grid > :last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; }

  .why__card {
    padding: 1.25rem;
  }

  .why__icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.75rem;
  }

  .contact__submit { font-size: 0.875rem; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .lightbox__prev,
  .lightbox__next {
    display: none;
  }
}

/* ============================================
   RESPONSIVE — Small phones (≤400px)
   ============================================ */
@media (max-width: 400px) {
  .gallery__bricks {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 70px;
    gap: 2px;
  }

  .why__grid {
    grid-template-columns: 1fr;
  }
  .why__grid > :last-child { max-width: 100%; }

  .services__card-desc {
    font-size: 0.75rem;
  }

  .form__input {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }
}

/* ============================================
   PAGE TEMPLATE — Legal / Policy pages
   ============================================ */
.page-content {
  padding: calc(var(--nav-height) + 3rem) 0 4rem;
  min-height: 70vh;
}

.page-content__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(215,183,121,0.15);
}

.page-content__title {
  font-family: var(--f-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--c-white);
}

.page-content__body {
  max-width: 800px;
  color: var(--c-white-muted);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.page-content__body h2,
.page-content__body h3,
.page-content__body h4 {
  color: var(--c-white);
  font-family: var(--f-heading);
  margin: 2rem 0 0.75rem;
}

.page-content__body h2 { font-size: 1.5rem; }
.page-content__body h3 { font-size: 1.25rem; }
.page-content__body h4 { font-size: 1.1rem; }

.page-content__body p {
  margin-bottom: 1rem;
}

.page-content__body a {
  color: var(--c-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}
.page-content__body a:hover {
  color: var(--c-gold-light);
}

.page-content__body ul,
.page-content__body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.page-content__body ol { list-style: decimal; }

.page-content__body li {
  margin-bottom: 0.5rem;
}

.page-content__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.page-content__body th,
.page-content__body td {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}

.page-content__body th {
  background: var(--c-black-card);
  color: var(--c-white);
  font-weight: 600;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-stagger {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .gold-line-draw::before {
    transform: translateY(-50%) scaleX(1);
    transition: none;
  }
  .services__card-bg { transition: none; }
  .why__card { transition: none; }
  .gallery__brick-img { transition: none; }
  .lightbox { transition: none; }
}
