/* ============================================================
   WULFRIC BOOKING — booking-site styles
   Built on the Wulfric token set (tokens.css). Re-skin a client
   site by changing tokens + config.js, not this file.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { color-scheme: dark; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

::selection { background: rgba(139, 124, 246, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
}
h1 em, h2 em {
  font-style: italic;
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-right: .04em;
}

/* ---------------- atmosphere (sky, nebula, grain, progress) ---------------- */
#sky, #nebula { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress-hairline { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress-hairline span { display: block; height: 100%; background: var(--aurora); transform-origin: 0 50%; transform: scaleX(0); opacity: .8; }
/* content sits above the fixed canvases (grain at z2 films over it) */
main, .shop-footer, .demo-banner { position: relative; z-index: 1; }

/* ---------------- custom cursor (fine pointers; understated) ---------------- */
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label,
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none; border-radius: 50%; opacity: 0; }
html.cursor-visible .cursor-dot, html.cursor-visible .cursor-ring { opacity: 1; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--text); }
.cursor-ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 1px solid rgba(233,230,221,.35); }
.cursor-ring.is-active { border-color: rgba(126,232,200,.55); }

/* ---------------- tilt glow (cursor-following) ---------------- */
.tilt::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(126,232,200,.08), transparent 65%);
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.tilt:hover::before { opacity: 1; }

/* ---------------- reveals / toast / skeleton ---------------- */
.rv {
  opacity: 0; transform: translateY(22px); filter: blur(5px);
  transition: opacity .8s var(--ease-out) var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s), filter .8s var(--ease-out) var(--d, 0s);
}
.rv.is-in { opacity: 1; transform: none; filter: none; }
html.no-reveals .rv { opacity: 1; transform: none; filter: none; transition: none; }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 150%); z-index: 200;
  padding: .75rem 1.5rem; border-radius: 99px; background: rgba(16, 19, 29, .92);
  border: 1px solid rgba(126, 232, 200, .35); color: var(--text); font-size: var(--fs-small);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .45s var(--ease-out), opacity .3s ease; opacity: 0; pointer-events: none; white-space: nowrap;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast--err { border-color: rgba(240, 168, 168, .5); }

.skel { position: relative; overflow: hidden; background: rgba(233, 230, 221, .045); border-radius: var(--radius); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(233, 230, 221, .07) 50%, transparent 70%);
  animation: shimmer 1.6s ease infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-card { aspect-ratio: 1 / 1.1; border-radius: var(--radius-lg); }
.skel-row { height: 3.4rem; border-radius: var(--radius); margin-bottom: .6rem; }

/* ---------------- demo banner ---------------- */
.demo-banner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem;
  padding: .55rem var(--gutter);
  background: linear-gradient(90deg, rgba(126,232,200,.12), rgba(139,124,246,.12));
  border-bottom: 1px solid var(--hairline); font-size: .8rem; color: var(--text-dim); text-align: center;
}
.demo-banner code { color: var(--teal); font-family: inherit; font-weight: 500; }
.demo-banner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.demo-banner a:hover { color: var(--teal); }

/* ---------------- nav / footer ---------------- */
.shop-nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter); background: rgba(5, 6, 10, .8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline);
}
.shop-brand { display: flex; align-items: center; gap: .65rem; font-family: var(--font-display); font-size: 1.15rem; }
.brand-sigil { width: 1.5rem; height: 1.5rem; color: var(--text); flex-shrink: 0; }
.brand-sigil.sm { width: 1.1rem; height: 1.1rem; }
.demo-chip {
  font-family: var(--font-body); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding: .28rem .7rem; border: 1px solid rgba(126, 232, 200, .4); color: var(--teal); border-radius: 99px; white-space: nowrap;
}
@media (max-width: 540px) { .demo-chip { display: none; } }
.nav-link { font-size: var(--fs-small); color: var(--text-dim); padding: .55rem 1.1rem; border: 1px solid var(--hairline-strong); border-radius: 99px; transition: border-color .3s ease, color .3s ease; }
.nav-link:hover { color: var(--text); border-color: rgba(233,230,221,.4); }

.shop-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  padding: 1.5rem var(--gutter); border-top: 1px solid var(--hairline); font-size: .8rem; color: var(--text-faint);
}
.shop-footer-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: .95rem; color: var(--text-dim); }
.shop-footer a { text-decoration: underline; text-underline-offset: 3px; }
.shop-footer a:hover { color: var(--teal); }

/* ---------------- hero ---------------- */
.shop-hero { max-width: var(--container); margin-inline: auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(2rem, 4vw, 3rem); }
.shop-eyebrow {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-faint); display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.shop-eyebrow::before { content: ""; width: 2.5rem; height: 1px; background: linear-gradient(90deg, var(--teal), transparent); }
.shop-hero h1 { font-size: clamp(2.4rem, 1.2rem + 5vw, 5rem); max-width: 16ch; margin-bottom: 1.1rem; }
.shop-hero-sub { color: var(--text-dim); font-size: var(--fs-lead); max-width: 46ch; }
.shop-hero-sub a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.section-label {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 1.5rem;
}
.section-label em { font-style: italic; text-transform: none; letter-spacing: .04em; color: var(--teal); font-family: var(--font-display); font-size: 1.05rem; }
.grid-status { color: var(--text-dim); padding-block: 3rem; }
.grid-status a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- buttons ---------------- */
.btn-buy {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 2rem; background: var(--text); color: #0a0b10; border: 0; border-radius: 99px;
  font-size: var(--fs-small); font-weight: 500; cursor: pointer; overflow: hidden;
  /* --magx/--magy set by the magnetic-button JS */
  transform: translate3d(var(--magx, 0px), var(--magy, 0px), 0) scale(var(--mags, 1));
  transition: transform .35s var(--ease-out), box-shadow .3s ease, opacity .3s ease;
}
.btn-buy::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(126,232,200,.5) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .65s var(--ease-soft);
}
.btn-buy:hover { --mags: 1.03; box-shadow: 0 8px 28px -8px rgba(126,232,200,.4), 0 4px 16px -8px rgba(139,124,246,.3); }
.btn-buy:hover::before { transform: translateX(120%); }
.btn-buy:active { --mags: .96; }
.btn-buy:disabled { opacity: .5; cursor: default; --mags: 1; box-shadow: none; }

.btn-add {
  display: inline-grid; place-items: center; padding: .7rem 1.3rem;
  border: 1px solid var(--hairline-strong); border-radius: 99px; background: none;
  font-size: var(--fs-small); font-weight: 500; cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.btn-add:hover { background: var(--text); color: #0a0b10; border-color: var(--text); }

/* ---------------- service grid ---------------- */
.catalog { max-width: var(--container); margin-inline: auto; padding: 0 var(--gutter) clamp(4rem, 8vw, 7rem); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.svc-card {
  position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1rem;
  background: linear-gradient(180deg, rgba(16,19,29,.72), rgba(11,13,20,.72));
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  transition: transform .45s var(--ease-out), border-color .35s ease;
}
.svc-card:hover { transform: translateY(-5px); border-color: rgba(233,230,221,.22); }
.svc-art {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, rgba(16,19,29,.9), rgba(5,6,10,.95)); border: 1px solid var(--hairline);
}
.svc-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.svc-card:hover .svc-art img { transform: scale(1.04); }
.svc-ph { position: absolute; inset: 30%; border: 1px dashed var(--hairline-strong); border-radius: 50%; }

.svc-body { display: grid; gap: .5rem; flex: 1; }
.svc-body h3 { font-size: 1.25rem; }
.svc-desc { color: var(--text-dim); font-size: var(--fs-small); }
.svc-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.svc-tag {
  font-size: .72rem; letter-spacing: .03em; padding: .28rem .7rem; border-radius: 99px;
  border: 1px solid var(--hairline-strong); color: var(--text-dim);
}
.svc-tag.is-price { color: var(--teal); border-color: rgba(126,232,200,.35); background: rgba(126,232,200,.08); }
.svc-tag.is-free { color: var(--teal); border-color: rgba(126,232,200,.35); }
.svc-card .btn-add { width: 100%; }

/* ---------------- booking stepper ---------------- */
.booking { max-width: var(--container); margin-inline: auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(4rem, 8vw, 6rem); }
.booking-back { display: inline-block; font-size: var(--fs-small); color: var(--text-dim); margin-bottom: 1.25rem; }
.booking-back:hover { color: var(--teal); }
.booking-head { margin-bottom: clamp(1.4rem, 3vw, 2.25rem); }
.booking-head h1 { font-size: clamp(1.9rem, 1.2rem + 2.5vw, 3rem); }
.booking-head-sub { color: var(--text-dim); font-size: var(--fs-small); margin-top: .45rem; }
.booking-grid { display: grid; grid-template-columns: 1fr 20rem; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .booking-grid { grid-template-columns: 1fr; } }

.step { margin-bottom: 2rem; border-bottom: 1px solid var(--hairline); padding-bottom: 2rem; }
.step:last-child { border-bottom: 0; }
.step-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.step-num {
  display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--hairline-strong); font-size: .8rem; color: var(--text-dim);
}
.step.is-done .step-num { background: var(--teal); color: #06241c; border-color: var(--teal); }
.step-head h2 { font-size: 1.3rem; }
.step-head .step-pick { margin-left: auto; font-size: var(--fs-small); color: var(--teal); }

/* provider choices */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.choice {
  display: flex; align-items: center; gap: .7rem; padding: .8rem; text-align: left;
  border: 1px solid var(--hairline); border-radius: var(--radius); background: rgba(233,230,221,.02);
  cursor: pointer; transition: border-color .25s ease, background .25s ease;
}
.choice:hover { border-color: rgba(233,230,221,.3); }
.choice.is-sel { border-color: var(--teal); background: rgba(126,232,200,.08); }
.choice-av { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--hairline); background: var(--ink-2); flex-shrink: 0; }
.choice-meta strong { display: block; font-weight: 500; font-size: .95rem; }
.choice-meta span { font-size: .78rem; color: var(--text-faint); }

/* date strip */
.date-strip { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.date-cell {
  flex: 0 0 auto; width: 4.2rem; padding: .7rem 0; text-align: center; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: rgba(233,230,221,.02); cursor: pointer;
  transition: border-color .25s ease, background .25s ease;
}
.date-cell:hover { border-color: rgba(233,230,221,.3); }
.date-cell.is-sel { border-color: var(--teal); background: rgba(126,232,200,.1); }
.date-cell .dc-dow { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.date-cell .dc-day { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; }
.date-cell .dc-mon { font-size: .68rem; color: var(--text-dim); }

/* slot grid */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: .6rem; }
.skel-slot { height: 2.7rem; border-radius: 99px; }
.slot {
  padding: .65rem; text-align: center; border-radius: 99px; border: 1px solid var(--hairline-strong);
  background: none; font-size: var(--fs-small); cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.slot:hover { border-color: var(--teal); color: var(--teal); }
.slot.is-sel { background: var(--teal); color: #06241c; border-color: var(--teal); font-weight: 600; }
.slot-note { color: var(--text-faint); font-size: var(--fs-small); padding-block: 1rem; }

/* details form */
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: var(--fs-small); color: var(--text-dim); }
.field input, .field textarea {
  width: 100%; padding: .75rem .9rem; background: var(--ink); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius); color: var(--text); transition: border-color .25s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.form-error { color: #f0a8a8; font-size: var(--fs-small); margin: .25rem 0 1rem; }

/* summary rail */
.summary {
  position: sticky; top: calc(var(--nav-h) + 1rem); padding: 1.4rem; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(16,19,29,.85), rgba(11,13,20,.85));
  display: grid; gap: 1rem;
}
.summary h3 { font-size: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-small); }
.summary-row span { color: var(--text-faint); }
.summary-row strong { font-weight: 500; text-align: right; }
.summary-divider { height: 1px; background: var(--hairline); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-lead); }
.summary-total .amt { color: var(--teal); }
.summary .btn-buy { width: 100%; margin-top: .25rem; }
.summary-fine { font-size: .72rem; color: var(--text-faint); text-align: center; }

/* ---------------- confirmed / canceled ---------------- */
.order-result {
  max-width: 34rem; margin-inline: auto; padding: clamp(3.5rem, 9vw, 6rem) var(--gutter);
  display: grid; justify-items: center; text-align: center; gap: 1rem;
}
.order-result svg.tick { width: 76px; height: 76px; margin-bottom: .5rem; }
.order-result h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.order-result p { color: var(--text-dim); }
.order-result .ring { stroke-dasharray: 164; stroke-dashoffset: 164; animation: draw 1.1s var(--ease-out) .15s forwards; }
.order-result .check { stroke-dasharray: 34; stroke-dashoffset: 34; animation: draw .6s var(--ease-out) .75s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.appt-card {
  width: 100%; max-width: 26rem; margin-top: .5rem; padding: 1.2rem 1.4rem; text-align: left;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16,19,29,.85), rgba(11,13,20,.85)); display: grid; gap: .6rem;
}
.appt-card .ar { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-small); }
.appt-card .ar span { color: var(--text-faint); }
.appt-card .ar strong { font-weight: 500; text-align: right; }
.result-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
