/* ============================================================
   MIST & PINES GUEST HOUSE — Demo 1
   Palette (per spec): cream #F7F3EA / ivory #FDFBF5 / forest #1E3A2F
   moss #4A7A5E / sage #A8BFA8 / ink #2B2B26 — NO gradients, flat & calm.
   ============================================================ */

:root {
  --cream: #F7F3EA;
  --ivory: #FDFBF5;
  --forest: #1E3A2F;
  --moss: #4A7A5E;
  --sage: #A8BFA8;
  --ink: #2B2B26;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
  --dur-fast: 200ms;
  --dur-mid: 500ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* ---------- Typography scale ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--forest); }
h2 { font-size: 44px; line-height: 1.15; }
h2 em, h1 .italic { font-style: italic; }
.accent-italic { color: var(--moss); font-style: italic; }

.eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--moss);
  margin-bottom: 14px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

/* ---------- Focus & links ---------- */
a { color: var(--moss); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

/* ---------- Buttons: moss fill slides in from left ---------- */
.btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 14px 32px;
  border: 1px solid var(--moss);
  background: transparent;
  color: var(--moss);
  transition: color var(--dur-fast) ease;
  z-index: 0;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--moss);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) ease;
  z-index: -1;
}
.btn:hover { color: var(--ivory); }
.btn:hover::before { transform: scaleX(1); }

.btn-primary { background: var(--moss); color: var(--ivory); border-color: var(--moss); }
.btn-primary::before { background: var(--forest); }
.btn-primary:hover { border-color: var(--forest); color: var(--ivory); }

.text-link {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--sage);
  padding-bottom: 2px;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.text-link:hover { color: var(--moss); border-color: var(--moss); }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(253, 251, 245, 0.92);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--forest);
}
.wordmark:hover { color: var(--moss); }
.nav-hairline { height: 1px; background: var(--sage); }

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-menu a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.nav-menu a:hover { color: var(--moss); border-color: var(--moss); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--forest);
  margin: 5px 0;
  transition: transform 300ms ease, opacity 300ms ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--cream) 0%, rgba(247, 243, 234, 0.75) 35%, rgba(247, 243, 234, 0.25) 62%, rgba(247, 243, 234, 0) 80%);
  opacity: 0.9;
}
/* Note: scrim is a flat directional veil (cream to transparent), not a color gradient —
   matches "soft cream scrim from bottom" in spec; palette itself stays flat. */

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}
.hero-content .eyebrow { color: var(--forest); background: rgba(253, 251, 245, 0.75); display: inline-block; padding: 4px 12px; }
.hero-headline {
  font-size: 64px;
  line-height: 1.12;
  color: var(--forest);
  margin: 18px 0 10px;
}
.hero-sub {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 34px;
}
.hero-ctas {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Staggered fade-up for hero words */
.hw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
.hw-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 600ms var(--ease-out), opacity 600ms ease;
}
.loaded .hw-inner { transform: translateY(0); opacity: 1; }
.loaded .hw:nth-child(1) .hw-inner { transition-delay: 0ms; }
.loaded .hw:nth-child(2) .hw-inner { transition-delay: 80ms; }
.loaded .hw:nth-child(3) .hw-inner { transition-delay: 160ms; }
.loaded .hw:nth-child(4) .hw-inner { transition-delay: 240ms; }
.loaded .hw:nth-child(5) .hw-inner { transition-delay: 320ms; }

/* ---------- SIGNATURE MOMENT: mist drift ---------- */
.mist-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.mist {
  position: absolute;
  fill: #ffffff;
  filter: blur(28px);
  opacity: 0.05;
  will-change: transform;
}
.hero .mist-1 { width: 60vw; bottom: 4%; left: -15%; animation: mistDrift1 30s linear infinite; }
.hero .mist-2 { width: 50vw; top: 30%; left: 55%; animation: mistDrift2 34s linear infinite; }
.hero .mist-3 { width: 70vw; bottom: 18%; left: -25%; animation: mistDrift3 38s linear infinite; opacity: 0.04; }

@keyframes mistDrift1 {
  0% { transform: translateX(-8%); }
  50% { transform: translateX(10%); }
  100% { transform: translateX(-8%); }
}
@keyframes mistDrift2 {
  0% { transform: translateX(6%); }
  50% { transform: translateX(-12%); }
  100% { transform: translateX(6%); }
}
@keyframes mistDrift3 {
  0% { transform: translateX(-12%); }
  50% { transform: translateX(14%); }
  100% { transform: translateX(-12%); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: center;
}
.about-text p { margin-bottom: 20px; }

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.stat-chip {
  background: var(--ivory);
  border: 1px solid var(--sage);
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.stat-chip:hover { border-color: var(--moss); transform: translateY(-2px); }
.stat-num { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--forest); line-height: 1.1; }
.stat-label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--moss); }

.about-collage { position: relative; min-height: 460px; }
.collage-frame {
  position: absolute;
  background: var(--ivory);
  border: 1px solid var(--sage);
  padding: 12px;
  box-shadow: 0 12px 32px rgba(30, 58, 47, 0.10);
  transition: transform var(--dur-mid) var(--ease-out);
}
.collage-frame img { width: 100%; height: 300px; object-fit: cover; }
.frame-1 { width: 62%; top: 0; left: 0; transform: rotate(-2deg); z-index: 2; }
.frame-2 { width: 58%; bottom: 0; right: 0; transform: rotate(2deg); }
.collage-frame:hover { transform: rotate(0deg) scale(1.02); z-index: 5; }

/* ============================================================
   GALLERY — masonry via CSS columns
   ============================================================ */
.gallery-head { text-align: center; margin-bottom: 32px; }

.filter-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.filter {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.filter:hover { color: var(--moss); }
.filter.active { color: var(--moss); border-color: var(--moss); }

.masonry { columns: 3; column-gap: 20px; }
.g-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid var(--sage);
  padding: 8px;
}
.g-item img {
  width: 100%;
  transition: transform 300ms var(--ease-out);
}
.g-item figcaption {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  background: rgba(30, 58, 47, 0.8);
  color: var(--ivory);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  padding: 12px 16px;
  transform: translateY(101%);
  transition: transform 300ms var(--ease-out);
}
.g-item:hover img, .g-item:focus-within img { transform: scale(1.04); }
.g-item:hover figcaption, .g-item:focus-within figcaption { transform: translateY(0); }
.g-item.hidden { display: none; }

.gallery-empty { text-align: center; color: var(--ink); padding: 40px 0; }

/* staggered fade+scale on reveal */
.reveal-img { opacity: 0; transform: scale(0.96); transition: opacity 450ms ease-out, transform 450ms var(--ease-out); }
.reveal-img.shown { opacity: 1; transform: scale(1); }

/* ============================================================
   TESTIMONIALS — cream-on-sage band + mist
   ============================================================ */
.testimonials { background: var(--sage); position: relative; overflow: hidden; }
.testimonials .container { position: relative; z-index: 2; }
.testi-head { text-align: center; margin-bottom: 48px; }

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  position: relative;
  background: var(--ivory);
  padding: 40px 28px 28px;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(30, 58, 47, 0.12); }
.quote-mark {
  position: absolute;
  top: 2px; left: 18px;
  font-family: var(--serif);
  font-size: 84px;
  line-height: 1;
  color: var(--moss);
  opacity: 0.9;
}
.testi-card p { margin-top: 28px; font-size: 16px; }
.testi-card footer { margin-top: 20px; display: flex; align-items: baseline; gap: 12px; }
.testi-card cite { font-family: var(--serif); font-size: 19px; font-weight: 600; font-style: normal; color: var(--forest); }
.cite-city { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moss); }

.testimonials .mist-1 { width: 55vw; top: 10%; left: -10%; animation: mistDrift2 36s linear infinite; }
.testimonials .mist-2 { width: 45vw; bottom: 0; left: 60%; animation: mistDrift1 40s linear infinite; }

/* ============================================================
   CONTACT — deep green section
   ============================================================ */
.contact { background: var(--forest); color: var(--ivory); }
.contact h2 { color: var(--ivory); }
.contact .accent-italic { color: var(--sage); }
.contact .eyebrow { color: var(--sage); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-list { list-style: none; margin: 28px 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.contact-list a { color: var(--ivory); border-bottom: 1px solid var(--sage); transition: color var(--dur-fast) ease; }
.contact-list a:hover { color: var(--sage); }
.icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 4px; color: var(--sage); }

.map-placeholder {
  border: 1px solid var(--sage);
  background: rgba(253, 251, 245, 0.06);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Form */
.enquiry-form .field { margin-bottom: 18px; }
.enquiry-form label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 6px;
}
.enquiry-form input, .enquiry-form textarea {
  width: 100%;
  background: rgba(253, 251, 245, 0.08);
  border: 1px solid var(--sage);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  padding: 12px 14px;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.enquiry-form input::placeholder, .enquiry-form textarea::placeholder { color: var(--sage); }
.enquiry-form input:focus, .enquiry-form textarea:focus { border-color: var(--ivory); background: rgba(253, 251, 245, 0.12); outline: none; }
.enquiry-form input:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

.field-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn-whatsapp {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ivory);
  color: var(--forest);
  border: 1px solid var(--ivory);
}
.btn-whatsapp::before { background: var(--sage); }
.btn-whatsapp:hover { color: var(--forest); }
.btn-whatsapp .icon { color: currentColor; margin-top: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--forest);
  color: var(--ivory);
  border-top: 1px solid rgba(168, 191, 168, 0.4);
  padding: 36px 0;
  text-align: center;
}
.footer-wordmark { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.footer-note { font-size: 13px; color: var(--sage); margin-bottom: 4px; }
.footer-credit { font-size: 12px; color: var(--sage); opacity: 0.8; }

/* ============================================================
   SCROLL REVEALS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-mid) ease-out, transform var(--dur-mid) var(--ease-out); }
.reveal.shown { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE — breakpoint 768px
   ============================================================ */
@media (max-width: 768px) {
  h2 { font-size: 34px; }
  .section { padding: 64px 0; }

  /* Nav: hamburger + slide-down cream panel */
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    top: 69px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--sage);
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
  }
  .nav-menu.open { max-height: 340px; }
  .nav-menu li { text-align: center; }
  .nav-menu a { display: block; padding: 16px 0; border-bottom: none; font-size: 17px; }

  /* Hero */
  .hero-headline { font-size: 40px; }
  .hero-sub { font-size: 18px; }
  .hero-photo { object-position: top; }

  /* Mist blobs hidden on mobile (performance + restraint) */
  .mist-layer { display: none; }

  /* About stacks, collage single column, rotations removed */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-collage { min-height: 0; display: flex; flex-direction: column; gap: 20px; }
  .collage-frame { position: static; width: 100%; transform: none; }
  .collage-frame img { height: 240px; }

  /* Masonry 2 cols, captions always visible below */
  .masonry { columns: 2; column-gap: 14px; }
  .g-item figcaption {
    position: static;
    transform: none;
    background: none;
    color: var(--forest);
    font-size: 16px;
    padding: 10px 4px 4px;
  }
  .g-item:hover img, .g-item:focus-within img { transform: none; }

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

  /* Contact stacks, WhatsApp button full-width at bottom */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .btn-whatsapp { position: sticky; bottom: 12px; z-index: 5; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .hero-headline { font-size: 40px; }
}

/* ============================================================
   REDUCED MOTION — disables mist drift, reveals, stagger
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mist-layer { display: none; }
  .hw-inner, .reveal, .reveal-img { opacity: 1 !important; transform: none !important; }
}
