/* Doctor AI Booking: product tour player. Plain CSS; the screenshots are light, the controls dark. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --bar-h: 68px;
  --bg: #0b1120;
  --bar: #0f172a;
  --line: #1f2a3c;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --primary: #0f766e;
  --ink: #0f172a;
  --s: 1; /* the screenshot's current scale, set by tour.js */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button { font: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* Stage: the screenshot world, moved and scaled by tour.js */
#stage { position: fixed; inset: 0 0 var(--bar-h) 0; overflow: hidden; }
#world {
  position: absolute; left: 0; top: 0; width: 1440px; height: 900px;
  transform-origin: 0 0; transition: transform .65s cubic-bezier(.4, 0, .2, 1);
}
#shot { display: block; width: 100%; height: 100%; border-radius: 4px; transition: opacity .25s; background: #f6f8fb; }
#shot.fading { opacity: .25; }
#hole {
  position: absolute; border-radius: calc(10px / var(--s));
  box-shadow: 0 0 0 calc(3px / var(--s)) var(--accent), 0 0 0 99999px rgb(11 17 32 / 58%);
  transition: left .5s, top .5s, width .5s, height .5s, opacity .3s;
  pointer-events: none;
}
#hole::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgb(45 212 191 / 55%); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 calc(14px / var(--s)) rgb(45 212 191 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(45 212 191 / 0%); } }

#typed {
  position: absolute; display: flex; align-items: center; overflow: hidden; white-space: nowrap;
  background: #fff; color: var(--ink); font-size: 15px; padding: 0 12px; border-radius: 8px;
}
#typed[hidden], #cur[hidden] { display: none; }
#typed span::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

#cur {
  position: absolute; width: 28px; height: 28px; transform: scale(calc(1 / var(--s))); transform-origin: 0 0;
  transition: left .8s cubic-bezier(.4, 0, .2, 1), top .8s cubic-bezier(.4, 0, .2, 1);
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 35%)); z-index: 3; pointer-events: none;
}
#cur svg { position: relative; }
#cur .ripple { position: absolute; left: -16px; top: -16px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; }
#cur.click .ripple { animation: rip .6s ease-out; }
@keyframes rip { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* Caption card */
#cap {
  position: absolute; z-index: 5; width: 340px; max-width: calc(100vw - 24px);
  background: #fff; color: var(--ink); border-radius: 14px; padding: 16px 18px 18px;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 55%);
  transition: left .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1), opacity .25s;
}
#cap .tag { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
#cap .tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
#cap h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
#cap p:not(.tag) { margin: 6px 0 0; color: #475569; font-size: 15px; }
#cap.hidden { opacity: 0; }

/* Start and end cards */
.overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgb(11 17 32 / 72%); }
.overlay[hidden] { display: none; }
.overlay .card {
  width: 100%; max-width: 480px; text-align: center; background: #fff; color: var(--ink);
  border-radius: 20px; padding: 32px 28px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 60%);
}
.overlay .card > img { margin: 0 auto 14px; border-radius: 12px; }
.overlay h1, .overlay h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.overlay p { margin: 10px 0 0; color: #475569; }
.overlay .hint { font-size: 13px; color: #64748b; margin-top: 16px; }
.play-big {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 17px; border-radius: 14px; padding: 14px 26px;
  box-shadow: 0 10px 24px -10px var(--primary);
}
.play-big:hover { background: #115e59; }
.play-big svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.end-actions { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn.primary { display: inline-flex; align-items: center; text-decoration: none; background: var(--primary); color: #fff; font-weight: 700; border-radius: 12px; padding: 12px 20px; }
.btn.primary:hover { background: #115e59; }
.buy {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; color: #334155;
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.buy img { width: 96px; height: auto; }
.link-btn { margin-top: 18px; background: none; border: 0; color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Control bar */
#bar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar-h); z-index: 10;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: var(--bar); border-top: 1px solid var(--line);
}
#bar .logo { display: grid; place-items: center; margin-right: 6px; }
#bar .logo img { border-radius: 7px; }
.info { flex: 1; min-width: 0; margin-right: 8px; }
.ttl { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; font-weight: 600; }
.ttl small { color: var(--muted); font-weight: 500; }
.ttl .demo { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fbbf24; border: 1px solid #78350f; border-radius: 6px; padding: 1px 6px; }
#segs { display: flex; gap: 3px; margin-top: 8px; }
#segs button { flex: 1; height: 6px; min-width: 3px; padding: 0; border: 0; border-radius: 3px; background: #334155; cursor: pointer; }
#segs button.gap { margin-left: 6px; }
#segs button.done { background: #5eead4; }
#segs button.now { background: var(--accent); box-shadow: 0 0 0 2px rgb(45 212 191 / 35%); }
#segs button:hover { background: #64748b; }
.btn-i {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
  border: 1px solid var(--line); background: #111827; color: var(--fg); cursor: pointer; text-decoration: none;
}
.btn-i:hover { border-color: var(--accent); color: var(--accent); }
.btn-i svg { width: 20px; height: 20px; }
.btn-i.play { width: 48px; height: 48px; background: var(--accent); border-color: var(--accent); color: #042f2e; border-radius: 50%; }
.btn-i.play:hover { color: #042f2e; background: #5eead4; }
.btn-i.play svg { fill: currentColor; stroke: none; }
.btn-i.play .i-pause { display: none; fill: none; stroke: currentColor; stroke-width: 3; }
.playing .btn-i.play .i-play { display: none; }
.playing .btn-i.play .i-pause { display: block; }
.btn-i.speed { width: 52px; font-weight: 700; font-size: 14px; }

#list {
  position: fixed; right: 14px; bottom: calc(var(--bar-h) + 10px); z-index: 11; width: 280px; max-width: calc(100vw - 28px);
  background: var(--bar); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 20px 40px -12px rgb(0 0 0 / 70%);
}
#list[hidden] { display: none; }
#list button {
  display: flex; width: 100%; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px;
  background: none; border: 0; color: var(--fg); border-radius: 8px; cursor: pointer;
}
#list button:hover, #list button:focus-visible { background: #1e293b; }
#list button[aria-current="true"] { color: var(--accent); font-weight: 600; }
#list small { color: var(--muted); }

/* Phones: the caption becomes a sheet above the bar */
@media (max-width: 760px) {
  :root { --bar-h: 64px; }
  #cap { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; max-width: none; padding: 14px 16px; }
  #cap h2 { font-size: 17px; }
  #cap p:not(.tag) { font-size: 14px; }
  #bar { gap: 4px; padding: 0 8px; }
  #bar .logo, .ttl .demo, .btn-i.speed { display: none; }
  .btn-i { width: 38px; height: 38px; }
  .btn-i.play { width: 44px; height: 44px; }
  .info { margin-right: 2px; }
  .ttl { font-size: 14px; }
  #segs { gap: 2px; }
  #segs button.gap { margin-left: 3px; }
  .overlay .card { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  #world, #hole, #cap, #cur, #shot { transition: none; }
  #hole::after, #typed span::after { animation: none; }
}
