/* Helai design layer: richer hero, motion, before/after sliders, marquee, numbers. Loads after site.css. */
:root { --ease: cubic-bezier(.22,1,.36,1); --shadow-lg: 0 30px 60px -28px rgba(26,20,16,.45); }

/* Buttons: a soft fill sweep and lift */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--dark); transform: translateY(101%); transition: transform .45s var(--ease); }
.btn:not(.btn-outline):hover { color: #fff; border-color: var(--dark); transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(174,67,4,.7); }
.btn:hover::before { transform: none; }
.btn-outline::before { background: var(--accent); }
.btn-outline:hover { color: #fff !important; border-color: var(--accent) !important; transform: translateY(-2px); }

/* Header: frosted once you scroll */
.site-header.is-past-hero, .site-header:not([data-hero-overlay]) { backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.site-header.is-past-hero { background: rgba(252,249,244,.9) !important; box-shadow: 0 10px 30px -22px rgba(26,20,16,.5); }

/* Section heads: a thin orange rule under the eyebrow */
.section-head .eyebrow { display: inline-flex; align-items: center; gap: .7rem; }
.section-head .eyebrow::before, .section-head .eyebrow::after { content: ''; width: 2rem; height: 1px; background: currentColor; opacity: .6; }

/* ---------- Home hero ---------- */
@media (min-width: 900px) {
  .home-hero { overflow: hidden; }
  .home-hero .hero-grid { min-height: clamp(36rem, 82svh, 46rem); padding-block: calc(3.5rem + var(--header-overlay-height)) 3.5rem; }
  .home-hero .hero-picture img { animation: helai-zoom 18s var(--ease) both; transform-origin: 60% 30%; }
  .home-hero .hero-picture::after { background: linear-gradient(90deg, #faf7f3f2 0%, #faf7f3c4 24%, #faf7f300 50%, #faf7f300 78%, #faf7f34d 100%) !important; }
  .home-hero .hero-copy h1 { font-size: clamp(3.2rem, 4.8vw, 5rem); letter-spacing: -.045em; }
  .home-hero .hero-copy > p:not(.eyebrow) { font-size: 1.2rem; max-width: 27rem; }
  .home-hero .hero-product { box-shadow: var(--shadow-lg); background: rgba(255,255,255,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: helai-float 7s ease-in-out infinite; }
}
.hero-rating { display: inline-flex; align-items: center; gap: .75rem; margin-top: 1.8rem; padding: .6rem 1rem .6rem .6rem; background: rgba(255,255,255,.78); border: 1px solid #fff; box-shadow: 0 16px 32px -22px rgba(26,20,16,.5); font-size: .95rem; color: var(--ink); text-decoration: none; }
.hero-rating:hover { color: var(--ink); }
.hero-rating .faces { display: flex; }
.hero-rating .faces img { width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -.55rem; }
.hero-rating .faces img:first-child { margin-left: 0; }
.hero-rating b { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.hero-rating .stars { color: var(--accent); letter-spacing: .1em; font-size: .85rem; }
.hero-copy > * { animation: helai-rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; } .hero-copy > :nth-child(5) { animation-delay: .32s; }
.home-hero .hero-product { animation-name: helai-rise, helai-float; animation-duration: 1s, 7s; animation-delay: .4s, 1.4s; animation-iteration-count: 1, infinite; animation-timing-function: var(--ease), ease-in-out; animation-fill-mode: both, none; }
@keyframes helai-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes helai-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes helai-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Marquee ---------- */
.helai-marquee { overflow: hidden; background: var(--dark); color: #fff; border-block: 1px solid #2f2b28; padding-block: 1.35rem; }
.helai-marquee-track { display: flex; width: max-content; animation: helai-scroll 38s linear infinite; }
.helai-marquee:hover .helai-marquee-track { animation-play-state: paused; }
.helai-marquee-track span { display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.helai-marquee-track span i { width: .6rem; height: .6rem; background: var(--accent); transform: rotate(45deg); flex: none; }
.helai-marquee-track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px #d9d2ca; }
@keyframes helai-scroll { to { transform: translateX(-50%); } }

/* ---------- Numbers ---------- */
.helai-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.helai-numbers div { padding: 1.6rem 1rem 0; text-align: center; }
.helai-numbers strong { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.helai-numbers strong sup { font-size: .45em; color: var(--accent); vertical-align: top; margin-left: .1em; }
.helai-numbers span { display: block; margin-top: .55rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 760px) { .helai-numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } .helai-numbers div + div { border-left: 1px solid var(--line); } }

/* ---------- Image hovers ---------- */
.home-service-card, .stylist-card > .photo, .product-card .photo, .helai-tip-photo, .visit-step-photo, .about-offer, .tools-photo { overflow: hidden; }
.home-service-card img, .stylist-card img, .product-card img, .helai-tip-photo img, .visit-step-photo img, .about-offer img, .tools-photo img { transition: transform 1.1s var(--ease); }
.home-service-card:hover img, .stylist-card:hover img, .product-card:hover img, .helai-tip-card:hover img, .visit-steps li:hover img, .about-offer:hover img { transform: scale(1.06); }
.home-service-copy h3 { position: relative; display: inline-block; }
.home-service-copy h3::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.2rem; height: 2px; background: var(--accent-light); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.home-service-card:hover .home-service-copy h3::after { transform: none; }
.home-service-card .home-service-copy .icon { transition: transform .4s var(--ease); }
.home-service-card:hover .home-service-copy .icon { transform: translateX(4px); }
.product-card, .stylist-card, .helai-tip-card, .review-card, .visit-steps li { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.product-card:hover, .helai-tip-card:hover, .review-card:hover, .visit-steps li:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -30px rgba(26,20,16,.45); }
.stylist-card:hover { transform: translateY(-6px); box-shadow: 0 26px 46px -24px rgba(0,0,0,.8); }

/* ---------- Before and after slider ---------- */
.ba { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: #ddd; user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.35); pointer-events: none; }
.ba .ba-knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 2.9rem; height: 2.9rem; margin: -1.45rem 0 0 -1.45rem; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.3); pointer-events: none; transition: transform .25s var(--ease); }
.ba:hover .ba-knob, .ba:focus-within .ba-knob { transform: scale(1.1); }
.ba .ba-knob svg { width: 1.4rem; height: 1.4rem; }
.ba-tag { position: absolute; top: .7rem; padding: .25rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(20,18,16,.72); pointer-events: none; }
.ba-tag.b { left: .7rem; } .ba-tag.a { right: .7rem; background: var(--accent); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba input:focus-visible + .ba-line { box-shadow: 0 0 0 3px var(--accent-light); }
.result-photos.is-slider { display: block !important; }
.result-photos.is-slider > figure { display: none; }
.ba-hint { margin: .6rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }

/* ---------- Final call to action with photo ---------- */
#final-cta { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(5rem, 11vw, 9rem) !important; }
#final-cta::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('images/home-empty-helai-salon-interior.webp') center 40% / cover no-repeat; transform: scale(1.05); }
#final-cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,17,15,.78), rgba(20,17,15,.88)); }
#final-cta h2 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
#final-cta p { font-size: 1.15rem; color: #eee6de; }

/* ---------- Scroll reveal (only when JS runs) ---------- */
.helai-js [data-rv] { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.helai-js [data-rv].in { opacity: 1; transform: none; }
.helai-js [data-rv].in:hover { transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  .home-hero .hero-picture img, .hero-copy > *, .home-hero .hero-product, .helai-marquee-track { animation: none !important; }
  .helai-js [data-rv] { opacity: 1; transform: none; transition: none; }
  .btn, .btn::before, img { transition: none !important; }
}
@media print { .helai-js [data-rv] { opacity: 1 !important; transform: none !important; } .helai-marquee { display: none; } }

/* Real Google map on the contact page */
.helai-gmap { position: relative; aspect-ratio: 1320 / 820; background: #eee; overflow: hidden; }
.helai-gmap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.helai-gmap-link { display: inline-block; margin-top: .7rem; font-weight: 700; }

/* Stylists page: three across on wide screens so the portraits show at their real size and stay sharp */
@media (min-width: 1000px) {
  .team-roster .stylist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .team-roster .stylist-card:last-child { display: flex !important; grid-column: auto !important; }
  .team-roster .stylist-card img { aspect-ratio: 1 / 1; object-position: center 22%; }
  .team-roster .stylist-copy h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
}
