/* Hawke polish layer: shared motion and finish for the salon/cafe template sites.
   Master copy lives in auto-sites/hawke-polish/. Run apply.sh to copy it into each site.
   Each site sets --hk-accent, --hk-ink and --hk-tint in its own styles.css. */

:root {
  --hk-accent: #7E2234;
  --hk-ink: #1E1A18;
  --hk-tint: #F4EEE6;
  --hk-on-ink: #fff;
  --hk-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection { background: var(--hk-accent); color: #fff; }
h1, h2, h3 { text-wrap: balance; }
p, li, small { text-wrap: pretty; }

/* ---------- Scroll progress line ---------- */
.hk-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; pointer-events: none;
  background: var(--hk-accent); transform-origin: 0 50%; transform: scaleX(var(--hk-p, 0)); }
@supports (animation-timeline: scroll()) {
  .hk-progress { animation: hk-grow linear both; animation-timeline: scroll(root); }
  @keyframes hk-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Top bar: glass, tightens after you scroll ---------- */
.nav { transition: box-shadow .35s var(--hk-ease), background-color .35s var(--hk-ease); }
.nav-in { transition: height .35s var(--hk-ease); }
.nav.hk-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
@media (min-width: 760px) { .nav.hk-scrolled .nav-in { height: 56px; } }
.links a { position: relative; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--hk-accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--hk-ease); }
.links a:hover::after, .links a.hk-here::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero: soft moving light + staggered entrance ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(60px); opacity: .55; }
.hero::before { width: 46vmax; height: 46vmax; top: -18vmax; right: -12vmax;
  background: radial-gradient(circle, color-mix(in srgb, var(--hk-accent) 32%, transparent), transparent 70%);
  animation: hk-drift 18s ease-in-out infinite alternate; }
.hero::after { width: 38vmax; height: 38vmax; bottom: -20vmax; left: -14vmax;
  background: radial-gradient(circle, color-mix(in srgb, var(--hk-accent) 20%, #fff 10%), transparent 70%);
  animation: hk-drift 22s ease-in-out -7s infinite alternate-reverse; }
@keyframes hk-drift { to { transform: translate(-6vmax, 5vmax) scale(1.12); } }

.hk-js .hero-text > *, .hk-js .hero > .wrap > *:not(.hero-in) { animation: hk-up .9s var(--hk-ease) both; }
.hk-js .hero-text > *:nth-child(1) { animation-delay: .05s; }
.hk-js .hero-text > *:nth-child(2) { animation-delay: .15s; }
.hk-js .hero-text > *:nth-child(3) { animation-delay: .27s; }
.hk-js .hero-text > *:nth-child(4) { animation-delay: .39s; }
.hk-js .hero-text > *:nth-child(5) { animation-delay: .5s; }
.hk-js .hero-text > *:nth-child(n+6) { animation-delay: .6s; }
.hk-js .hero > .wrap > *:nth-child(2) { animation-delay: .12s; }
.hk-js .hero > .wrap > *:nth-child(3) { animation-delay: .22s; }
.hk-js .hero > .wrap > *:nth-child(4) { animation-delay: .32s; }
.hk-js .hero > .wrap > *:nth-child(5) { animation-delay: .42s; }
.hk-js .hero > .wrap > *:nth-child(n+6) { animation-delay: .52s; }
@keyframes hk-up { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.hk-js .hero-photo, .hk-js .hero-arch, .hk-js .seal, .hk-js .hero-logo { animation: hk-pop 1.2s var(--hk-ease) .25s both; }
@keyframes hk-pop { from { opacity: 0; scale: .9; translate: 0 30px; } to { opacity: 1; scale: 1; translate: 0 0; } }
.hero-photo, .hero-arch { transition: transform .6s var(--hk-ease), box-shadow .6s var(--hk-ease); }
.hero-photo:hover { transform: rotate(0deg) scale(1.02); }
.hero-arch:hover { transform: translateY(-6px); }
/* Hero picture drifts gently as you scroll past */
@supports (animation-timeline: view()) {
  .hk-js .hero-photo, .hk-js .hero-arch {
    animation: hk-pop 1.2s var(--hk-ease) .25s both, hk-parallax linear both;
    animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
  @keyframes hk-parallax { to { translate: 0 -60px; } }
}

/* Open now badge */
.hk-open { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; padding: 7px 14px 7px 12px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; line-height: 1.3; background: rgba(255,255,255,.7); color: var(--hk-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hk-ink) 14%, transparent); backdrop-filter: blur(6px); }
.hk-open i { width: 9px; height: 9px; border-radius: 50%; background: #9a948d; flex: none; position: relative; }
.hk-open.is-open i { background: #2fa463; }
.hk-open.is-open i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #2fa463; animation: hk-ping 1.8s var(--hk-ease) infinite; }
@keyframes hk-ping { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(1.4); } }
.hero .hk-open { display: flex; width: max-content; max-width: 100%; }
.hero .wrap > .hk-open { margin-inline: auto; }
.hk-open-visit { margin: 0 0 18px; }

/* ---------- Moving services strip under the hero ---------- */
.hk-marquee { overflow: hidden; background: var(--hk-ink); color: var(--hk-on-ink); padding: 15px 0; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hk-track { display: flex; width: max-content; animation: hk-scroll var(--hk-dur, 40s) linear infinite; }
.hk-marquee:hover .hk-track { animation-play-state: paused; }
.hk-track span { white-space: nowrap; font-size: .95rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-right: 2.2em; }
.hk-track span::after { content: "✦"; color: var(--hk-accent); margin-left: 2.2em; filter: brightness(1.6); }
@keyframes hk-scroll { to { transform: translateX(-50%); } }

/* ---------- Scroll reveals ---------- */
.hk-js [data-hk] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--hk-ease), transform .9s var(--hk-ease); transition-delay: calc(var(--hk-i, 0) * 80ms); }
.hk-js [data-hk].hk-in { opacity: 1; transform: none; }
.hk-js h2[data-hk] { clip-path: inset(0 0 100% 0); transform: translateY(40%); transition-property: opacity, transform, clip-path; }
.hk-js h2[data-hk].hk-in { clip-path: inset(0 0 -20% 0); transform: none; }
.section h2 { position: relative; }
.section h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; margin-top: 14px; background: var(--hk-accent);
  transform: scaleX(0); transform-origin: left; transition: transform .9s var(--hk-ease) .35s; }
.hk-js .section h2.hk-in::after, html:not(.hk-js) .section h2::after { transform: scaleX(1); }

/* ---------- Service / price cards ---------- */
.menu .group { border-radius: 22px; transition: transform .4s var(--hk-ease), box-shadow .4s var(--hk-ease); }
@media (min-width: 760px) {
  /* Not the coloured deal boxes: they keep their own background, or their white text vanishes. */
  .menu .group:not(.group-deal) { padding: 26px 26px 14px; background: color-mix(in srgb, #fff 72%, transparent);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 0 0 1px color-mix(in srgb, var(--hk-ink) 9%, transparent), 0 18px 40px -28px rgba(0,0,0,.35); }
  .menu .group:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hk-accent) 35%, transparent), 0 30px 60px -30px rgba(0,0,0,.45); }
}
.menu li { transition: padding .3s var(--hk-ease), background-color .3s; position: relative; }
.menu li:hover { padding-left: 10px; }
.menu li::before { content: ""; position: absolute; left: -4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--hk-accent); transform: scale(0); transition: transform .3s var(--hk-ease); }
.menu li:hover::before { transform: scale(1); }

/* ---------- Reels ---------- */
.reel .clip { border-radius: 20px; overflow: hidden; transition: transform .5s var(--hk-ease), box-shadow .5s var(--hk-ease); }
.reel .clip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,.18)); }
.reel video { transition: transform .8s var(--hk-ease); }
@media (hover: hover) {
  .reel:hover .clip { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 34px 60px -30px rgba(0,0,0,.55); }
  .reel:nth-child(2):hover .clip { transform: translateY(-8px) rotate(.6deg); }
  .reel:hover video { transform: scale(1.04); }
}
.ig-follow { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 2px; transition: background-size .4s var(--hk-ease); }
.ig-follow::after { content: " →"; display: inline-block; transition: transform .3s var(--hk-ease); }
.ig-follow:hover::after { transform: translateX(5px); }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); }
.btn:hover::after { transform: translateX(120%); transition: transform .8s var(--hk-ease); }
.btn-small[href^="tel:"]::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  background: currentColor; -webkit-mask: var(--hk-phone) center / contain no-repeat; mask: var(--hk-phone) center / contain no-repeat; }
:root { --hk-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }

/* Phone pill: slides in after a moment */
.hk-js .bookbar { animation: hk-pill .8s var(--hk-ease) 1.2s both; }
@keyframes hk-pill { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- Visit ---------- */
.hours tr { transition: background-color .3s; }
.hours tr.today { position: relative; }
.map { transition: filter .5s var(--hk-ease), box-shadow .5s var(--hk-ease); filter: saturate(.8) contrast(1.02); }
.map:hover { filter: none; }

/* Toast (number copied) */
.hk-toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; padding: 12px 20px; border-radius: 999px; background: var(--hk-ink); color: var(--hk-on-ink);
  font-weight: 600; font-size: .95rem; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); transform: translate(-50%, 120px); opacity: 0;
  transition: transform .5s var(--hk-ease), opacity .3s; }
.hk-toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Fine grain over everything, like paper ---------- */
body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* People who turn off motion get a still page */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hk-js [data-hk], .hk-js h2[data-hk] { opacity: 1; transform: none; clip-path: none; }
  .section h2::after { transform: scaleX(1); }
  .hk-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .hk-track span[aria-hidden] { display: none; }
}
