/* =====================================================================
   New-client intro drawer (assets/js/intro-popup.js)
   A bottom sheet in the studio palette: cream sheet, grab handle,
   icon tile + title, price tag, terracotta claim button with a shine
   sweep, quiet "Maybe later". Plus the small reopen pill.
   ===================================================================== */
html.ip-locked{overflow:hidden}
/* keep the chat launcher and its greeting from sitting on top of the drawer buttons */
html.ip-locked [id^="chatbase"]{visibility:hidden!important;pointer-events:none!important}

.ip-root{position:fixed;inset:0;z-index:2000;perspective:1200px}
.ip-root[hidden]{display:none}

.ip-scrim{position:absolute;inset:0;
  background:rgba(26,24,22,.5);
  -webkit-backdrop-filter:blur(6px) saturate(1.05);backdrop-filter:blur(6px) saturate(1.05)}

.ip-sheet{
  position:absolute;left:0;right:0;bottom:max(14px, env(safe-area-inset-bottom));
  margin:0 auto;width:max-content;max-width:calc(100vw - 24px);
  padding:10px 24px 24px;
  background:linear-gradient(180deg,#fdfaf4 0%,#f8f2e7 100%);
  border:1px solid rgba(26,24,22,.08);border-radius:24px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 30px 60px -20px rgba(26,24,22,.45),
    0 12px 24px -12px rgba(26,24,22,.25);
  transform-origin:50% 100%;
  touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;
  outline:none;
}
.ip-sheet.is-dragging{cursor:grabbing}

.ip-handle{width:56px;height:5px;border-radius:999px;margin:0 auto 14px;background:rgba(26,24,22,.14)}

.ip-body{width:min(340px, calc(100vw - 72px));display:flex;flex-direction:column;gap:22px}

/* header */
.ip-head{display:flex;align-items:center;gap:12px}
.ip-tile{flex:none;display:grid;place-items:center;padding:6px;border-radius:12px;
  background:linear-gradient(135deg,#f3ece0,#e6dccb);
  box-shadow:inset 0 2px 4px rgba(26,24,22,.08),inset 0 -1px 0 rgba(255,255,255,.7)}
.ip-tile img{display:block;width:32px;height:32px;object-fit:contain}
.ip-title{margin:0;font:600 24px/1.1 "Inter",system-ui,sans-serif;letter-spacing:-.035em;color:var(--ink,#1a1816)}
.ip-sub{margin:-10px 0 0;font:400 14px/1.55 "Inter",system-ui,sans-serif;letter-spacing:-.01em;color:var(--ink-soft,#3a342c)}

/* price tag */
.ip-price{display:flex;align-items:center;justify-content:center;gap:16px;margin:0 auto}
.ip-amount{font:700 40px/1 "Inter",system-ui,sans-serif;letter-spacing:-.04em;
  background:linear-gradient(135deg,#1a1816 0%,#5a4f43 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent}
.ip-meta{display:flex;flex-direction:column;align-items:flex-start;gap:2px;
  padding-left:16px;border-left:1px solid rgba(26,24,22,.12)}
.ip-meta-1{font:500 14px/1.2 "Inter",system-ui,sans-serif;color:var(--ink,#1a1816)}
.ip-meta-2{font:400 12px/1.2 "Inter",system-ui,sans-serif;color:var(--ink-mute,#7a7064)}

/* actions */
.ip-actions{display:flex;flex-direction:column;gap:10px}
.ip-claim,.ip-later{height:46px;border-radius:12px;width:100%;
  display:inline-flex;align-items:center;justify-content:center;
  font:600 14px/1 "Inter",system-ui,sans-serif;letter-spacing:-.01em;cursor:pointer}
.ip-claim{position:relative;overflow:hidden;color:#fff;text-decoration:none;
  background:linear-gradient(90deg,#c2543d 0%,#d9714f 100%);
  box-shadow:0 10px 24px -8px rgba(194,84,61,.45);
  transition:box-shadow .5s cubic-bezier(.16,1,.3,1),filter .5s cubic-bezier(.16,1,.3,1)}
.ip-claim:hover{filter:saturate(1.08) brightness(.97);box-shadow:0 16px 32px -10px rgba(194,84,61,.55)}
.ip-shine{position:absolute;inset:0;transform:translateX(-200%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)}
.ip-claim:hover .ip-shine{animation:ip-shine 1.5s ease-in-out}
@keyframes ip-shine{from{transform:translateX(-200%)}to{transform:translateX(200%)}}
.ip-claim-label{position:relative;display:inline-flex;align-items:center;gap:8px}
.ip-spark{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.ip-later{background:transparent;color:var(--ink,#1a1816);
  border:1px solid rgba(26,24,22,.14);transition:background .3s cubic-bezier(.16,1,.3,1)}
.ip-later:hover{background:rgba(26,24,22,.05)}

.ip-claim:focus-visible,.ip-later:focus-visible,.ip-pill:focus-visible{
  outline:2px solid var(--terracotta,#c2543d);outline-offset:3px}

/* CSS fallback when GSAP isn't on the page */
.ip-root:not(.is-open) .ip-scrim{opacity:0}
.ip-root:not(.is-open) .ip-sheet{transform:translateY(70vh);opacity:0}
.ip-root .ip-scrim,.ip-root .ip-sheet{transition:opacity .35s ease,transform .6s cubic-bezier(.16,1,.3,1)}
/* when GSAP drives the motion inline, switch the CSS transitions off */
.ip-root.ip-gsap .ip-scrim,.ip-root.ip-gsap .ip-sheet{transition:none}

/* reopen pill */
.ip-pill{position:fixed;left:max(18px, env(safe-area-inset-left));bottom:max(18px, env(safe-area-inset-bottom));z-index:1500;
  display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px 0 14px;border-radius:999px;cursor:pointer;
  background:linear-gradient(90deg,#c2543d,#d9714f);color:#fff;border:0;
  box-shadow:0 12px 26px -10px rgba(194,84,61,.6);
  font:500 12px/1 "Inter",system-ui,sans-serif;letter-spacing:.01em;
  transition:transform .4s cubic-bezier(.16,1,.3,1)}
.ip-pill[hidden]{display:none}
.ip-pill:hover{transform:translateY(-2px)}
.ip-pill-dot{width:6px;height:6px;border-radius:50%;background:#fff;animation:ip-pulse 2.4s ease-in-out infinite}
.ip-pill-a{opacity:.85}
.ip-pill-b{font-weight:600}
@keyframes ip-pulse{0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,.6)}60%{box-shadow:0 0 0 6px rgba(255,255,255,0)}}

/* tablet and up: the sheet slides up and parks a little above centre,
   where the eye lands first, instead of hugging the bottom edge */
@media (min-width:521px){
  .ip-root{display:flex;align-items:center;justify-content:center;padding:24px 24px 9vh}
  .ip-sheet{position:relative;left:auto;right:auto;bottom:auto;margin:0;transform-origin:50% 60%}
}
/* desktop: everything scaled up so the offer reads from across the room */
@media (min-width:900px){
  .ip-sheet{padding:14px 40px 40px;border-radius:32px}
  .ip-handle{width:64px;height:6px;margin-bottom:22px}
  .ip-body{width:480px;gap:30px}
  .ip-head{gap:16px}
  .ip-tile{padding:8px;border-radius:16px}
  .ip-tile img{width:48px;height:48px}
  .ip-title{font-size:36px;letter-spacing:-.04em}
  .ip-sub{margin-top:-14px;font-size:18px;line-height:1.5}
  .ip-price{gap:22px}
  .ip-amount{font-size:76px}
  .ip-meta{padding-left:22px;gap:4px}
  .ip-meta-1{font-size:20px}
  .ip-meta-2{font-size:15px}
  .ip-actions{gap:12px}
  .ip-claim,.ip-later{height:60px;border-radius:16px;font-size:17px}
  .ip-spark{width:20px;height:20px}
}
@media (max-width:520px){
  .ip-sheet{bottom:0;max-width:100vw;width:100%;border-radius:22px 22px 0 0;
    padding-bottom:max(22px, env(safe-area-inset-bottom));border-bottom:0}
  .ip-body{width:auto}
  .ip-pill-a{display:none}
}
@media (prefers-reduced-motion:reduce){
  .ip-pill-dot{animation:none}
  .ip-claim:hover .ip-shine{animation:none}
}
