/* ============================================================
   JM TILE SOLUTION — design tokens
   Theme: light / "Cold Luxury" — ONE theme for the whole page
   (cold off-white, never cream/warm-paper), with exactly one
   deliberate exception: the hero, which stays a dark media moment
   (video + overlay + white text) for legibility, the same way
   Carlisle's own hero is a dark photograph inside an otherwise
   light site. Single saturated accent (brand cobalt). Gold is a
   rare second-tier detail — hover underline, one quote mark, one
   "featured" rule — never a parallel accent.
   Radius system: ALL-SHARP (0) across cards and images. Documented
   exception: buttons and form inputs share a 16px radius.
   ============================================================ */

:root{
  /* light surfaces — cold neutrals, no warm/cream undertone */
  --surface-0:#F5F4F2; /* page base, shared with the footer */
  --surface-1:#FFFFFF; /* elevated surfaces (stack cards, footer bar) */
  --surface-2:#EAEAEC; /* tinted section alternation within the light family */
  --line:#E1E1E4;       /* hairlines / dividers */

  /* text scale */
  --ink-950:#0F0F0F; /* brand black, headings */
  --ink-700:#3A3A3F; /* body text */
  --ink-500:#6B6B70; /* muted / secondary text, captions */
  --ink-300:#9A9AA0; /* faint text */

  /* dark media moment (hero only) */
  --media-ink:#0F0F0F;
  --media-text:#F2F2F4;
  --media-text-dim:#C7C7CE;

  /* dark navy/cobalt-tinted block — process, footer, and the middle
     testimonial slide share this exact treatment so it reads as one
     deliberate rhythm, not three unrelated dark patches */
  --navy-950:#0A0E22;
  --navy-900:#10153A;
  --navy-700:#2B3270;
  --navy-text:#ECEEFB;
  --navy-text-dim:#A6ACD6;

  /* brand cobalt — the single accent, used identically everywhere */
  --cobalt-600:#3A48D8; /* active/pressed */
  --cobalt-500:#4D5FFD; /* primary accent */
  --cobalt-400:#7B89FF; /* hover lighten */
  --cobalt-tint:rgba(77,95,253,0.12);

  /* brand gold — reserved, rare, never competes with cobalt */
  --gold-500:#F4C512;

  --font:'Google Sans', system-ui, sans-serif;
  --font-heading:'Raleway', system-ui, sans-serif; /* headings (h1-h6) and quote blocks */

  --fs-hero: clamp(2.4rem, 1.7rem + 3.2vw, 4.6rem);
  --fs-h2:   clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  --fs-h3:   clamp(1.2rem, 1.08rem + 0.5vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  --fs-body: clamp(0.98rem, 0.94rem + 0.15vw, 1.0625rem);
  --fs-small:clamp(0.78rem, 0.76rem + 0.08vw, 0.85rem);

  --container: 1320px;
  --gutter: clamp(1.25rem, 1rem + 2vw, 3.5rem);
  --radius: 0px;
}

/* ============================================================
   FONTS — self-hosted variable Google Sans (woff2), downloaded once
   from fonts.gstatic.com so production never depends on a
   render-blocking request to fonts.googleapis.com.
   ============================================================ */
@font-face{
  font-family:'Google Sans';
  src:url('../assets/fonts/googlesans-normal-latin.woff2') format('woff2');
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:'Google Sans';
  src:url('../assets/fonts/googlesans-italic-latin.woff2') format('woff2');
  font-weight:400 700;
  font-style:italic;
  font-display:swap;
}
@font-face{
  font-family:'Raleway';
  src:url('../assets/fonts/raleway-normal-latin.woff2') format('woff2');
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:'Raleway';
  src:url('../assets/fonts/raleway-italic-latin.woff2') format('woff2');
  font-weight:100 900;
  font-style:italic;
  font-display:swap;
}

/* ============================================================
   RESET
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:auto;}
body{
  font-family:var(--font);
  background:var(--surface-0);
  color:var(--ink-700);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{display:block;max-width:100%;height:auto;}
a{color:inherit;text-decoration:none;}
ul,ol{list-style:none;}
button{font-family:inherit;border:none;background:none;color:inherit;cursor:pointer;}

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding-inline:var(--gutter);
}

h1,h2,h3,h4,h5,h6{
  font-family:var(--font-heading);
  font-weight:800;
  letter-spacing:-0.01em;
  line-height:1.08;
  color:var(--ink-950);
}
h2{font-size:var(--fs-h2);}
h3{font-size:var(--fs-h3);line-height:1.2;}
p{font-size:var(--fs-body);color:var(--ink-500);}

em, i{font-style:italic;line-height:1.15;padding-bottom:0.08em;display:inline-block;}

/* ============================================================
   BUTTONS — sharp corners, one accent, uppercase tracked label,
   fits one line, tactile press feedback on :active
   ============================================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.65rem;
  padding:1rem 2rem;
  font-size:var(--fs-small);
  font-weight:600;
  letter-spacing:0.14em;
  text-transform:uppercase;
  white-space:nowrap;
  border-radius:16px; /* exclusive to buttons, the rest of the site stays all-sharp (var(--radius)) */
  transition:transform .25s cubic-bezier(.16,1,.3,1), background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--primary{
  background:var(--cobalt-500);
  color:#fff;
  border:1px solid var(--cobalt-500);
}
.btn--primary:hover{background:var(--cobalt-600);border-color:var(--cobalt-600);}
.btn--primary:active{transform:translateY(1px) scale(.98);}

.btn--small{padding:.75rem 1.5rem;}

/* ============================================================
   NAV — single line, height capped, sticky
   ============================================================ */
.nav{
  position:fixed;
  top:0;left:0;right:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.5rem;
  height:72px;
  padding-inline:var(--gutter);
  background:#FFFFFF;
  border-bottom:1px solid var(--line);
}
.nav__logo{display:flex;align-items:center;gap:.6rem;flex-shrink:0;}
.nav__logo-img{height:54px;width:auto;display:block;}
.nav__links{
  display:flex;
  align-items:center;
  gap:2rem;
  margin-inline:auto;
}
.nav__links a{
  position:relative;
  font-size:var(--fs-small);
  font-weight:600;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--ink-500);
  transition:color .2s ease;
  white-space:nowrap;
}
.nav__links a::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:-6px;
  height:2px;
  background:var(--gold-500);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s cubic-bezier(.16,1,.3,1);
}
.nav__links a:hover{color:var(--ink-950);}
.nav__links a:hover::after{transform:scaleX(1);}
.nav__cta{flex-shrink:0;}
.nav__cta--mobile{display:none;}
.nav__toggle{display:none;}

/* ============================================================
   HERO — full-bleed video, asymmetric left-aligned content
   ============================================================ */
.hero{
  position:relative;
  min-height:100dvh;
  display:flex;
  align-items:center;
  overflow:hidden;
}
.hero__media{position:absolute;inset:0;z-index:0;background:var(--navy-950);}
.hero__video{
  width:100%;height:100%;
  object-fit:cover;
}
.hero__overlay{
  position:absolute;inset:0;
  /* navy-tinted shadow (--navy-950 as rgb) instead of a neutral black
     scrim, so the hero reads as the same cold-cobalt dark family used
     in process/footer/testimonial-b, not an unrelated black overlay */
  background:
    linear-gradient(100deg, rgba(10,14,34,0.92) 0%, rgba(10,14,34,0.76) 32%, rgba(10,14,34,0.40) 58%, rgba(10,14,34,0.22) 100%),
    linear-gradient(0deg, rgba(10,14,34,0.6) 0%, rgba(10,14,34,0) 30%);
}
.hero__content{
  position:relative;
  z-index:1;
  max-width:640px;
  padding-top:5rem;
  text-align:left;
}
.hero__headline{
  font-size:var(--fs-hero);
  margin-bottom:1.5rem;
  color:var(--media-text);
}
.hero__sub{
  font-size:var(--fs-lead);
  color:var(--media-text-dim);
  max-width:42ch;
  margin-bottom:2.25rem;
}

/* ============================================================
   INTRO
   ============================================================ */
.intro{padding-block:clamp(5rem,4rem + 5vw,9rem);}
.intro__grid{
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap:clamp(2rem,1.5rem + 3vw,5rem);
  align-items:start;
}
.intro__heading{font-size:var(--fs-h2);}
.intro__body p{margin-bottom:1.25rem;max-width:46ch;}
.intro__body p:last-child{margin-bottom:0;}

/* ============================================================
   SERVICES — asymmetric bento, exactly 4 cells, no empties
   ============================================================ */
.services{padding-block:clamp(4rem,3rem + 4vw,7rem);}
.services__heading{margin-bottom:clamp(2rem,1.5rem + 2vw,3.5rem);max-width:16ch;}

.bento{
  display:grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap:clamp(.75rem,.6rem + .6vw,1.5rem);
}
.bento__card{position:relative;overflow:hidden;background:var(--surface-2);}
.bento__card img{
  width:100%;height:100%;
  object-fit:cover;
  transition:transform .6s cubic-bezier(.16,1,.3,1);
}
.bento__card:hover img{transform:scale(1.04);}

.bento__card--feature{grid-column:1 / 2; grid-row:1 / 3; min-height:560px;}
.bento__card:nth-of-type(2){grid-column:2 / 3; grid-row:1 / 2; min-height:270px;}
.bento__card:nth-of-type(3){grid-column:3 / 4; grid-row:1 / 2; min-height:270px;}
.bento__card--wide{grid-column:2 / 4; grid-row:2 / 3; min-height:270px;}

.bento__caption{
  position:absolute;left:0;right:0;bottom:0;
  padding:clamp(1.25rem,1rem + 1vw,2rem);
  background:linear-gradient(0deg, rgba(15,15,15,0.92) 0%, rgba(15,15,15,0.55) 55%, rgba(15,15,15,0) 100%);
}
.bento__caption h3{margin-bottom:.5rem;color:var(--media-text);}
.bento__caption p{font-size:var(--fs-small);max-width:36ch;color:var(--media-text-dim);}
/* the marble card is the flagship material: one rare gold rule marks it
   as featured, never repeated on the other three cards */
.bento__card--feature .bento__caption::before{
  content:"";
  display:block;
  width:32px;height:3px;
  background:var(--gold-500);
  margin-bottom:.85rem;
}

/* ============================================================
   WHY CHOOSE US — featured block + asymmetric secondary pair
   (explicitly NOT three equal cards)
   ============================================================ */
.why{padding-block:clamp(4rem,3rem + 4vw,7rem);}
.why__feature{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:clamp(2rem,1.5rem + 3vw,4rem);
  align-items:center;
  margin-bottom:clamp(3rem,2rem + 3vw,5rem);
}
.why__feature-text h2{margin-bottom:1.25rem;max-width:14ch;}
.why__feature-text p{max-width:42ch;}
.why__feature-img{width:100%;aspect-ratio:9/10;object-fit:cover;}

.why__row{
  display:grid;
  grid-template-columns: 5fr 7fr;
  gap:clamp(1.5rem,1rem + 2vw,3rem);
  border-top:1px solid var(--line);
  padding-top:clamp(2rem,1.5rem + 2vw,3rem);
}
.why__block h3{margin-bottom:.6rem;}
.why__block p{max-width:38ch;}

/* icons are masked so the single accent color can be applied via CSS
   instead of baking color into the SVG file */
.why__icon{
  display:inline-block;
  width:20px;height:20px;margin-bottom:1rem;
  background-color:var(--cobalt-500);
  -webkit-mask-image:url('../assets/icons/check.svg');
  mask-image:url('../assets/icons/check.svg');
  -webkit-mask-size:contain;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
}

/* ============================================================
   PROCESS — horizontal sequence, real verbs, connecting line
   ============================================================ */
.process{padding-block:clamp(4rem,3rem + 4vw,7rem);background:var(--navy-950);}
.process h2{margin-bottom:clamp(2.5rem,2rem + 2vw,4rem);max-width:16ch;color:var(--navy-text);}
.process__steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:clamp(1.5rem,1rem + 2vw,2rem);
  position:relative;
}
.process__steps::before{
  content:"";
  position:absolute;
  top:.55em;left:0;right:0;
  height:1px;
  background:var(--navy-700);
  z-index:0;
}
.process__step{position:relative;padding-top:2.25rem;}
.process__step::before{
  content:"";
  position:absolute;top:0;left:0;
  width:9px;height:9px;
  background:var(--cobalt-400);
}
.process__verb{
  display:block;
  font-size:var(--fs-h3);
  font-weight:700;
  color:var(--navy-text);
  margin-bottom:.6rem;
}
.process__step p{font-size:var(--fs-small);max-width:30ch;color:var(--navy-text-dim);}

/* ============================================================
   TESTIMONIALS — sticky-stack pattern (skill Sec. 5.A):
   each quote is a full-viewport moment; as the next one arrives the
   previous shrinks and fades, justified as sequential trust reveal.
   ============================================================ */
.testimonials{padding-top:clamp(4rem,3rem + 4vw,7rem);}
.testimonials__heading-row{margin-bottom:clamp(2rem,1.5rem + 2vw,3rem);}
.testimonials__heading-row h2{max-width:16ch;}

.testimonials__stack{position:relative;}
.stack-card{
  position:sticky;
  top:0;
  min-height:100dvh;
  display:flex;
  align-items:center;
  will-change:transform,opacity;
}
.stack-card--a{background:var(--surface-0);}
.stack-card--b{background:var(--navy-950);}
.stack-card--c{background:var(--surface-0);}

.testimonial{max-width:760px;}
.testimonial__mark{
  display:inline-block;
  width:32px;height:25px;margin-bottom:1.5rem;
  background-color:var(--gold-500);
  -webkit-mask-image:url('../assets/icons/quotes.svg');
  mask-image:url('../assets/icons/quotes.svg');
  -webkit-mask-size:contain;mask-size:contain;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
}
.testimonial blockquote{
  font-family:var(--font-heading);
  font-size:clamp(1.5rem,1.2rem + 1.6vw,2.4rem);
  font-weight:400;
  font-style:italic;
  line-height:1.35;
  color:var(--ink-950);
  margin-bottom:1.75rem;
  max-width:34ch;
}
.testimonial__name{font-size:var(--fs-small);color:var(--ink-500);line-height:1.5;}

/* the middle slide shares the navy block treatment with process/footer */
.stack-card--b .testimonial blockquote{color:var(--navy-text);}
.stack-card--b .testimonial__name{color:var(--navy-text-dim);}

@media (max-width:768px){
  .stack-card{position:static;min-height:auto;padding-block:3rem;}
  .stack-card--a,.stack-card--c{background:var(--surface-0);}
  .stack-card--b{background:var(--navy-950);}
  .stack-card:not(:last-child){border-bottom:1px solid var(--line);}
}

/* ============================================================
   FINAL CTA + FOOTER
   ============================================================ */
.final{background:var(--surface-0);padding-top:clamp(5rem,4rem + 5vw,8rem);}
.final__grid{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:clamp(2rem,1.5rem + 3vw,5rem);
  align-items:start;
  padding-bottom:clamp(4rem,3rem + 4vw,6rem);
}
.final__text h2{margin-bottom:1rem;max-width:16ch;color:var(--ink-950);}
.final__text p{max-width:40ch;color:var(--ink-500);}

.final__form{display:flex;flex-direction:column;gap:1.25rem;}
.form__field{display:flex;flex-direction:column;gap:.5rem;}
.form__field label{
  font-size:var(--fs-small);
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink-700);
}
.form__field input,
.form__field textarea{
  font-family:var(--font);
  font-size:var(--fs-body);
  padding:.85rem 1.1rem;
  border:1px solid var(--line);
  border-radius:16px; /* matches the button radius — the one documented exception to the all-sharp system */
  background:var(--surface-1);
  color:var(--ink-950);
  resize:vertical;
}
.form__field input::placeholder,
.form__field textarea::placeholder{color:var(--ink-300);}
.form__field input:focus,
.form__field textarea:focus{
  outline:none;
  border-color:var(--cobalt-500);
  box-shadow:0 0 0 3px var(--cobalt-tint);
}
.final__form .btn{align-self:flex-start;margin-top:.25rem;}
.final__form-note{font-size:var(--fs-small);color:var(--ink-500);}

.footer__bottom{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:2rem;
  align-items:center;
  padding-block:2rem;
  background:var(--surface-0);
  border-top:1px solid var(--line);
}
.footer__col{display:flex;align-items:center;gap:.6rem;}
.footer__logo-img{height:44px;width:auto;display:block;}
.footer__contact{flex-direction:column;align-items:flex-start;gap:.6rem;}
.footer__contact a, .footer__area{
  display:flex;align-items:center;gap:.6rem;
  font-size:var(--fs-small);color:var(--ink-500);
}
.footer__contact a:hover{color:var(--ink-950);}
.icon{
  display:inline-block;
  width:16px;height:16px;
  background-color:var(--ink-500);
  -webkit-mask-size:contain;mask-size:contain;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  flex-shrink:0;
}
.icon--phone{-webkit-mask-image:url('../assets/icons/phone.svg');mask-image:url('../assets/icons/phone.svg');}
.icon--instagram{-webkit-mask-image:url('../assets/icons/instagram-logo.svg');mask-image:url('../assets/icons/instagram-logo.svg');}
.icon--pin{-webkit-mask-image:url('../assets/icons/map-pin.svg');mask-image:url('../assets/icons/map-pin.svg');}
.footer__copy{justify-content:flex-end;}
.footer__copy span{font-size:var(--fs-small);color:var(--ink-300);}

/* ============================================================
   SCROLL REVEAL — base state, animated via GSAP in JS
   ============================================================ */
.reveal-up{opacity:0;transform:translateY(28px);}
.reveal-ready .reveal-up{transition:opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);}

@media (prefers-reduced-motion: reduce){
  .reveal-up{opacity:1 !important;transform:none !important;}
  .hero__video{display:none;}
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1024px){
  .nav__links{display:none;}
  .nav__cta{display:none;}
  .nav__toggle{
    display:flex;flex-direction:column;justify-content:center;gap:5px;
    width:32px;height:32px;
    flex-shrink:0;
  }
  .nav__toggle span{width:100%;height:1px;background:var(--ink-950);}
  .nav__cta--mobile{display:inline-flex;margin-top:.5rem;}

  .intro__grid{grid-template-columns:1fr;gap:2rem;}
  .why__feature{grid-template-columns:1fr;}
  .final__grid{grid-template-columns:1fr;gap:2.5rem;}
  .why__feature-img{order:-1;aspect-ratio:16/10;}
  .why__row{grid-template-columns:1fr;gap:2rem;}
  .process__steps{grid-template-columns:repeat(2,1fr);row-gap:2.5rem;}
  .process__steps::before{display:none;}
  .footer__bottom{grid-template-columns:1fr;gap:1.5rem;text-align:left;}
  .footer__copy{justify-content:flex-start;}
}

@media (max-width:768px){
  .bento{grid-template-columns:1fr;grid-template-rows:none;}
  .bento__card--feature, .bento__card--wide, .bento__card{
    grid-column:1 / -1 !important;
    grid-row:auto !important;
    min-height:380px;
  }
  .hero__content{padding-top:6rem;max-width:100%;}
  .hero__headline{max-width:100%;}
}

/* ============================================================
   BACK TO TOP — fixed pill, fades in once the hero scrolls out
   of view (toggled via IntersectionObserver in main.js, no raw
   scroll listener)
   ============================================================ */
.back-to-top{
  position:fixed;
  right:1.5rem;bottom:1.5rem;
  z-index:90;
  width:48px;height:48px;
  display:flex;align-items:center;justify-content:center;
  background:var(--cobalt-500);
  border:none;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(10,14,34,0.18);
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  cursor:pointer;
  transition:opacity .3s ease, transform .3s ease, background-color .25s ease;
}
.back-to-top.is-visible{opacity:1;transform:translateY(0);pointer-events:auto;}
.back-to-top:hover{background:var(--cobalt-600);}
.back-to-top__arrow{
  display:inline-block;
  width:18px;height:18px;
  background-color:#fff;
  -webkit-mask-image:url('../assets/icons/arrow-right.svg');
  mask-image:url('../assets/icons/arrow-right.svg');
  -webkit-mask-size:contain;mask-size:contain;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  transform:rotate(-90deg);
}
@media (prefers-reduced-motion: reduce){
  .back-to-top{transition:opacity .15s linear;}
}
