/* ==========================================================================
   Shared components (design.md §7, §5.4): buttons, header, top strip, menu,
   theme toggle, butterfly mark, tiles, carousel, compare slider, curtain,
   footer, sticky bar and WhatsApp bubble.
   ========================================================================== */

.icon { width: 1.25em; height: 1.25em; flex: none; }
.center { text-align: center; }

/* ---- buttons (§6 Button: fill sweeps left → right, arrow shifts 4px) ---- */
.btn {
  --btn-fill: var(--c-brand);
  --btn-ink: var(--c-on-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--btn-fill);
  border-radius: var(--radius);
  background-color: transparent; /* a <button>.btn must not keep the browser's grey face (Charcoal AA) */
  background-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  color: var(--btn-fill);
  font-family: var(--ff-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.3;
  text-align: center;
  transition: background-size .4s var(--ease-out), color .4s var(--ease-out), border-color .4s;
}
.btn:hover, .btn:focus-visible { background-size: 100% 100%; color: var(--btn-ink); }
.btn .btn-arrow { width: 1.3em; transition: transform .4s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn--solid { background-size: 100% 100%; color: var(--btn-ink); }
.btn--solid:hover { --btn-fill: var(--c-brand-hover); border-color: var(--c-brand-hover); }
.btn--small { min-height: var(--tap); padding: 10px 18px; font-size: .74rem; }

/* solid button that sits on a photo: ivory fill, dark ink in both themes */
.btn--on-photo { --btn-fill: #FAF7F2; --btn-ink: #2F2620; }
.btn--on-photo:hover { --btn-fill: #F3EDE6; border-color: #F3EDE6; }
.btn--frost {
  --btn-fill: #FAF7F2; --btn-ink: #2F2620;
  border-color: rgba(250, 247, 242, .75);
  background-color: rgba(250, 247, 242, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--light-outline { --btn-fill: var(--c-on-dark); --btn-ink: var(--c-espresso); }

.btn-row { display: flex; flex-direction: column; gap: 12px; margin-top: var(--stack-md); }
.btn-row > .btn { width: 100%; }
@media (min-width: 30em) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .btn-row > .btn { width: auto; }
  .btn-row--center { justify-content: center; }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-brand);
}
.link-arrow .btn-arrow { width: 1.3em; height: 1.3em; transition: transform .4s var(--ease-out); }
.link-arrow:hover .btn-arrow { transform: translateX(4px); }
.link-light { color: var(--c-on-dark); }
.link-light:hover { color: #fff; }

/* ---- butterfly mark ----------------------------------------------------- */
.mark { display: block; width: 44px; margin: var(--stack-md) auto; }
.mark img { width: 100%; height: auto; }
.mark-img--light { display: none; }
[data-theme="charcoal"] .mark-img--brown { display: none; }
[data-theme="charcoal"] .mark-img--light { display: block; }
.band-espresso .mark-img--brown { display: none; }
.band-espresso .mark-img--light { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .mark--signature.is-visible img { animation: breathe 6s ease-in-out infinite; }
}
@keyframes breathe { 50% { transform: scaleX(.96); } }

/* ---- logo (brown ↔ ivory swap) ------------------------------------------ */
.logo { width: 100%; height: auto; }
.logo--light { display: none; }
[data-theme="charcoal"] .logo--brown { display: none; }
[data-theme="charcoal"] .logo--light { display: block; }

/* ---- top contact strip (xl+) -------------------------------------------- */
.topbar { display: none; }
@media (min-width: 80em) {
  :root { --topbar-h: 32px; }
  .topbar {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 61;
    height: var(--topbar-h);
    font-size: .75rem;
    letter-spacing: .08em;
    color: #F3EDE6;
    background: rgba(30, 22, 17, .28);
  }
  .topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .topbar-links { display: flex; gap: 28px; list-style: none; }
  .topbar a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; line-height: var(--topbar-h); padding-block: 6px; margin-block: -6px; } /* 44px hit area */
  .topbar a:hover { text-decoration: underline; }
  .topbar .icon { width: 14px; height: 14px; }
  .page-solid .topbar, .topbar.is-solid { background: var(--c-espresso); color: var(--c-on-dark); }
}

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  z-index: 60;
  padding-top: env(safe-area-inset-top);
  color: var(--c-ink);
  background: var(--c-header-solid);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  transition: background-color .4s, color .4s, border-color .4s, top .4s, transform .4s;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  gap: 12px;
  transition: height .4s;
}
.site-header.is-scrolled .header-inner { height: calc(var(--header-h) * .8); }

/* Transparent with the ivory logo while over the hero */
.site-header[data-over-hero]:not(.is-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  color: #FAF7F2;
}
.site-header[data-over-hero]:not(.is-scrolled) .logo--brown { display: none; }
.site-header[data-over-hero]:not(.is-scrolled) .logo--light { display: block; }
.site-header.is-scrolled { top: 0; }

.brand {
  grid-column: 2;
  display: block;
  width: clamp(112px, 34vw, 132px);
  min-height: var(--tap);
  align-content: center;
}
@media (min-width: 30em) { .brand { width: 150px; } }
@media (min-width: 48em) { .brand { width: 170px; } }
@media (min-width: 64em) { .brand { width: 190px; } }
@media (min-width: 80em) { .brand { width: 220px; } }
.site-header.is-scrolled .brand { width: clamp(104px, 30vw, 132px); }
@media (min-width: 64em) { .site-header.is-scrolled .brand { width: 170px; } }

.header-side { display: flex; align-items: center; gap: clamp(8px, 1.4vw, 24px); min-width: 0; }
.header-side--left { grid-column: 1; justify-content: flex-start; }
.header-side--right { grid-column: 3; justify-content: flex-end; }

.nav { display: none; }
.nav-list { display: flex; gap: clamp(14px, 1.7vw, 34px); list-style: none; }
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  min-width: var(--tap);
  justify-content: center;
  color: inherit;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: .2em; bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav-list a:hover::after, .nav-list a[aria-current]::after { transform: scaleX(1); }

.menu-toggle, .menu-close, .header-call {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  border-radius: 50%;
  flex: none;
}
.menu-toggle .icon, .menu-close .icon { width: 28px; height: 28px; }
.header-call { display: none; }
.header-call .icon { width: 20px; height: 20px; }

@media (min-width: 64em) {
  .nav { display: block; }
  .menu-toggle { display: none; }
  .header-call { display: inline-grid; }
  .header-side--left { order: 0; }
}
@media (min-width: 80em) { .header-call { display: none; } } /* the top strip carries the phone */

/* Landscape phones: compact header (§5.6) */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --header-h: 56px; }
  .brand { width: 112px; }
}

/* ---- theme toggle (§3b) ------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: none;
  color: inherit;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.theme-toggle-track {
  position: relative;
  width: 46px; height: 26px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: .9;
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: currentColor;
  transition: transform .4s var(--ease-out);
}
.theme-toggle-thumb .icon {
  position: absolute; inset: 3px;
  width: 14px; height: 14px;
  color: var(--c-ivory);
}
.site-header[data-over-hero]:not(.is-scrolled) .theme-toggle-thumb .icon { color: #2F2620; }
.theme-toggle .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .theme-toggle-thumb { transform: translateX(20px); }
.theme-toggle[aria-pressed="true"] .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: block; }
.theme-toggle--bar { display: none; }
.theme-toggle--bar .theme-toggle-label { display: none; }
@media (min-width: 48em) { .theme-toggle--bar { display: inline-flex; } }
@media (min-width: 100em) { .theme-toggle--bar .theme-toggle-label { display: inline; } }

/* ---- mobile menu (full-screen overlay, focus trap, ESC) ----------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--c-ivory);
  color: var(--c-ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.menu[hidden] { display: none; }
.menu-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  width: var(--container);
  margin-inline: auto;
  padding-bottom: 24px;
}
.menu-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}
.menu-top .brand { width: clamp(112px, 34vw, 132px); }
.menu-close { grid-column: 3; justify-self: end; }
.menu-body { flex: 1; display: grid; align-content: center; gap: var(--stack-lg); padding-block: var(--stack-md); }
.menu-nav ul { list-style: none; }
.menu-nav a {
  display: block;
  padding: 6px 0;
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--c-ink);
  text-decoration: none;
}
.menu-nav a[aria-current] { font-style: italic; color: var(--c-accent); }
.menu-aside { display: none; }
.menu-foot { display: grid; gap: 18px; border-top: 1px solid var(--c-line); padding-top: 20px; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.menu-actions .btn { flex: 1 1 140px; }
.social { display: flex; gap: 8px; list-style: none; }
.social a { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); color: var(--c-brand); border: 1px solid var(--c-line); border-radius: 50%; }
.social .icon { width: 20px; height: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .menu.is-open .menu-nav li { animation: menu-in .6s var(--ease-out) both; animation-delay: calc(80ms + var(--i) * 60ms); }
  .menu.is-open { animation: fade-in .3s ease both; }
}
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes fade-in { from { opacity: 0; } }

@media (min-width: 48em) {
  .menu-body { grid-template-columns: 1.1fr .9fr; align-items: center; }
  .menu-aside { display: block; }
  .menu-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
  .menu-note { margin-top: 12px; font-size: var(--fs-small); color: var(--c-ink-soft); letter-spacing: .08em; }
  .menu-foot { grid-template-columns: auto 1fr auto; align-items: center; }
  .menu-actions { justify-content: center; }
  .menu-actions .btn { flex: 0 1 auto; }
  .theme-toggle--menu { display: none; } /* the bar has its own toggle from md */
}
@media (orientation: landscape) and (max-height: 500px) {
  .menu-nav ul { columns: 2; column-gap: 32px; }
  .menu-nav a { font-size: 1.5rem; padding: 2px 0; }
  .menu-body { padding-block: 8px; }
}
html.menu-open, html.menu-open body { overflow: hidden; }

/* ---- service tiles (2:3, scroll-snap row on phones) --------------------- */
.tiles-wrap { width: var(--container); margin-inline: auto; }
.tiles {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--grid-gap)) / 1.15);
  gap: var(--grid-gap);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.tiles::-webkit-scrollbar { display: none; }
.tile { scroll-snap-align: start; }
@media (min-width: 30em) { .tiles { grid-auto-columns: calc((100% - var(--grid-gap)) / 1.6); } }
@media (min-width: 48em) {
  .tiles { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; }
  .tiles-dots { display: none !important; }
}
@media (min-width: 64em) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.tile-link { container-type: inline-size; display: block; height: 100%; color: inherit; text-decoration: none; background: var(--c-ivory); border-radius: var(--radius); overflow: hidden; transition: background-color var(--dur-theme); }
.tile-media { display: block; overflow: hidden; aspect-ratio: 2 / 3; background: var(--c-greige); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.tile-body { display: grid; gap: 6px; padding: 18px 18px 20px; }
.tile-eyebrow { font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--c-accent-deep); }
.tile-name { font-family: var(--ff-display); font-size: var(--fs-h3); line-height: 1.15; }
.tile-line { font-size: .95rem; color: var(--c-ink-soft); line-height: 1.6; }
.tile-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--c-brand); }
.tile-more .btn-arrow { width: 1.2em; height: 1.2em; transition: transform .4s var(--ease-out); }
@container (min-width: 300px) { .tile-body { padding: 22px 24px 26px; } }
@media (hover: hover) and (pointer: fine) {
  .tile-link:hover .tile-media img { transform: scale(1.05); }
  .tile-link:hover .tile-more .btn-arrow { transform: translateX(4px); }
}
.tiles-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.tiles-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ink-soft); opacity: .3; transition: opacity .3s, transform .3s; }
.tiles-dots span.is-active { opacity: .9; transform: scale(1.3); }

/* ---- carousel (testimonials) -------------------------------------------- */
.carousel-shell { position: relative; }
.quotes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.quotes::-webkit-scrollbar { display: none; }
.quote { scroll-snap-align: center; padding: 4px clamp(4px, 4vw, 64px); text-align: center; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: var(--stack-md); }
.carousel-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  color: inherit;
  opacity: .85;
  transition: opacity .3s, background-color .3s;
}
.carousel-btn:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.carousel-btn .icon { width: 22px; height: 22px; }
.carousel-status { min-width: 4.5em; text-align: center; font-size: var(--fs-small); letter-spacing: .14em; }

/* ---- compare / wipe slider (7b-6) ---------------------------------------- */
.compare {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--c-greige);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}
@media (min-width: 48em) { .compare { aspect-ratio: 16 / 10; } }
.compare-img, .compare-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare-img img { object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.compare-img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-label {
  position: absolute;
  bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 22, 17, .55);
  color: #FAF7F2;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity .3s;
}
.compare-label--before { left: 16px; }
.compare-label--after { right: 16px; }
.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #FAF7F2;
  box-shadow: 0 0 12px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.compare-grip {
  position: absolute;
  top: 50%; left: 50%;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: #FAF7F2;
  color: #2F2620;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.compare-grip .icon { width: 18px; height: 18px; margin: 0 -3px; }
@media (min-width: 64em) { .compare-grip { width: 44px; height: 44px; margin: -22px 0 0 -22px; } }
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none; /* pointer handled in compare.js; keyboard + AT use the input */
}
.compare:has(.compare-range:focus-visible) .compare-grip { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.compare-note { margin-top: 10px; font-size: var(--fs-small); color: var(--c-ink-soft); }

/* ---- curtain reveal (7b-2), used by gallery pages ----------------------- */
.curtain { position: relative; }
.curtain-panel { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .curtain-panel {
    display: block;
    position: absolute;
    top: 0; bottom: 0;
    width: 50.5%;
    z-index: 3;
    background: var(--c-linen);
    transition: transform 1.1s var(--ease-curtain);
    pointer-events: none;
  }
  .js .curtain-panel--l { left: 0; transform-origin: left; }
  .js .curtain-panel--r { right: 0; transform-origin: right; }
  .js .curtain.is-open .curtain-panel { transform: scaleX(0); }
}

/* ---- footer ------------------------------------------------------------- */
.site-footer { padding: var(--section-y) 0 calc(28px + var(--bar-h) + env(safe-area-inset-bottom)); font-size: .95rem; }
@media (min-width: 64em) { .site-footer { padding-bottom: 96px; } } /* the corner stays clear for the back-to-top button */
.footer-grid { display: grid; gap: 4px; }
.footer-brand { margin-bottom: var(--stack-md); }
.brand--footer { width: 180px; }
.footer-tagline { margin-top: 14px; color: var(--c-on-dark-soft); font-size: .9rem; letter-spacing: .04em; }
.footer-col { border-top: 1px solid rgba(243, 237, 230, .14); }
.footer-col h2 { font-family: var(--ff-body); font-size: .78rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--c-on-dark); }
/* accordion (phones): a plain <h2> + panel; main.js puts a <button aria-expanded aria-controls> in the
   heading on phones only. With JS, phone panels start hidden (no open-then-collapse shift) until marked .is-open */
.footer-col[data-footer-acc] h2 { display: flex; align-items: center; min-height: 56px; }
.footer-acc-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit; font-size: inherit; letter-spacing: inherit; text-transform: inherit; text-align: start;
  color: inherit;
}
.acc-icon { width: 20px; height: 20px; transition: transform .3s; }
.footer-acc-btn[aria-expanded="true"] .acc-icon { transform: rotate(180deg); }
@media (max-width: 47.99em) {
  .js .footer-col[data-footer-acc]:not(.is-open) > ul { display: none; }
}
.footer-col--contact h2 { padding: 18px 0 6px; }
.footer-col ul { list-style: none; padding-bottom: 18px; }
.footer-col a { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); min-width: var(--tap); color: var(--c-on-dark-soft); text-decoration: none; }
.footer-col a:hover { color: var(--c-on-dark); text-decoration: underline; }
.footer-contact .icon { width: 18px; height: 18px; color: var(--c-on-dark); }
.footer-contact a { overflow-wrap: anywhere; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: var(--stack-lg);
  padding-top: 20px;
  border-top: 1px solid rgba(243, 237, 230, .14);
  font-size: .82rem;
  color: var(--c-on-dark-soft);
}
.footer-bottom a { color: inherit; display: inline-flex; align-items: center; min-height: var(--tap); }
@media (min-width: 48em) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 0 var(--stack-lg); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col { border-top: 0; }
  .footer-col[data-footer-acc] h2 { min-height: var(--tap); padding: 12px 0 0; }
  .footer-col--contact h2 { padding-top: 18px; }
}
@media (min-width: 64em) {
  .footer-grid { grid-template-columns: 1.3fr repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
}

/* ---- conversion layer: sticky bar (<lg) / WhatsApp bubble (lg+) --------- */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--c-header-solid);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-line);
  transition: transform .4s var(--ease-out), background-color var(--dur-theme), visibility 0s;
}
.sticky-bar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  color: var(--c-ink);
  font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
}
.sticky-bar a + a { border-left: 1px solid var(--c-line); }
.sticky-bar .icon { width: 20px; height: 20px; color: var(--c-brand); }
.sticky-bar .icon-wa { color: var(--c-whatsapp-ink); }
/* hidden links leave the tab order once the slide-out has finished */
.sticky-bar.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform .4s var(--ease-out), background-color var(--dur-theme), visibility 0s .4s; }
@media (max-width: 23em) { .sticky-bar a { flex-direction: column; gap: 2px; font-size: .62rem; letter-spacing: .1em; } }

/* Landscape phones: compact right-side pill (§5.6) */
@media (orientation: landscape) and (max-height: 500px) {
  .sticky-bar {
    left: auto; right: max(12px, env(safe-area-inset-right)); bottom: 12px;
    grid-template-columns: repeat(3, auto);
    height: 44px; padding: 0 6px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    box-shadow: 0 6px 20px var(--c-shadow);
  }
  .sticky-bar a { padding: 0 12px; }
  .sticky-bar.is-hidden { transform: translateY(160%); visibility: hidden; }
  .site-footer { padding-bottom: 72px; }
}

.wa-bubble { display: none; }
@media (min-width: 64em) {
  .sticky-bar { display: none; }
  .wa-bubble {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 50;
    display: flex; align-items: center;
    height: 52px;
    min-width: 52px;
    padding: 0 14px;
    border-radius: 999px;
    background: #FAF7F2;
    color: #128C4B;
    box-shadow: 0 8px 28px rgba(47, 38, 32, .22);
    text-decoration: none;
    transition: transform .4s var(--ease-out), opacity .4s;
  }
  .wa-bubble .icon { width: 24px; height: 24px; }
  .wa-bubble-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #2F2620;
    font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
    transition: max-width .4s var(--ease-out), margin .4s var(--ease-out);
  }
  .wa-bubble:hover .wa-bubble-label, .wa-bubble:focus-visible .wa-bubble-label { max-width: 160px; margin-left: 10px; }
  .wa-bubble.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; visibility: hidden; transition: transform .4s, opacity .4s, visibility 0s .4s; }
}

/* ---- back to top: above the sticky bar (<lg) / the WhatsApp bubble (lg+) ---
   .is-low = the bar or bubble below it is hidden, so it drops into the corner. */
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 49;
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap);
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: var(--c-header-solid);
  color: var(--c-brand);
  box-shadow: 0 6px 20px var(--c-shadow);
  cursor: pointer;
  transition: bottom .4s var(--ease-out), opacity .4s, transform .4s var(--ease-out), visibility 0s;
}
.to-top .icon { width: 20px; height: 20px; transition: transform .3s var(--ease-out); }
@media (hover: hover) { .to-top:hover { border-color: currentColor; } .to-top:hover .icon { transform: translateY(-2px); } }
.to-top.is-low { bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); }
.to-top.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; transition: bottom .4s var(--ease-out), opacity .4s, transform .4s, visibility 0s .4s; }
/* landscape phones: above the compact right-side pill */
@media (orientation: landscape) and (max-height: 500px) {
  .to-top { right: max(16px, env(safe-area-inset-right)); bottom: 68px; }
  .to-top.is-low { bottom: 12px; }
}
@media (min-width: 64em) {
  .to-top { right: max(28px, calc(env(safe-area-inset-right) + 4px)); bottom: max(88px, calc(env(safe-area-inset-bottom) + 64px)); }
  .to-top.is-low { bottom: max(28px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.is-hidden { transition: none; } }

/* ==========================================================================
   Shared page sections (Home and the inner pages): compare layout, First Year
   timeline, safety promise, CTA band.
   ========================================================================== */

/* ---- Compare section (7b-6) ---------------------------------------------- */
.compare-layout { display: grid; gap: var(--stack-lg); }
@media (min-width: 48em) { .compare-wrap { max-width: 720px; width: 100%; margin-inline: auto; } }
@media (min-width: 64em) {
  .compare-layout { grid-template-columns: 7fr 5fr; align-items: center; }
  .compare-wrap { max-width: none; }
}

/* ---- First Year timeline (7b-7) ------------------------------------------ */
.timeline-section {
  background: var(--mood);
  transition: background-color 1.2s ease;
}
.timeline-wrap { position: relative; width: var(--container); margin-inline: auto; }
.timeline { list-style: none; display: grid; gap: var(--stack-lg); position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--c-line); }
.timeline-progress { position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; z-index: 1; }
.timeline-progress span { display: block; width: 100%; height: calc(var(--progress, 0) * 100%); background: var(--c-accent); transition: height .3s linear; }
.stage { position: relative; display: grid; gap: 18px; align-content: start; }
.stage-dot {
  position: absolute; left: -28px; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  background: var(--c-ivory);
  transition: background-color .4s, transform .4s;
}
.stage.is-active .stage-dot { background: var(--c-accent); transform: scale(1.2); }
.stage-media { overflow: hidden; border-radius: var(--radius); background: var(--c-greige); aspect-ratio: 4 / 5; }
.stage-media img { width: 100%; height: 100%; object-fit: cover; }
.stage-step { font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--c-accent-deep); }
.stage-name { margin: 4px 0 6px; font-size: var(--fs-h3); }
.stage-when { font-size: .95rem; color: var(--c-ink); }
.stage-when span { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-ink-soft); }
.stage-copy { margin: 10px 0 4px; color: var(--c-ink); }
.stage-when span { color: var(--c-ink); opacity: .85; }
/* inactive chapters dim only their photo, so text keeps full contrast */
.js .stage-media { opacity: .6; transition: opacity .6s ease; }
.js .stage.is-active .stage-media { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .stage-media { opacity: 1; } }

@media (min-width: 48em) {
  .stage { grid-template-columns: minmax(200px, 2fr) 3fr; align-items: center; gap: var(--stack-md); }
}
@media (min-width: 64em) {
  .timeline-wrap { width: auto; margin-inline: 0; }
  .timeline {
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 34vw);
    gap: var(--stack-md);
    padding: 40px max(var(--gutter), calc((100vw - 1320px) / 2)) 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--gutter), calc((100vw - 1320px) / 2));
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--c-accent) transparent;
  }
  .timeline::before { left: 0; right: 0; top: 46px; bottom: auto; width: auto; height: 1px; }
  .timeline-progress { left: 0; right: 0; top: 46px; bottom: auto; width: auto; height: 1px; }
  .timeline-progress span { height: 100%; width: calc(var(--progress, 0) * 100%); transition: width .3s linear; }
  .stage { grid-template-columns: 1fr; scroll-snap-align: start; padding-top: 36px; align-items: start; }
  .stage-dot { left: 0; top: 0; }
}
@media (min-width: 80em) {
  .timeline-wrap { width: var(--container); margin-inline: auto; }
  .timeline { grid-template-columns: repeat(4, 1fr); grid-auto-flow: row; grid-auto-columns: auto; padding-inline: 0; overflow: visible; }
}

/* ---- Safety & comfort promise --------------------------------------------- */
.promise-layout { display: grid; gap: var(--stack-lg); }
.promise-card { list-style: none; display: grid; gap: 4px; padding: clamp(20px, 4vw, 48px); border-radius: var(--radius); }
.promise-item { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--c-line); }
.promise-item:last-child { border-bottom: 0; }
.promise-icon { width: 30px; height: 30px; color: var(--c-accent-deep); margin-top: 2px; }
.promise-item h3 { font-size: 1.35rem; margin-bottom: 4px; }
.promise-item p { color: var(--c-ink-soft); font-size: .98rem; }
@media (min-width: 64em) { .promise-layout { grid-template-columns: 5fr 7fr; align-items: center; } }

/* ---- CTA band (blush) ------------------------------------------------------ */
.cta-band .lead { margin-inline: auto; color: var(--c-ink); opacity: .85; }
.cta-band h2 em { color: var(--c-accent-deep); }
[data-theme="charcoal"] .cta-band h2 em { color: var(--c-accent); }
