/* ============================================================
   The Sandstone Villa at Trichada Breeze — Destada
   Design tokens (palette sampled from the Destada logo)
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-500-normal.woff2") format("woff2"),
       url("fonts/archivo-latin-500-normal.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-600-normal.woff2") format("woff2"),
       url("fonts/archivo-latin-600-normal.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #F7F2E7;
  --color-band: #EDE3CD;
  --color-band-deep: #E6D9BC;
  --color-surface: #FFFFFF;
  --color-text: #262420;
  --color-text-muted: #8A7F6C;
  --color-accent: #3E8F89;
  --color-accent-light: #8FBAB7;
  --color-ink: #4B4A4D;
  --color-border: #E1D3B2;

  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-card: 0 24px 60px -20px rgba(60, 45, 20, 0.28), 0 4px 16px -6px rgba(60, 45, 20, 0.12);
  --shadow-soft: 0 10px 30px -14px rgba(60, 45, 20, 0.22);

  --transition-fast: 180ms ease;
  --transition-med: 380ms cubic-bezier(0.22, 0.1, 0.2, 1);

  --max-content-width: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 56px);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__logo {
  height: clamp(28px, 4vw, 36px);
  width: auto;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: clamp(400px, 64vh, 700px);
  overflow: hidden;
  background: var(--color-band-deep);
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,17,12,0.06) 0%, rgba(18,15,10,0.12) 38%, rgba(15,13,9,0.68) 100%);
  pointer-events: none;
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 clamp(20px, 5vw, 56px) clamp(32px, 5.5vw, 58px);
  color: #FFFFFF;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin: 0 0 14px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.8vw, 50px);
  line-height: 1.1;
  margin: 0 0 12px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.3);
}

.hero__title-sub {
  display: block;
  font-size: 0.6em;
  font-weight: 500;
  opacity: 0.94;
  margin-top: 5px;
}

.hero__subtitle {
  font-size: clamp(14px, 1.6vw, 17px);
  letter-spacing: 0.03em;
  margin: 0;
  opacity: 0.95;
  font-weight: 400;
}

/* ============================================================
   Gallery band (full-bleed) + card
   ============================================================ */
.gallery-band {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, var(--color-band) 0%, var(--color-band-deep) 100%);
  padding: clamp(40px, 6vw, 76px) clamp(14px, 4vw, 40px) clamp(56px, 7vw, 96px);
}

.gallery-band__intro {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 clamp(10px, 2vw, 20px);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.gallery-band__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 8px;
}

.gallery-band__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 27px);
  margin: 0;
  color: var(--color-text);
}

.gallery-card {
  max-width: var(--max-content-width);
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(14px, 2.4vw, 28px);
}

/* ============================================================
   Slideshow
   ============================================================ */
.slideshow { position: relative; }

.slideshow__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 70vh;
  background: #EAE2CD;
  border-radius: var(--radius-md);
  overflow: hidden;
  isolation: isolate;
}

.slideshow__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.15) brightness(0.92);
  transform: scale(1.15);
  opacity: 0.9;
  transition: opacity var(--transition-fast);
  z-index: 0;
}

.slideshow__backdrop.is-changing { opacity: 0; }

.slideshow__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 12, 0.14);
  z-index: 1;
}

.slideshow__image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity var(--transition-fast);
  cursor: zoom-in;
}

.slideshow__image.is-changing { opacity: 0; }

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(18,16,13,0.22);
  transition: background var(--transition-fast), transform var(--transition-fast);
  z-index: 3;
}

.arrow:hover { background: #FFFFFF; transform: translateY(-50%) scale(1.06); }

.arrow--prev { left: 14px; }
.arrow--next { right: 14px; }

.counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(18,16,13,0.58);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(3px);
  z-index: 3;
}

/* ============================================================
   Thumbnails
   ============================================================ */
.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.thumbs::-webkit-scrollbar { height: 6px; }
.thumbs::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }

.thumb {
  flex: 0 0 auto;
  width: 108px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #EAE2CD;
  opacity: 0.68;
  transition: opacity var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb:hover { opacity: 1; transform: translateY(-2px); }

.thumb.is-active {
  opacity: 1;
  border-color: var(--color-accent);
  box-shadow: 0 4px 14px -4px rgba(62, 143, 137, 0.45);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 34px 20px 40px;
  background: var(--color-bg);
}

.site-footer__logo {
  height: 22px;
  width: auto;
  margin: 0 auto 12px;
  opacity: 0.65;
}

.site-footer p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open { display: flex; }

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 6vw, 80px);
}

.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity var(--transition-fast);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  border-radius: 2px;
}

.lightbox__image.is-changing { opacity: 0; }

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  z-index: 3;
}

.lightbox__close:hover { background: rgba(255,255,255,0.22); }

.lightbox__arrow { background: rgba(255,255,255,0.12); color: #FFFFFF; box-shadow: none; }
.lightbox__arrow:hover { background: rgba(255,255,255,0.22); }

.counter--lightbox {
  position: absolute;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .site-header { padding: 14px 20px; }
  .hero { height: clamp(340px, 54vh, 540px); }

  .gallery-card { border-radius: var(--radius-md); }

  .slideshow__frame { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); }

  .arrow { width: 38px; height: 38px; }
  .arrow--prev { left: 8px; }
  .arrow--next { right: 8px; }

  .thumb { width: 84px; }

  .lightbox__close { top: 10px; right: 10px; }
  .lightbox__arrow { width: 38px; height: 38px; }
  .lightbox__arrow.arrow--prev { left: 6px; }
  .lightbox__arrow.arrow--next { right: 6px; }
}
