/* ===========================================================================
   Jiana Beauty Lounge — bespoke styles (layered on top of Tailwind utilities)
   Palette: pure white canvas, warm gold accents, ink-black type.
   =========================================================================== */
:root {
  --gold: #c9a24b;
  --gold-soft: #e8d29b;
  --gold-deep: #a9853a;
  --ink: #1a1714;
  --line: rgba(169, 133, 58, 0.22);
  --shadow: 0 18px 50px -24px rgba(120, 95, 35, 0.45);
  --gold-grad: linear-gradient(135deg, #e8d29b 0%, #c9a24b 45%, #a9853a 100%);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  /* respect notches / home indicator on phones */
  padding-bottom: env(safe-area-inset-bottom);
}

::selection { background: var(--gold-soft); color: var(--ink); }

/* --- typography helpers --------------------------------------------------- */
.display { font-family: "Cormorant Garamond", serif; line-height: 1.02; letter-spacing: -0.01em; }
.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 500;
}
.text-gold { color: var(--gold-deep); }
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- gold rule / dividers ------------------------------------------------- */
.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-weight: 500; letter-spacing: .04em; border-radius: 999px;
  padding: .85rem 1.8rem; transition: transform .25s ease, box-shadow .3s ease, background .3s;
  cursor: pointer; border: 1px solid transparent; font-size: .92rem;
}
.btn-gold { background: var(--gold-grad); color: #fff; box-shadow: var(--shadow); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -20px rgba(169,133,58,.6); }
.btn-gold:active { transform: translateY(0); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }

/* --- cards ---------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 1.4rem;
  box-shadow: 0 12px 40px -28px rgba(120,95,35,.5);
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* --- inputs --------------------------------------------------------------- */
.field {
  width: 100%; background: #fdfbf6; border: 1px solid var(--line);
  border-radius: .9rem; padding: .9rem 1rem; font-size: 1rem; color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,75,.14); background: #fff;
}
.field-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); font-weight: 500; }

/* --- decorative photo frame ---------------------------------------------- */
.photo {
  position: relative; overflow: hidden; border-radius: 1.4rem;
  background: linear-gradient(135deg, #f7f1e6, #efe4cd);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(255,255,255,.4); box-shadow: inset 0 0 0 6px rgba(201,162,75,.10);
  pointer-events: none;
}

/* ===========================================================================
   Scroll-reveal animations
   =========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===========================================================================
   SPA page transitions (driven by the router)
   =========================================================================== */
#app > .page { animation: page-in .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* when navigating "back" we slide the page in from the left for native feel */
#app.going-back > .page { animation: page-back .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes page-back { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

/* live drag of the whole app while swiping back */
#app.dragging { transition: none; will-change: transform; }

/* swipe-back arrow indicator */
#swipe-indicator {
  position: fixed; top: 50%; left: 0; z-index: 60;
  width: 46px; height: 46px; margin-top: -23px; border-radius: 999px;
  display: grid; place-items: center; color: var(--gold-deep);
  background: rgba(255,255,255,.92); box-shadow: var(--shadow);
  transform: translateX(-70px) scale(.8); opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
#swipe-indicator svg { width: 22px; height: 22px; }

/* ===========================================================================
   Navigation
   =========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(255,255,255,.82); border-bottom: 1px solid var(--line);
}
.nav-link { position: relative; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #555; transition: color .25s; }
.nav-link:hover, .nav-link.active { color: var(--gold-deep); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--gold-grad); border-radius: 2px;
}

/* mobile bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .62rem; letter-spacing: .06em; color: #9a9a9a; padding: .25rem .6rem; transition: color .2s; }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--gold-deep); }
@media (min-width: 768px) { .tabbar { display: none; } }

/* hero gradient wash */
.hero-wash { background: radial-gradient(120% 90% at 80% 0%, #fbf7ee 0%, #ffffff 55%); }

/* shimmer line under section eyebrows */
.shimmer { background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft), var(--gold-deep)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }

/* try-on swatch ring */
.swatch { width: 40px; height: 40px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -6px rgba(0,0,0,.3); cursor: pointer; transition: transform .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 2px var(--gold-deep), 0 6px 14px -6px rgba(0,0,0,.3); transform: scale(1.12); }

/* toast */
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); z-index: 80; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================================================================
   Booking wizard — sticky bottom bar + hidden generic nav
   =========================================================================== */
/* during the booking flow the generic app tab bar is hidden in favour of the
   dedicated booking bar */
body.booking-mode .tabbar { display: none !important; }

.book-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.3) blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 34px -22px rgba(120, 95, 35, .55);
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
}
.book-bar-inner { max-width: 48rem; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.book-bar .price { font-family: "Cormorant Garamond", serif; font-size: 1.7rem; line-height: 1; }
.book-bar .slot-range { font-size: .78rem; color: var(--gold-deep); }
.book-bar .muted { color: #9a9a9a; }
.book-bar .strike { text-decoration: line-through; color: #b9b3a6; font-size: .85rem; }
/* leave room so page content never hides behind the bar */
.wizard-pad { height: 120px; }

/* horizontal date rail (Step 3) */
.date-rail { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding: 2px 2px 8px; }
.date-rail::-webkit-scrollbar { height: 0; }
.date-chip {
  scroll-snap-align: start; flex: 0 0 auto; width: 62px; text-align: center;
  border: 1px solid var(--line); border-radius: 14px; padding: .55rem .2rem; cursor: pointer;
  background: #fff; transition: transform .2s, border-color .2s, background .2s, color .2s;
}
.date-chip:hover { border-color: var(--gold); }
.date-chip.active { background: var(--gold-grad); color: #fff; border-color: transparent; }
.date-chip .dow { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.date-chip .dnum { font-family: "Cormorant Garamond", serif; font-size: 1.45rem; line-height: 1.1; }
.date-chip .dmon { font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }

/* multi-select service card check mark */
.svc-check { width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; transition: .2s; }
.svc.selected .svc-check { background: var(--gold-grad); border-color: transparent; color: #fff; }
.svc.selected { border-color: var(--gold); }

/* ===========================================================================
   Admin timeline — "pending" urgency pulse (gated to .tl-pending only)
   A slow breathing glow + expanding ring in the deep-orange pending colour,
   so pending bookings demand attention without being frantic.
   =========================================================================== */
.tl-pending { animation: pending-pulse 2.4s ease-in-out infinite; will-change: box-shadow; }
@keyframes pending-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 87, 34, .55), 0 0 8px 0 rgba(255, 87, 34, .35); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 87, 34, 0), 0 0 16px 3px rgba(255, 87, 34, .55); }
  100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0), 0 0 8px 0 rgba(255, 87, 34, .35); }
}
@media (prefers-reduced-motion: reduce) {
  .tl-pending { animation: none; box-shadow: 0 0 10px 1px rgba(255, 87, 34, .5); }  /* static glow fallback */
}
