/*  ============================================================
    Garden Rooms landing page — scoped styles
    Loaded ONLY on the "Garden Rooms Landing" page template
    (see functions.php conditional enqueue).

    Hybrid palette: keeps the site's typographic feel, introduces
    the Charlesgate Garden Rooms brand green as the accent.
    Everything is namespaced under .gr-page so nothing leaks
    into the rest of the site.
    ============================================================ */

.gr-page {
  --gr-green: #2a9453;   /* brand primary (Garden Rooms lockup) */
  --gr-green-dark: #217341;
  --gr-blue: #009fe2;    /* brand secondary */
  --gr-ink: #6a6a6a;     /* site heading grey (theme "Dark Grey" #6A6A6A) */
  --gr-grey: #8d8d8d;    /* site body grey (theme "Light Grey" #8D8D8D) */
  --gr-light: #f5f7f5;   /* soft off-white section band */
  --gr-line: #e4e8e4;

  color: var(--gr-grey);
  font-family: 'PT Sans', 'Open Sans', sans-serif;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.gr-page * { box-sizing: border-box; }

.gr-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 25px;
  width: 100%;
}

.gr-page h1,
.gr-page h2,
.gr-page h3 {
  font-family: 'PT Sans', 'Open Sans', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;   /* matches the site's title style */
  color: var(--gr-ink);        /* #6A6A6A */
}

/*  ---- Buttons ---------------------------------------------- */
.gr-btn {
  display: inline-block;
  background: var(--gr-green);
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85em;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 13px;   /* echoes the theme's .button pill */
  border: 1px solid var(--gr-green);
  transition: all 0.25s ease-in-out;
}
.gr-btn:hover {
  background: var(--gr-green-dark);
  border-color: var(--gr-green-dark);
  color: #fff !important;
}
.gr-btn--ghost {
  background: transparent;
  color: var(--gr-green) !important;
  border-color: var(--gr-green);
}
.gr-btn--ghost:hover {
  background: var(--gr-green);
  color: #fff !important;
}

/*  ---- Hero ------------------------------------------------- */
.gr-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;   /* vertically centred so the lede never clips at the fold */
  background-size: cover;
  background-position: center;
  background-color: #2c352e; /* fallback while no featured image */
  color: #fff;
}
.gr-hero__overlay {
  position: absolute;
  inset: 0;
  /* Two-layer scrim: darken the left (where the text sits) AND the base,
     so white text stays legible over bright parts of the photo. */
  background:
    linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.30) 50%, rgba(0,0,0,0.08) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.45) 100%);
}
.gr-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 110px;
  padding-bottom: 80px;
}
.gr-hero h1 {
  color: #fff;
  text-transform: uppercase;   /* match the site's title style */
  font-size: 2.2em;
  line-height: 1.2;
  letter-spacing: 0.03em;
  max-width: 20ch;
  margin: 0 0 0.5em;
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
.gr-hero__lede {
  font-size: 1.15em;
  line-height: 1.5;
  max-width: 52ch;
  margin: 0 0 1.7em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

/*  ---- Section scaffolding ---------------------------------- */
.gr-section { padding: 70px 0; }
.gr-section--tint {
  /* Site-wide paper texture used on content rows and the footer */
  background: url('/wp-content/uploads/2023/02/Background-2.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
}
.gr-section__head {
  max-width: 760px;
  margin: 0 auto 45px;
  text-align: center;
}
.gr-section__head h2 {
  font-size: 2em;
  margin: 0 0 0.35em;
}
.gr-section__head p { color: var(--gr-grey); margin: 0; }
.gr-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--gr-green);
  margin-bottom: 0.8em;
}

/*  ---- Why grid --------------------------------------------- */
.gr-why {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}
.gr-why__item {
  border-left: 3px solid var(--gr-green);
  padding: 2px 0 2px 20px;
}
.gr-why__item h3 {
  font-size: 1.1em;
  margin: 0 0 0.35em;
}
.gr-why__item p { margin: 0; color: var(--gr-grey); }

/*  ---- Projects --------------------------------------------- */
/* Full-bleed split rows: edge-to-edge image slider + textured text panel */
.gr-projects { padding: 70px 0 0; }
.gr-projects .gr-section__head { margin-bottom: 45px; }
.gr-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
}
.gr-project__media {
  position: relative;
  min-height: 340px;
}
.gr-project__media .cg-slider {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;   /* fill the split cell rather than self-size */
}
.gr-project__body {
  display: flex;
  align-items: center;
  background: url('/wp-content/uploads/2023/02/Background-2.jpg');
  background-size: 100% auto;
}
.gr-project__body-inner { padding: 55px 6vw; }
.gr-project--flip .gr-project__media { order: 2; }
.gr-project__body h3 { font-size: 1.6em; margin: 0 0 0.6em; }
.gr-project__body p { color: var(--gr-grey); }
/* Pill button echoing the site's understated button language (delicate hover) */
.gr-project__link {
  display: inline-block;
  margin-top: 1.4em;
  padding: 10px 28px;
  border: 1px solid var(--gr-green);
  border-radius: 22px;
  color: var(--gr-green);
  font-weight: 700;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.gr-project__link:hover {
  opacity: 1;
  background: var(--gr-green);
  color: #fff;
}

.gr-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gr-gallery a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
}
.gr-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gr-gallery a:hover img { transform: scale(1.06); }
.gr-gallery--empty {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--gr-line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3bbb3;
  font-size: 0.85em;
  text-align: center;
  padding: 20px;
}

/*  ---- Closing CTA band ------------------------------------- */
.gr-cta-band {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 150px 0;
  background-color: #2c352e;   /* fallback while no featured image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;  /* parallax */
}
.gr-cta-band__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);  /* keeps the text readable over the photo */
}
.gr-cta-band__inner { position: relative; z-index: 2; }
.gr-cta-band h2 {
  color: #fff;
  font-size: 2em;
  margin: 0 0 0.5em;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.gr-cta-band p {
  max-width: 58ch;
  margin: 0 auto;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}

/* The parallax banner sits directly above the footer contact form, so drop the
   theme's 60px gap between #content and the footer on this template. The
   body-class prefix raises specificity above the theme's `#colophon` rule,
   which otherwise re-asserts a 60px margin later in the cascade. */
.page-template-page-garden-rooms-php #colophon { margin-top: 0 !important; }

/*  ---- Intro / entity -------------------------------------- */
.gr-intro { max-width: 820px; }
.gr-intro h2 { font-size: 1.9em; margin: 0 0 0.5em; }
.gr-intro p { font-size: 1.08em; color: var(--gr-grey); margin: 0; }

/*  ---- Uses ------------------------------------------------- */
.gr-uses {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.gr-use {
  background: #fff;
  border: 1px solid var(--gr-line);
  border-top: 3px solid var(--gr-green);
  border-radius: 8px;
  padding: 22px 18px;
}
.gr-use h3 { font-size: 1.02em; margin: 0 0 0.4em; }
.gr-use p { margin: 0; color: var(--gr-grey); font-size: 0.92em; }

/*  ---- Uses parallax band ----------------------------------- */
.gr-uses-band {
  position: relative;
  background-color: #2c352e;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;   /* parallax — matches the closing CTA band */
}
.gr-uses-band__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
}
.gr-uses-band__inner { position: relative; z-index: 2; }
.gr-uses-band .gr-section__head h2 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.gr-uses-band .gr-section__head p { color: rgba(255, 255, 255, 0.9); }
/* Frosted-glass cards on the image — green top detail dropped */
.gr-uses-band .gr-use {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gr-uses-band .gr-use h3 { color: #fff; }
.gr-uses-band .gr-use p { color: rgba(255, 255, 255, 0.85); }
@media only screen and (max-width: 767px) {
  .gr-uses-band { background-attachment: scroll; }
}

/*  ---- Guide prices ----------------------------------------- */
.gr-prices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gr-price {
  background: #fff;
  border: 1px solid var(--gr-line);
  border-top: 3px solid var(--gr-green);
  border-radius: 8px;
  padding: 28px 18px;
  text-align: center;
}
.gr-price__size {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gr-ink);
  margin-bottom: 0.7em;
}
.gr-price__from {
  display: block;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gr-grey);
}
.gr-price__val {
  display: block;
  font-size: 1.7em;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gr-green);
}
.gr-price__vat {
  display: block;
  margin-top: 0.4em;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gr-grey);
}
.gr-prices__note {
  max-width: 72ch;
  margin: 34px auto 0;
  text-align: center;
  color: var(--gr-grey);
  font-size: 0.95em;
}

/*  ---- Masthead sub-brand ------------------------------------
    On this page only (this stylesheet is loaded solely on the
    Garden Rooms template), "Garden Rooms" sits under the
    Charlesgate icon so the header reads as its own mark.       */
.site-branding {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  top: 16px;   /* vertically centres the taller stacked mark */
}
/* The masthead stays exactly 90px tall — identical to every other page, so the
   header, nav and content start-point never shift. Instead we scale the mark
   itself so the icon + wordmark sit comfortably inside the standard height. */
.site-branding img:not(.site-branding__sub) {
  width: 68px;
  height: auto;
}
.site-branding__sub {
  display: block;
  width: 78px;
  height: auto;
  margin-top: 5px;
  /* Optical nudge right. Not a margin: flexbox centres the *margin box*, so a
     left margin would only shift it half as far. `left` moves it exactly. */
  position: relative;
  left: 2px;
}
@media only screen and (max-width: 900px) {
  .gr-prices { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 560px) {
  .gr-prices { grid-template-columns: 1fr; }
}

/*  ---- FAQ (accordion) -------------------------------------- */
.gr-faq {
  max-width: 820px;
  margin: 0 auto;
}
.gr-faq__item { border-bottom: 1px solid var(--gr-line); }
.gr-faq__item:first-child { border-top: 1px solid var(--gr-line); }
.gr-faq__q { margin: 0; font-size: 1em; }
.gr-faq__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 22px 0;
  font-family: 'PT Sans', 'Open Sans', sans-serif;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--gr-ink);
}
.gr-faq__q-text { flex: 1; }
.gr-faq__icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.gr-faq__icon::before,
.gr-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 2px;
  margin-top: -1px;
  background: var(--gr-green);
  transition: transform 0.3s ease;
}
.gr-faq__icon::after { transform: rotate(90deg); }                     /* plus when closed */
.gr-faq__item.is-open .gr-faq__icon::after { transform: rotate(0); }   /* minus when open */
/* Animate the real content height (grid 0fr→1fr) — smooth + symmetric,
   unlike a max-height cap which finishes early opening and snaps closing. */
.gr-faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gr-faq__item.is-open .gr-faq__a { grid-template-rows: 1fr; }
.gr-faq__a-inner {
  overflow: hidden;
  min-height: 0;
}
/* Padding lives on the paragraph (inside the clipper) so it collapses to 0 */
.gr-faq__a-inner p { margin: 0; padding: 0 44px 26px 0; color: var(--gr-grey); }

/*  ---- Responsive ------------------------------------------- */
@media only screen and (max-width: 980px) {
  .gr-uses { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 799px) {
  .gr-hero h1 { font-size: 2.1em; }
  .gr-why { grid-template-columns: 1fr; gap: 22px; }
  .gr-uses { grid-template-columns: 1fr; }
  .gr-project,
  .gr-project--flip {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .gr-project--flip .gr-project__media { order: 0; }
  .gr-project__media { min-height: 300px; }
  .gr-project__body-inner { padding: 40px 25px; }
  .gr-section { padding: 50px 0; }
}

@media only screen and (max-width: 767px) {
  .gr-hero { min-height: 60vh; }
  .gr-hero__lede { font-size: 1.05em; }
}

/*  ---- Parent-theme overrides ------------------------------- */
/* The design-house parent centres headings + body text and uppercases
   headings inside #content. Reset to a left-aligned, sentence-case reading
   layout for content blocks; keep section intros and the CTA band centred. */
/* Long FAQ questions read better sentence-case than in full caps */
.gr-page .gr-faq__q { text-transform: none; letter-spacing: 0.01em; }

.gr-page .gr-hero__inner,
.gr-page .gr-intro,
.gr-page .gr-why__item,
.gr-page .gr-use,
.gr-page .gr-project__body,
.gr-page .gr-faq,
.gr-page .gr-faq__item,
.gr-page .gr-faq__q,
.gr-page .gr-faq__a p { text-align: left; }

.gr-page .gr-hero .gr-btn { margin: 0; }

.gr-page .gr-section__head,
.gr-page .gr-cta-band { text-align: center; }

/*  ---- Hero refinements ------------------------------------- */
.gr-hero h1 { letter-spacing: 0.03em; }

/* Two-column hero: text left, Charlesgate Garden Rooms lockup right */
.gr-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;  /* fixed logo column so it can breathe */
  gap: 40px;
  align-items: center;
}
.gr-hero__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gr-hero__logo {
  display: block;
  width: 420px;
  max-width: 100%;
  height: auto;
  margin: 0;
}
@media only screen and (max-width: 900px) {
  .gr-hero__inner { grid-template-columns: 1fr; }
  .gr-hero__brand { display: none; }   /* drop the lockup on mobile/tablet */
}

.gr-hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72em;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.1em;
  padding-bottom: 0.75em;
  position: relative;
}
.gr-hero__eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 2px;
  background: var(--gr-green);
}

.gr-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.gr-btn--ghost-light {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,0.75);
}
.gr-btn--ghost-light:hover {
  background: #fff;
  color: var(--gr-ink) !important;
  border-color: #fff;
}

.gr-hero__trust {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.gr-hero__trust li {
  position: relative;
  color: rgba(255,255,255,0.92);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-left: 20px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.gr-hero__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gr-green);
}

.gr-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  z-index: 3;
}
.gr-hero__scroll::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  animation: gr-scroll 1.6s ease-in-out infinite;
}
@keyframes gr-scroll {
  0%   { opacity: 0; top: 8px; }
  40%  { opacity: 1; }
  100% { opacity: 0; top: 20px; }
}

@media only screen and (max-width: 767px) {
  .gr-hero__scroll { display: none; }
  .gr-hero__trust { gap: 8px 16px; }
  /* iOS/Android ignore fixed attachment and can distort it — use scroll */
  .gr-cta-band { background-attachment: scroll; }
}
