/* =========================================================
   The Little Pilates Company – Clean Stylesheet
   Fixes testimonial fade (no display:none; opacity cross-fade)
   ========================================================= */

:root{
  --container: 1200px;
  --pad: 32px;
  --ink: #2f2f2f;
  --link: #9a9a9a;
  --paper: #ffffff;
  --panel: #e9e6e1;
  --mid: #9a9a9a;
  --btn: #9a9a9a;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:var(--paper);
}

h1,h2{
  font-family:"Lora", Georgia, serif;
  font-weight:400;
  margin:0 0 16px;
}

em{ font-style:italic; }

a { color: var(--link); }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--pad);
}

/* =========================================================
   Header / Nav
   ========================================================= */

.site-header{
  position:absolute;
  top:0; left:0; right:0;
  z-index:10;
}

.header-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand img{
  display:block;
  width:64px;
  height:auto;
}

.primary-nav{
  display:flex;
  gap:28px;
  align-items:center;
}

.primary-nav a{
  color:#fff;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:12px;
  position:relative;
  transition: opacity 200ms ease;
}

.primary-nav a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:1px;
  background: currentColor;
  opacity:0;
  transform: scaleX(.85);
  transition: opacity 200ms ease, transform 200ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible{
  opacity:.85;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after{
  opacity:.9;
  transform: scaleX(1);
}

.burger{
  display:none;
  background:none;
  border:0;
  padding:8px;
}

.burger span{
  display:block;
  width:26px;
  height:2px;
  background:#fff;
  margin:6px 0;
}

.header-social{
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--pad) 0;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

/* reuse footer icon behaviour */
.header-social a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.75;
  transition: opacity 200ms ease, transform 200ms ease;
}

.header-social a:hover,
.header-social a:focus-visible{
  opacity:1;
  transform: translateY(-1px);
}

.header-social img{
  display:block;
  width:16px;
  height:auto;
  filter: brightness(0) invert(1) opacity(1);
}

/* =========================================================
   Hero (homepage video hero)
   ========================================================= */

.hero{
  position:relative;
  min-height:72vh;
  display:flex;
  align-items:flex-end;
  padding:120px 0 72px;
  overflow:hidden;

  /* Fallback image if video is hidden/blocked */
  background-image: url("/images/hero-poster.jpg");
  background-size: cover;
  background-position: center;
}

/* Reduced motion: keep poster, hide video */
@media (prefers-reduced-motion: reduce){
  .hero-video{ display:none; }
  .hero{ background-size:cover; background-position:center; }
}

.hero-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition: opacity 700ms ease;
}

.hero.is-video-ready .hero-video{
  opacity:1;
}

/* Overlay: slightly darker before video is ready, then eases lighter */
.hero-overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.42);
  transition: background 900ms ease;
}

.hero.is-video-ready .hero-overlay{
  background: rgba(0,0,0,.32);
}

.hero-content{
  position: relative;
  color: #fff;

  /* centre the overall hero content area to match logo + panels */
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);

  text-align: left;
  width: 100%;
}

/* keep the actual text block at your intended measure, but left-aligned */
.hero-content > *{
  max-width: 720px;
}

.hero-title{
  font-size: 64px;
  line-height: 1.05;
}

.hero-copy{
  max-width: 520px;
  opacity: .9;
  line-height: 1.6;
}

/* =========================================================
   Image hero (inner pages) – single source of truth
   ========================================================= */

/* When a hero is an image hero, neutralise the homepage sizing/padding/poster */
.hero.hero--image{
  min-height: 0;
  padding: 0;
  background-image: none;
  position: relative;
  overflow: hidden;
  height: 520px;
  display: block;
}

/* Compact variant */
.hero.hero--image.hero--compact{
  height: 460px;
}

/* Responsive heights */
@media (max-width: 900px){
  .hero.hero--image{ height: 420px; }
  .hero.hero--image.hero--compact{ height: 380px; }
}

@media (max-width: 520px){
  .hero.hero--image{ height: 340px; }
  .hero.hero--image.hero--compact{ height: 320px; }
}

/* Image behaves like background-cover */
.hero.hero--image .hero-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* Slightly lighter overlay for image heroes */
.hero.hero--image .hero-overlay{
  background: rgba(0,0,0,.18);
}

/* KEY FIX:
   On image heroes, hero-content becomes an absolute overlay layer
   (homepage hero-content remains unchanged) */
.hero.hero--image .hero-content{
  position: absolute;
  inset: 0;

  /* cancel homepage container behaviour */
  max-width: none;
  margin: 0;
  padding: 0;

  display: flex;
  align-items: flex-end;
  justify-content: center;     /* centres the inner container like header-inner */
  padding-bottom: 48px;

  text-align: right;
}

/* Use the container to align to the same right edge as the menu */
.hero.hero--image .hero-content .container{
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* Remove the 720px cap for inner page hero headline/copy */
.hero.hero--image .hero-content > *{
  max-width: none;
}

/* Ensure the headline is right-aligned properly */
.hero.hero--image .hero-title{
  width: auto;               /* don’t force full width; let container alignment do the work */
  text-align: right;
}

/* Mobile: move inner page headline left */
@media (max-width: 520px){
  .hero.hero--image .hero-content{
    justify-content: flex-start;
    text-align: left;
    padding-bottom: 24px;
  }

  .hero.hero--image .hero-content .container{
    justify-content: flex-start;
  }

  .hero.hero--image .hero-title{
    text-align: left;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn{
  display:inline-block;
  margin-top:18px;
  padding:12px 22px;
  border-radius:999px;
  background:var(--btn);
  color:#fff;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:12px;
  transition: transform 200ms ease, filter 200ms ease, opacity 200ms ease;
}

.btn:hover{
  filter: brightness(1.1);
}

.btn:active{
  transform: translateY(0);
  filter: brightness(.9);
}

.btn:focus-visible{
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}

/* =========================================================
   Split Feature
   ========================================================= */

.split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  max-width:var(--container);
  margin:40px auto 0;
  padding:0 var(--pad);
}

.split-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.split-panel{
  background:var(--panel);
  padding:64px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.split-panel h2{
  font-size:44px;
  line-height:1.1;
}

.split--reverse .split-panel{ order:1; }

/* Flipped: copy left, image right */
.split--flip .split-media{ grid-column: 2; }
.split--flip .split-panel{ grid-column: 1; }

@media (max-width: 900px){

  .split{
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 0;
  }

  /* Critical: undo the flip column placements on mobile */
  .split--flip .split-media,
  .split--flip .split-panel{
    grid-column: 1 / -1;
  }
  
  .split--flip .split-media{ order: 1; }
  .split--flip .split-panel{ order: 2; }
  
  /* kill any default top margin that can look like a “gap” */
  .split-panel > :first-child{
    margin-top: 0;
  }
  
  /* ensure the image doesn’t introduce a baseline gap */
  .split-media img{
    display: block;
  }
}


/* =========================================================
   Testimonials – section styling + cross-fade carousel (FIXED)
   ========================================================= */

.testimonials{
  position:relative;
  padding:72px 0;
  background: var(--mid);
  border-top: 40px solid var(--paper);
}

.testimonials .container{
  max-width: 980px;
}

.testimonial-carousel{
  position:relative;
  min-height: 180px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Base slide (no display:none – allows opacity transition) */
.testimonials .testimonial{
  position:absolute;
  inset:0;
  margin:0;

  opacity:0;
  transition: opacity 700ms ease;

  pointer-events:none;
  z-index:0;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding: 0 24px;

  text-align:center;
}

.testimonials .testimonial.is-active{
  opacity:1;
  pointer-events:auto;
  z-index:1;
}

.testimonials blockquote{
  margin:0;
  font-family:"Lora", Georgia, serif;
  font-style:italic;
  font-weight:400;
  font-size:40px;
  line-height:1.15;
  color:var(--paper);
}

.testimonials figcaption{
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color: rgba(0,0,0,.55);
}


/* =========================================================
   Content
   ========================================================= */


.content{
  padding: 60px 0;
}

.content-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 64px;
  align-items: start;
}

/* WIDE variant: keep container + padding, remove the 2-col grid */
.content-wide {
  grid-template-columns: 1fr;
  column-gap: 0;
}

/* Strap: full width of whatever grid it sits in */
.content-strap{
  grid-column: 1 / -1;
}

/* Strapline */
.content-strap h2{
  font-family: "Lora", Georgia, serif;
  color: var(--mid);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.25;
  margin: 0;
}

.content-strap h3{
  font-family: "Lora", Georgia, serif;
  color: var(--mid);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  margin: 16px 0 0 0;
  max-width: 28ch;
}
.content-wide .content-strap h3{
  max-width:none;
}

.content-strap h3 a {
  color:var(--mid);
}
.content-strap h3 a:hover {
  color:var(--ink);
}

/* Body copy */
.content-body{
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  padding-top:12px;
}

img.signoff {
  width:80px;
}

/* Subheads */
.content-body h3{
  font-weight: 400;
  color: var(--mid);
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px 0;
}

/* Paragraphs */
.content-body p{
  margin: 0 0 32px 0;
}

.caveat {
  color:var(--mid);
}

/* Responsive  */
@media (max-width: 900px){
  .content-inner{
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .content-strap h2{
    font-size: 30px;
  }
}

@media (max-width: 820px){
  .content-inner{
    grid-template-columns: 1fr;
    row-gap: 32px;
  }

  .content-strap h2{
    font-size: 30px;
  }

  .content-strap h3{
    max-width: none; /* let it breathe on mobile */
    font-size: 16px;
  }
  
  
}

/* Responsive tweaks */
@media (max-width:1023px){
  .testimonials{ padding:56px 0; }
  .testimonial-carousel{ min-height: 170px; }
  .testimonials blockquote{ font-size:34px; }
}

@media (max-width:767px){
  .testimonials{ padding:44px 0; }
  .testimonial-carousel{ min-height: 160px; }
  .testimonials blockquote{ font-size:28px; line-height:1.2; }
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer{
  padding:18px 0 28px;
}

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

.site-footer p{
  margin:0;
  font-size:12px;
  color:#777;
}

/* Social icons */
.footer-social{
  display:flex;
  gap:14px;
}

.footer-social a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.75;
  transition: opacity 200ms ease, transform 200ms ease;
}

.footer-social a:hover,
.footer-social a:focus-visible{
  opacity:1;
  transform: translateY(-1px);
}

.footer-social img{
  display:block;
  width:18px;
  height:auto;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet */
@media (max-width:1023px){
  :root{ --pad:24px; }
  .hero-title{ font-size:48px; }
  .split-panel{ padding:48px; }
  .split-panel h2{ font-size:36px; }
}

/* Mobile */
@media (max-width:767px){
  .primary-nav{ display:none; }
  .burger{ display:block; }

  .mobile-menu{
    background:rgba(0,0,0,.85);
    padding:16px 0 22px;
  }

  .mobile-menu nav{
    display:flex;
    flex-direction:column;
    gap:14px;
    padding:0 var(--pad);
  }

  .mobile-menu a{
    color:#fff;
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.18em;
    font-size:12px;
    transition: opacity 200ms ease;
  }

  .mobile-menu a:hover,
  .mobile-menu a:focus-visible{
    opacity:.85;
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  .hero{ padding:96px 0 48px; }
  .hero-title{ font-size:38px; }

  .split{ grid-template-columns:1fr; }
  .split-panel{ padding:34px; }
}
