/* ============================================================
   Gosswood Park — stylesheet
   Fonts: Playfair Display (display), Lato (body)
   Approach: fluid typography + spacing via clamp(), minimal breakpoints
   ============================================================ */

:root {
  --color-primary: #6B7E5E;    /* sage green */
  --color-accent:  #A67C52;    /* warm earth */
  --color-bg:      #F5F1E8;    /* warm cream — section (box) background */
  --color-page:    #FFFFFF;    /* pure white — page background around boxes */
  --color-text:    #2E2E2E;    /* near-black */
  --color-muted:   #767268;

  --gutter: 10px;              /* gap between boxed sections */
  --box-radius: 10px;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body:    "Lato", system-ui, -apple-system, sans-serif;

  --content-max: 1200px;

  /* Fluid scales */
  --fs-h1:  clamp(2.25rem, 5.5vw + 0.5rem, 4.5rem);
  --fs-h2:  clamp(1.75rem, 3vw + 0.5rem, 3rem);
  --fs-h3:  clamp(1.2rem, 1.2vw + 0.7rem, 1.5rem);
  --fs-lead: clamp(1.05rem, 0.7vw + 0.85rem, 1.4rem);
  --fs-body: clamp(1rem, 0.35vw + 0.85rem, 1.15rem);
  --fs-small: clamp(0.8rem, 0.2vw + 0.7rem, 0.9rem);

  --pad-section: clamp(2.5rem, 6vw, 6rem);
  --pad-gutter:  clamp(1.25rem, 4vw, 3rem);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-page);
}

/* Main is a flex column; each direct child is a "boxed" section with gutters around */
main {
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}
main > * {
  background: var(--color-bg);
  border-radius: var(--box-radius);
  overflow: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 1rem; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 150ms;
}
.btn:hover { background: var(--color-accent); color: #fff; }

/* Site header — transparent on hero, solid+sticky after scroll */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: calc(0.75rem + 10px) 1.25rem 0.75rem;   /* +10px top to drop the logo */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94px;
  transition: background 250ms ease, border-color 250ms ease;
}
.site-header--scrolled {
  border-bottom-color: rgba(0,0,0,0.06);
}
.site-header__brand { display: inline-flex; align-items: center; line-height: 1; }
.site-header__logo {
  height: clamp(50px, 6.25vw, 70px);    /* 25% bigger than before; native is 120px */
  width: auto;
  display: block;
  transition: opacity 250ms ease;
}
.site-header__logo--green { display: none; }
.site-header--scrolled .site-header__logo--white { display: none; }
.site-header--scrolled .site-header__logo--green { display: block; }

.menu-toggle {
  position: absolute;
  right: calc(1.25rem + var(--gutter));     /* nudged left by the gutter distance */
  top: 50%;
  transform: translateY(-50%);
  background: none; border: 0;
  width: 54px; height: 54px; padding: 11px; /* +35% over the 40px original */
  cursor: pointer;
}
.menu-toggle__bar {
  display: block;
  width: 100%; height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: background 250ms ease;
}
.site-header--scrolled .menu-toggle__bar { background: var(--color-text); }

/* Menu overlay — fades in/out with a small lift on the nav */
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(245, 241, 232, 0.7);    /* 70% opaque cream — 30% transparent */
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms ease, visibility 0s linear 320ms;
}
.menu-overlay:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 320ms ease, visibility 0s linear 0s;
}
/* Override default [hidden] display:none so the fade can play both ways */
.menu-overlay[hidden] { display: flex; }

.menu-overlay__nav {
  transform: translateY(14px);
  opacity: 0;
  transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms, opacity 320ms ease 80ms;
}
.menu-overlay:not([hidden]) .menu-overlay__nav {
  transform: translateY(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .menu-overlay, .menu-overlay__nav { transition: none; transform: none; }
}
.menu-overlay__close {
  position: absolute; top: 1rem; right: 1.5rem;
  background: none; border: 0;
  font-size: 2.5rem; line-height: 1;
  cursor: pointer; color: var(--color-text);
}
.menu-overlay__nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.85rem;
  text-align: center;
}
.menu-overlay__nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  text-decoration: none;
  color: var(--color-text);
}
body.menu-open { overflow: hidden; }
body.no-hero main { padding-top: clamp(72px, 10vh, 96px); }

/* When menu is open, fade out the hero text behind it so nothing competes */
.hero__heading, .hero__subheading, .hero__scroll { transition: opacity 220ms ease; }
body.menu-open .hero__heading,
body.menu-open .hero__subheading,
body.menu-open .hero__scroll { opacity: 0; }

/* Header solidifies to the PAGE background, not the section background, so the
   boxed sections stay visually distinct even when the header is sticky. */
.site-header--scrolled { background: var(--color-page); }

/* ============================================================
   Hero — full block, dead centre by default, scroll hint
   ============================================================ */
.hero {
  /* Full viewport minus the gutters above and below (2 × gutter) */
  min-height: clamp(590px, calc(100vh - calc(var(--gutter) * 2)), 1070px);
  min-height: clamp(590px, calc(100dvh - calc(var(--gutter) * 2)), 1070px);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: clamp(5rem, 10vh, 8rem) var(--pad-gutter) clamp(4rem, 8vh, 6rem);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
  z-index: 1;
}
/* Hero video — sits under the gradient, above the background-image poster.
   Hidden on mobile and for reduced-motion users (poster image takes over). */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}
.hero__overlay {
  position: relative;
  max-width: min(90ch, 100%);
  z-index: 2;
}
.hero--align-center .hero__overlay { text-align: center; margin: 0 auto; }
.hero--align-left   .hero__overlay { text-align: left; margin-right: auto; }
.hero__heading {
  color: #fff;
  margin-bottom: 0.4em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero__subheading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1vw + 0.95rem, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* Scroll hint — animated "mouse with dot" at hero bottom */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 2.75rem);
  transform: translateX(-50%);
  color: #fff;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 200ms;
  z-index: 3;
}
.hero__scroll:hover { opacity: 1; color: #fff; }
.hero__scroll-mouse {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
}
.hero__scroll-dot {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 3px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: hero-scroll 1.8s ease-in-out infinite;
}
@keyframes hero-scroll {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  50%  { opacity: 0.3; transform: translate(-50%, 10px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Half — full-bleed 50/50, image flush, text pushed toward image
   ============================================================ */
.half {
  display: grid;
  gap: 0;
  align-items: stretch;
  padding: 0;
  height: clamp(420px, 60vh, 640px);      /* fixed height per viewport — all halves match */
  overflow: hidden;                         /* clip any content that exceeds the block */
  background: var(--color-bg);
}
.half--image-left  { grid-template-areas: "image content"; grid-template-columns: 1fr 1fr; }
.half--image-right { grid-template-areas: "content image"; grid-template-columns: 1fr 1fr; }

.half__image {
  grid-area: image;
  position: relative;
  overflow: hidden;
  min-height: 0;           /* allow grid child to shrink */
  min-width: 0;
}
.half__image img {
  position: absolute;       /* take out of flow — image never forces block height */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.half__content {
  grid-area: content;
  align-self: center;
  justify-self: center;                    /* centred in its half, equal L/R breathing room */
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 2.5rem);
  max-width: 60ch;                          /* ~66% of a 50vw half on desktop */
  width: 100%;
}
/* Text reads toward the image: left-align when image is left, right-align when image is right */
.half--image-left  .half__content { text-align: left; }
.half--image-right .half__content { text-align: right; }
/* Body/bullets pointed sensibly even when text-align: right */
.half__heading { margin-bottom: 0.3em; }
.half__subheading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lead);
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  font-weight: 400;
}
.half__body ul, .half__body ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.half__body p { margin: 0 0 1rem; }

/* Stack below 720px — single column, image on top, auto height (content drives) */
@media (max-width: 720px) {
  .half {
    grid-template-areas: "image" "content" !important;
    grid-template-columns: 1fr !important;
    height: auto;
    overflow: visible;
  }
  .half__image {
    height: clamp(220px, 50vw, 340px);
  }
  .half__content {
    padding: clamp(1.75rem, 6vw, 2.5rem) var(--pad-gutter);
    justify-self: stretch !important;
    max-width: none;
  }
}

/* ============================================================
   Map / Testimonials / Blog grid / Gallery / Lightbox
   ============================================================ */
/* Map — rendered as a half block: iframe in the image half, text in the content half */
.map .half__image { background: #e8e6dd; }
.map iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  border: 0;
}
/* Click-to-activate placeholder — keeps Lighthouse perf clean until user taps */
.map__activate {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background:
    linear-gradient(135deg, rgba(107, 126, 94, 0.10), rgba(166, 124, 82, 0.10)),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 40px),
    #ece9df;
  border: 0;
  color: var(--color-primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  transition: background-color 200ms;
}
.map__activate:hover { color: var(--color-accent); }
.map__activate-pin {
  display: inline-flex;
  color: var(--color-primary);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  transition: transform 220ms;
}
.map__activate:hover .map__activate-pin { transform: translateY(-4px); }
.map__activate-label {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--fs-small);
  font-weight: 600;
}
.map__placeholder {
  padding: 3rem 1rem;
  text-align: center;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  color: var(--color-muted);
  font-style: italic;
}

.testimonials { padding: var(--pad-section) var(--pad-gutter); }
.testimonials__inner { max-width: var(--content-max); margin: 0 auto; }
.testimonials__heading { text-align: center; margin-bottom: 2.5rem; }
.testimonials__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.testimonial {
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.testimonial__rating { color: var(--color-accent); font-size: 1.1rem; }
.testimonial__rating .star { color: rgba(0,0,0,0.15); }
.testimonial__rating .star--on { color: var(--color-accent); }
.testimonial__quote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--color-text);
}
.testimonial__name {
  font-size: var(--fs-small);
  color: var(--color-muted);
  margin-top: auto;
}

.blog-grid { padding: var(--pad-section) var(--pad-gutter); }
.blog-grid__inner { max-width: var(--content-max); margin: 0 auto; }
.blog-grid__heading { text-align: center; margin-bottom: 2.5rem; }
.blog-grid__cards {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 200ms, box-shadow 200ms;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  color: var(--color-text);
}
.blog-card__image img {
  width: 100%; aspect-ratio: 3 / 2;
  object-fit: cover; height: auto;
}
.blog-card__body { padding: clamp(1.25rem, 2vw, 1.75rem); }
.blog-card__title {
  font-size: var(--fs-h3);
  margin-bottom: 0.5rem;
}
.blog-card__excerpt {
  color: var(--color-muted);
  font-size: var(--fs-body);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.blog-card__date {
  font-size: var(--fs-small);
  color: var(--color-muted);
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gallery {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--pad-section) var(--pad-gutter);
}
.gallery__heading { text-align: center; margin-bottom: 2rem; }
.gallery__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.gallery__item {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #000;
  aspect-ratio: 4 / 3;
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 300ms, opacity 200ms;
}
.gallery__item:hover img { transform: scale(1.04); opacity: 0.9; }
.gallery__caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: var(--fs-small);
  font-style: italic;
}

.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  flex-direction: column;
  gap: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.5rem;
  background: none; border: 0;
  font-size: 2.5rem; line-height: 1;
  cursor: pointer; color: #fff;
}
.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  border-radius: 4px;
}
.lightbox__caption {
  color: #fff;
  font-style: italic;
  text-align: center;
  max-width: 600px;
  margin: 0;
}

/* Footer — three-column grid of link lists / content blocks */
.site-footer {
  background: #2a2a2a;
  color: #ddd;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-gutter) 1.5rem;
  margin-top: 0;
}
.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}
.site-footer__col-heading {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.2vw + 0.8rem, 1.4rem);
  color: #fff;
  margin: 0 0 1rem;
  font-weight: 600;
}
.site-footer__links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.site-footer__links a {
  color: #ddd;
  text-decoration: none;
  font-size: var(--fs-body);
  transition: color 150ms;
}
.site-footer__links a:hover { color: #fff; }
.site-footer__cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--color-primary);
  border-radius: 3px;
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.site-footer__cta:hover { background: var(--color-accent); }
.site-footer__col-body {
  color: #ccc;
  font-size: var(--fs-body);
  line-height: 1.6;
}
.site-footer__col-body p { margin: 0 0 0.75rem; }
.site-footer__tiny {
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  font-size: var(--fs-small);
  color: #888;
  text-align: center;
}
