@import url("../fonts/fonts.css");

/* ==========================================================================
   Curly Locks — design tokens
   ========================================================================== */
:root {
  /* colour */
  --blush: #ffc3bd;
  --blush-deep: #f6a9a2;
  --ink: #393131;
  --terracotta: #d9736a;
  --olive: #444b3a;
  --cream: #fff8f6;
  --white: #fff;
  --rose: #d98a8a;

  /* type */
  --font-display: Corben, Georgia, serif;
  --font-body: Khula, system-ui, -apple-system, sans-serif;
  --font-script: "Kaushan Script", cursive;

  --step-hero: clamp(2.75rem, 8.2vw, 5rem);
  --step-h2: clamp(1.9rem, 4.6vw, 3.125rem);
  --step-h3: clamp(1.25rem, 2.4vw, 1.5rem);
  --step-body: clamp(1rem, 1.05vw, 1.125rem);

  /* space */
  --gutter: clamp(1.25rem, 4vw, 3.75rem);
  --section-y: clamp(3.5rem, 8vw, 6.25rem);
  --shell: 72.5rem;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Corben ships a decorative "ck" ligature that Chrome applies by default and
     that reads as a rendering glitch in headings ("Package"). None of the three
     faces need ligatures, so switch them off everywhere. */
  font-variant-ligatures: none;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.12; }
figure, blockquote, dl, dd { margin: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
/* height:auto keeps the width/height attributes doing their job — reserving
   the right aspect box — instead of pinning the rendered height. */
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Preloader
   ========================================================================== */
/* The splash and the scroll progress bar are inlined by build.py as critical
   CSS — they must paint before this stylesheet arrives. Only the no-JS
   fallback lives here: without JS nothing dismisses the splash, so it must
   never appear in the first place. */
html:not(.js) #splash, html:not(.js) #progress { display: none; } 50% { opacity: 0.45; } }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--blush);
  padding: clamp(1rem, 2.4vw, 2.5rem) var(--gutter);
  transition: box-shadow 0.3s var(--ease), transform 0.4s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 1px 0 rgba(57, 49, 49, 0.12); }
/* Desktop only: a transform here would become the containing block for the
   position:fixed mobile drawer below. */
@media (min-width: 62.001rem) {
  .site-header.is-hidden { transform: translate3d(0, -100%, 0); }
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3.5rem);
}
.nav-link {
  font-family: var(--font-display);
  font-size: 1.125rem;
  text-transform: uppercase;
  padding: 0.625rem;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 0.35rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* A pair of calls to action: one that books, one that phones. */
.cta-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem);
}
.cta--quiet {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  letter-spacing: 0.16em;
  opacity: 0.72;
  transition: opacity 0.3s var(--ease);
}
.cta--quiet:hover, .cta--quiet:focus-visible { opacity: 1; }
.cta--quiet .arrow { width: clamp(1.25rem, 2vw, 1.75rem); }

/* The booking link is the one nav item with a job to do. */
.nav-link--book::before {
  content: "";
  position: absolute;
  inset: 0.15rem 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  transform: scale(0.96);
  opacity: 0.45;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease);
}
.nav-link--book { padding-inline: 1.1rem; }
.nav-link--book::after { display: none; }
.nav-link--book:hover::before, .nav-link--book:focus-visible::before {
  transform: none;
  opacity: 1;
}

.brand {
  display: block;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 5.2vw, 3.25rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: var(--ink);
  transition: opacity 0.3s var(--ease);
}
.brand:hover { opacity: 0.65; }

.nav-toggle { display: none; }

/* Mobile drawer */
@media (max-width: 62rem) {
  .site-header { padding-block: 1rem; }
  .nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .nav-toggle {
    display: grid;
    gap: 5px;
    width: 2.5rem;
    padding: 0.5rem 0.25rem;
    z-index: 50;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    transition: transform 0.35s var(--ease), opacity 0.2s linear;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* Kept above the drawer so the wordmark never disappears mid-transition. */
  .brand { position: relative; z-index: 50; text-align: left; font-size: clamp(1.5rem, 7vw, 2.25rem); }

  .nav-row {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    background: var(--blush);
    transform: translate3d(0, -100%, 0);
    transition: transform 0.5s var(--ease-out);
    z-index: 45;
  }
  .nav-row.is-open { transform: translate3d(0, 0, 0); }
  .nav-link { font-size: clamp(1.5rem, 6vw, 2rem); padding: 0.75rem; }
  .nav-link--book { padding-inline: 1.75rem; }
}

/* ==========================================================================
   Section furniture
   ========================================================================== */
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--section-y) var(--gutter);
}
.section--flush { padding-inline: 0; }
.section--dark { background: var(--terracotta); color: var(--white); }

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--font-script);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out);
}
.section--dark .section-title::after { background: var(--white); }
.is-inview .section-title::after, .section-title.is-inview::after { transform: scaleX(1); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.cta {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  line-height: 1.2;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.cta .arrow {
  display: block;
  width: clamp(1.75rem, 3vw, 2.5rem);
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.45s var(--ease-out);
}
.cta .arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translate(1px, -50%) rotate(45deg);
}
.cta:hover .arrow, .cta:focus-visible .arrow { transform: translate3d(0.5rem, 0, 0); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(28rem, 74vh, 46rem);
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero h1 {
  max-width: 18ch;
  font-size: var(--step-hero);
  color: #000;
}
.hero-lede {
  margin-block: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(0.95rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.6), rgba(255, 195, 189, 0) 68%);
  filter: blur(6px);
  will-change: transform;
  pointer-events: none;
}
.hero-orb--a { width: 22rem; height: 22rem; top: -6rem; left: -7rem; }
.hero-orb--b { width: 15rem; height: 15rem; bottom: -4rem; right: -4rem; }
.hero > :not(.hero-orb):not(.scroll-cue) { position: relative; z-index: 1; }

.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  left: 50%;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  font-family: var(--font-script);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  z-index: 1;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, var(--ink), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ==========================================================================
   Media frames (video + image share one frame contract → no CLS)
   ========================================================================== */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--blush-deep);
}
.frame > img, .frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame > video { background: var(--blush-deep); }
/* Kill every native chrome affordance on mobile Safari/Chrome */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-panel { display: none !important; -webkit-appearance: none; }
video { pointer-events: none; }

.frame-zoom > img, .frame-zoom > video {
  transition: transform 1.1s var(--ease-out);
  will-change: transform;
}
.frame-zoom:hover > img, .frame-zoom:hover > video { transform: scale(1.05); }

/* ==========================================================================
   Services
   ========================================================================== */
.services { width: 100%; }
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  width: 100%;
}
.service + .service { margin-top: clamp(2.5rem, 6vw, 4rem); }
.service:nth-child(even) .service-media { order: 2; }
.service-media { height: clamp(22rem, 43vw, 39rem); }
.service-body { padding: clamp(1rem, 2vw, 1.875rem) clamp(1.25rem, 5vw, 4.5rem); }
.service-number {
  font-family: var(--font-script);
  font-size: clamp(4.5rem, 12vw, 12.5rem);
  line-height: 1.05;
  color: var(--rose);
}
.service-body h2 { margin-bottom: 1rem; font-size: var(--step-h2); }
.service-body p { margin-bottom: 1.5rem; max-width: 46ch; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 3.125rem);
  margin-bottom: 1.5625rem;
}
.tab {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 1.5625rem 0.625rem;
  background: #000;
  color: var(--white);
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.tab[aria-selected="true"] { background: var(--white); color: #000; }

.gallery-panel { display: none; }
.gallery-panel.is-active { display: block; }
/* Three columns, each holding one tall and one square tile. The order flips in
   the middle column for a staggered look, but because every column carries the
   same pair the bottoms still line up exactly. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}
.gallery-col {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: tile-in 0.6s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.gallery-item--tall img { aspect-ratio: 3 / 4; }
.gallery-item--short img { aspect-ratio: 1 / 1; }
@keyframes tile-in { from { opacity: 0; transform: translate3d(0, 1.5rem, 0); } }
.gallery-caption {
  padding-block: 0.5rem;
  text-align: center;
  background: var(--white);
  color: var(--terracotta);
  font-family: var(--font-script);
  font-size: 0.9rem;
}

/* ==========================================================================
   Price list
   ========================================================================== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 6vw, 6.25rem);
  width: 100%;
  margin-top: 2.5rem;
}
.price-group h2 { margin-bottom: 1rem; font-size: var(--step-h2); }
.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 0.3125rem;
  padding-bottom: 0.2rem;
}
.price-row::before {
  content: "";
  order: 1;
  flex: 1 1 auto;
  height: 1px;
  margin-bottom: 0.45rem;
  background: repeating-linear-gradient(to right, rgba(57, 49, 49, 0.4) 0 2px, transparent 2px 6px);
}
.price-row dt { max-width: 16rem; font-size: 1.125rem; line-height: 1.4; }
.price-row dd { order: 2; margin: 0; font-family: var(--font-display); white-space: nowrap; }
.price-note { margin-bottom: 1rem; font-size: 0.95rem; font-style: italic; }
/* Every group keeps the same two-column rhythm — a full-width row would strand
   its dotted leader across the page and leave a hole beside its neighbour. */
.price-group dl { margin: 0; }

/* ==========================================================================
   About
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  width: 100%;
}
.about-body h2 { margin-bottom: 0.75rem; font-size: var(--step-h2); }
.about-body h3 {
  margin-bottom: 1rem;
  font-family: var(--font-script);
  font-size: var(--step-h3);
}
.about-media { height: clamp(22rem, 43vw, 39rem); }
.about-body .cta { margin-top: 1.5rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials { width: 100%; overflow: hidden; }
.testimonial-track {
  display: flex;
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}
.testimonial {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 20rem 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-inline: var(--gutter);
}
.testimonial-person {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  text-align: center;
}
.testimonial-avatar {
  width: 8.75rem;
  height: 8.75rem;
  border-radius: 50%;
  overflow: hidden;
}
/* No invented face on a real person's review — a monogram instead. */
.testimonial-monogram {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
}
.testimonial-person h3 { font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stars { color: var(--white); letter-spacing: 0.2em; font-size: 1rem; line-height: 1; }
.testimonial-quote { position: relative; padding-left: clamp(2rem, 5vw, 4rem); }
.testimonial-quote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -1.5rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 1;
  opacity: 0.35;
}
.testimonial-quote p { font-size: clamp(1rem, 1.4vw, 1.15rem); }
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.slider-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.slider-btn:hover { background: var(--white); color: var(--terracotta); }
.slider-dots { display: flex; gap: 0.6rem; }
.slider-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.slider-dots button[aria-current="true"] { background: var(--white); transform: scale(1.5); }

/* ==========================================================================
   Products
   ========================================================================== */
.products { position: relative; width: 100%; overflow: hidden; }
.product-track {
  display: flex;
  gap: 1.25rem;
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}
.product-card {
  position: relative;
  flex: 0 0 calc((100% - 2.5rem) / 3);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.product-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem;
  text-align: center;
  color: var(--white);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.products .slider-controls { color: var(--ink); }
.products .slider-btn:hover { background: var(--ink); color: var(--blush); }
.products .slider-dots button { background: rgba(57, 49, 49, 0.3); }
.products .slider-dots button[aria-current="true"] { background: var(--ink); }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.25rem;
  width: 100%;
}
.blog-card { display: grid; gap: 0.75rem; }
.blog-media { aspect-ratio: 3 / 2; }
.blog-tag {
  justify-self: start;
  padding: 0.35rem 0.5rem;
  background: var(--white);
  font-family: var(--font-script);
  font-size: 0.85rem;
  line-height: 1.2;
}
.blog-card h3 { font-size: 1.1rem; text-transform: uppercase; line-height: 1.4; }
.blog-card .cta { font-size: 0.8rem; letter-spacing: 0.2em; }

/* ==========================================================================
   Closing CTA band
   ========================================================================== */
.cta-band {
  position: relative;
  isolation: isolate;
  text-align: center;
  overflow: hidden;
  color: var(--white);
}
.cta-band > .frame {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--terracotta);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(57, 49, 49, 0.28), rgba(57, 49, 49, 0.28)),
    rgba(217, 115, 106, 0.78);
}
.cta-band {
  justify-content: center;
  min-height: clamp(20rem, 55vh, 32rem);
}
.cta-band h2 { max-width: 20ch; font-size: var(--step-h2); margin-bottom: 1.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: var(--section-y) var(--gutter);
}
.footer-brand {
  display: block;
  margin-bottom: 2.5rem;
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: 0.06em;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.footer-cols h3 { font-family: var(--font-script); font-size: 1.25rem; margin-bottom: 0.75rem; }
.footer-cols p, .footer-cols a, .footer-cols li { font-size: 0.95rem; }
.footer-cols a { transition: opacity 0.25s var(--ease); }
.footer-cols a:hover { opacity: 0.65; }
.hours-list li { display: flex; justify-content: space-between; gap: 1rem; }
.contact-list { display: grid; gap: 0.35rem; }

.newsletter { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 9rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.95rem;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, 0.55); }
.newsletter button {
  padding: 0.65rem 1.1rem;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease);
}
.newsletter button:hover { background: var(--blush); color: var(--ink); }
.form-note { margin-top: 0.6rem; font-size: 0.85rem; min-height: 1.2em; }

.socials { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.socials a {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.socials a:hover { background: var(--white); color: var(--ink); opacity: 1; }
.socials svg { width: 1rem; height: 1rem; fill: currentColor; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.to-top {
  position: fixed;
  right: 5%;
  bottom: 7%;
  z-index: 30;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--blush);
  opacity: 0;
  transform: translate3d(0, 1rem, 0);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ==========================================================================
   Scroll reveals
   ========================================================================== */
/* Every hidden start state is gated on .js so a script failure can never
   leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-inview { opacity: 1; transform: none; }

.split-line { display: block; overflow: hidden; }
.js .split-line > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  transition: transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js.is-loaded .split-line > span { transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 62rem) {
  .service, .about { grid-template-columns: 1fr; }
  .service:nth-child(even) .service-media { order: 0; }
  .service-media, .about-media { height: clamp(18rem, 56vw, 25rem); }
  /* Below three columns the pairing has nothing to balance against, so the
     wrappers dissolve and every tile shares one ratio again. */
  .gallery-col { display: contents; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--tall img, .gallery-item--short img { aspect-ratio: 3 / 4; }
  .price-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { flex: 0 0 calc((100% - 1.25rem) / 2); }
  .testimonial { grid-template-columns: 1fr; text-align: center; }
  .testimonial-quote { padding-left: 0; }
  .testimonial-quote::before { position: static; display: block; font-size: 3rem; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 40rem) {
  .gallery-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .product-card { flex: 0 0 100%; }
  .footer-cols { grid-template-columns: 1fr; }
  .cta { letter-spacing: 0.18em; }
  .service-media, .about-media { height: min(125vw, 30rem); }
}

@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;
  }
  .reveal, .split-line > span { opacity: 1; transform: none; }
  .section-title::after { transform: scaleX(1); }
}

/* JS adds .is-loaded once fonts and the first paint are ready; the splash
   uses that class rather than sitting on top of the page forever. */
html:not(.js) .section-title::after { transform: scaleX(1); }
