body {
  position: relative;
  overflow-x: hidden;
}

.motion-canvas {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background: var(--mist);
}

.motion-orb {
  position: absolute;
  width: 44vw;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.48;
  filter: blur(84px);
  will-change: transform;
}

.orb-one { top: -18vw; left: -12vw; background: var(--violet); animation: float-one 17s ease-in-out infinite alternate; }
.orb-two { top: 38vh; right: -20vw; background: var(--lilac); animation: float-two 21s ease-in-out infinite alternate; }
.orb-three { bottom: -22vw; left: 30vw; background: var(--cream); animation: float-three 24s ease-in-out infinite alternate; }

.cursor-glow {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(190, 170, 255, 0.34);
  filter: blur(52px);
  transform: translate3d(calc(var(--pointer-x, 50vw) - 140px), calc(var(--pointer-y, 30vh) - 140px), 0);
  transition: transform 180ms ease-out;
  pointer-events: none;
}

.service-section { background: rgba(247, 242, 255, 0.7); backdrop-filter: blur(20px); }
.hero { isolation: isolate; }
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -20%;
  left: -20%;
  width: 46vw;
  height: 46vw;
  margin: auto;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  animation: hero-shine 12s ease-in-out infinite alternate;
}

.hero-art { animation: art-float 7s ease-in-out infinite; box-shadow: 0 28px 70px rgba(44,35,46,.16); }
.art-label { animation: label-drift 5s ease-in-out infinite alternate; }

.button,
.nav-book,
.portal-link,
.service-card button,
.filter {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.interactive-button span:last-child { display: inline-block; margin-left: 8px; transition: transform 180ms ease; }
.interactive-button:hover span:last-child { transform: translate(3px, -3px); }
.button:hover,.nav-book:hover,.portal-link:hover,.service-card button:hover,.filter:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(44,35,46,.12); }
.button:active,.nav-book:active,.portal-link:active,.service-card button:active,.filter:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.interactive-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(255,255,255,.16);
  transform: translateX(-110%) skewX(-18deg);
  transition: transform 460ms ease;
}
.interactive-button:hover::before { transform: translateX(110%) skewX(-18deg); }
.ripple { position:absolute; border-radius:50%; background:rgba(255,255,255,.42); transform:scale(0); animation:ripple .6s linear; pointer-events:none; }

.service-card { transition: transform 260ms cubic-bezier(.2,.8,.2,1), border-color 220ms ease, box-shadow 260ms ease; transform-style: preserve-3d; }
.service-card:hover { transform: translateY(-9px) rotate(.35deg); border-color: rgba(44,35,46,.36); box-shadow: 0 25px 50px rgba(44,35,46,.1); }
.service-card:nth-child(even):hover { transform: translateY(-9px) rotate(-.35deg); }
.spark { animation: spark-spin 9s linear infinite; }
.quote-card { transition: transform 300ms ease; }
.quote-card:hover { transform: rotate(0) translateY(-8px); }

.portal-link { border: 0; background: transparent; border-radius: 999px; padding: 11px 14px; font-weight: 600; cursor: pointer; }
.portal-link span { color: var(--orange); font-size: 20px; margin-right: 4px; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.success-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.portal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(44,35,46,.62);
  backdrop-filter: blur(12px);
}
.portal-backdrop[hidden] { display: none; }
.portal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 48px;
  background: var(--mist);
  box-shadow: 0 32px 100px rgba(44,35,46,.3);
}
.portal-login { min-height: 650px; padding: clamp(40px,7vw,76px); background: var(--mist); }
.portal-kicker { display:flex; justify-content:space-between; align-items:center; text-transform:uppercase; font-size:12px; letter-spacing:.12em; font-weight:700; }
.portal-kicker strong { padding:7px 11px; border-radius:999px; background:var(--orange); color:white; }
.portal-monogram { width:86px; height:86px; display:grid; place-items:center; margin:70px auto 30px; border-radius:28px; background:var(--ink); color:var(--violet); font:italic 54px/1 var(--serif); transform:rotate(-6deg); animation:monogram-rock 5s ease-in-out infinite; }
.portal-login h2 { max-width:680px; margin:0 auto 22px; text-align:center; font-size:clamp(52px,8vw,88px); line-height:.92; letter-spacing:-.055em; }
.portal-login h2 em { font-family:var(--serif); font-weight:400; }
.portal-login>p:not(.portal-kicker):not(.demo-note) { max-width:540px; margin:0 auto 32px; text-align:center; font-family:var(--serif); font-size:20px; }
.portal-login form { display:grid; gap:14px; max-width:520px; margin:auto; }
.portal-login label { display:grid; gap:8px; font-size:14px; font-weight:700; }
.portal-login input { width:100%; min-height:58px; border:1px solid var(--line); border-radius:999px; padding:0 20px; background:white; }
.portal-login .button { width:100%; }
.demo-note { margin:18px auto 0; color:#6b6170; text-align:center; font-size:13px; }

.portal-dashboard { min-height:650px; padding:clamp(34px,6vw,64px); background:var(--lilac); }
.portal-topline { display:flex; justify-content:space-between; align-items:flex-start; gap:30px; margin-bottom:32px; }
.portal-topline h2 { margin:0; font-size:clamp(48px,7vw,76px); line-height:.9; letter-spacing:-.05em; }
.portal-topline h2 em { font-family:var(--serif); font-weight:400; }
.portal-profile { display:flex; align-items:center; gap:12px; padding:10px 14px 10px 10px; border-radius:999px; background:white; }
.portal-profile>span { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:var(--violet); font-family:var(--serif); }
.portal-profile div { display:grid; line-height:1.1; }
.portal-profile button { border:0; padding:3px 0 0; background:transparent; color:#6b6170; text-align:left; cursor:pointer; font-size:12px; }
.portal-stats { display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:12px; margin:0 0 38px; }
.portal-stats>div,.portal-stats>button { min-height:120px; border:1px solid var(--line); border-radius:28px; background:rgba(255,255,255,.72); padding:22px; text-align:left; }
.portal-stats span { font:400 38px/1 var(--serif); }
.portal-stats p { margin:10px 0 0; color:#6b6170; }
.portal-stats button { display:flex; align-items:center; gap:15px; background:var(--ink); color:white; cursor:pointer; }
.portal-stats button span { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; background:var(--orange); }
.appointment-heading { display:flex; justify-content:space-between; align-items:end; margin-bottom:14px; }
.appointment-heading h3 { margin:0; font:400 32px/1 var(--serif); }
.appointment-heading>span { color:#6b6170; font-size:14px; }
.appointment-list { display:grid; gap:12px; }
.appointment-card { display:grid; grid-template-columns:auto 1fr auto; gap:20px; align-items:center; padding:18px; border:1px solid var(--line); border-radius:28px; background:white; }
.appointment-date { width:68px; height:68px; display:grid; place-items:center; align-content:center; border-radius:22px; background:var(--violet); line-height:1; }
.appointment-date strong { font-size:24px; }
.appointment-date span { margin-top:5px; font-size:11px; font-weight:700; letter-spacing:.08em; }
.appointment-card h4 { margin:0 0 4px; font:400 23px/1.15 var(--serif); }
.appointment-card p { margin:0; color:#6b6170; font-size:14px; }
.appointment-actions { display:flex; gap:8px; }
.appointment-actions button { border:1px solid var(--line); border-radius:999px; padding:9px 13px; background:transparent; cursor:pointer; font-weight:600; }
.appointment-actions .cancel-action { color:#7a3140; }
.reschedule-row { grid-column:2/-1; display:flex; gap:8px; align-items:center; padding-top:10px; }
.reschedule-row input { min-height:42px; border:1px solid var(--line); border-radius:999px; padding:0 14px; }
.reschedule-row button { border:0; border-radius:999px; padding:11px 16px; background:var(--ink); color:white; font-weight:700; cursor:pointer; }
.empty-appointments { padding:42px; border:1px dashed var(--line); border-radius:28px; text-align:center; background:rgba(255,255,255,.5); }
.empty-appointments strong { display:block; margin-bottom:6px; font:400 28px/1.2 var(--serif); }
.portal-footnote { margin:24px 0 0; color:#6b6170; text-align:center; font-size:13px; }

@keyframes float-one { to { transform:translate(28vw,18vh) scale(1.18); } }
@keyframes float-two { to { transform:translate(-30vw,-14vh) scale(.82); } }
@keyframes float-three { to { transform:translate(12vw,-20vh) scale(1.2); } }
@keyframes hero-shine { to { transform:translate(30vw,-12vh) scale(1.35); } }
@keyframes art-float { 50% { transform:rotate(1deg) translateY(-12px); } }
@keyframes label-drift { to { transform:translateX(8px); } }
@keyframes spark-spin { to { transform:rotate(360deg); } }
@keyframes monogram-rock { 50% { transform:rotate(6deg) translateY(-6px); } }
@keyframes ripple { to { transform:scale(4); opacity:0; } }

@media (max-width: 900px) {
  .portal-link { font-size:14px; }
  .portal-link span { font-size:18px; margin-right:2px; }
  .portal-stats { grid-template-columns:1fr 1fr; }
  .portal-stats>button { grid-column:1/-1; }
}
@media (max-width: 650px) {
  .motion-orb { width:82vw; }
  .site-header nav { gap:4px; }
  .portal-link { width:42px; padding:10px; font-size:0; }
  .portal-link span { font-size:20px; margin:0; }
  .portal-panel { border-radius:34px; }
  .portal-login { min-height:620px; }
  .portal-topline { flex-direction:column; }
  .portal-profile { order:-1; }
  .portal-stats { grid-template-columns:1fr 1fr; }
  .appointment-heading>span { display:none; }
  .appointment-card { grid-template-columns:auto 1fr; }
  .appointment-actions { grid-column:1/-1; }
  .reschedule-row { grid-column:1/-1; flex-wrap:wrap; }
  .reschedule-row input { flex:1; }
}
@media (pointer:coarse) { .cursor-glow { display:none; } }
@media (prefers-reduced-motion:reduce) {
  .motion-orb,.hero::after,.hero-art,.art-label,.spark,.portal-monogram { animation:none; }
  .cursor-glow { display:none; }
  .button,.nav-book,.portal-link,.service-card,.filter { transition:none; }
}
