/* ============================================================
   DR. PROFIT — first-visit quote wheel
   ============================================================ */

body.quote-intro-open {
  overflow: hidden !important;
  touch-action: none;
}

.quote-intro {
  position: fixed;
  inset: 0;
  z-index: 2900;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background: #060e24;
  opacity: 1;
  visibility: visible;
  transition: opacity .65s var(--ease-out), visibility .65s;
  isolation: isolate;
}

.quote-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.quote-intro-atmosphere,
.quote-intro-atmosphere::before,
.quote-intro-atmosphere::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
}

.quote-intro-atmosphere {
  z-index: -1;
  background:
    radial-gradient(circle at 24% 48%, rgba(156,39,176,.16), transparent 31%),
    radial-gradient(circle at 74% 34%, rgba(22,194,212,.09), transparent 26%),
    linear-gradient(125deg, #050b1c 0%, #08122b 54%, #090d24 100%);
}

.quote-intro-atmosphere::before {
  opacity: .22;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(22,194,212,.5) 0 1px, transparent 1.5px);
  background-position: 0 0, 46px 72px;
  background-size: 118px 118px, 173px 173px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.quote-intro-atmosphere::after {
  inset: auto -10% -24%;
  height: 50%;
  opacity: .55;
  background:
    repeating-radial-gradient(ellipse at 50% 100%, rgba(156,39,176,.17) 0 1px, transparent 1px 31px),
    radial-gradient(ellipse at 50% 100%, rgba(22,194,212,.09), transparent 58%);
  transform: perspective(480px) rotateX(58deg);
  transform-origin: bottom;
}

.quote-intro-shell {
  width: min(1280px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) clamp(24px, 5vw, 76px) max(28px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(400px, 1.1fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  position: relative;
}

.quote-intro-brand {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  left: clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 .78rem/1 var(--font-display);
  letter-spacing: .08em;
}

.quote-intro-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(22,194,212,.5);
  box-shadow: 0 0 25px rgba(22,194,212,.14);
}

.quote-wheel-stage {
  width: min(40vw, 490px);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
  position: relative;
  filter: drop-shadow(0 32px 60px rgba(0,0,0,.5));
}

.quote-wheel-stage::before,
.quote-wheel-stage::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.quote-wheel-stage::before {
  inset: -5%;
  border: 1px solid rgba(22,194,212,.16);
  box-shadow: inset 0 0 38px rgba(22,194,212,.07), 0 0 44px rgba(156,39,176,.13);
}

.quote-wheel-stage::after {
  inset: 7%;
  border: 1px solid rgba(255,255,255,.18);
  z-index: 2;
}

.quote-wheel-pointer {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: -3px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-right: 0;
  border-left: 27px solid var(--cyan);
  transform: translateY(-50%) rotate(180deg);
  filter: drop-shadow(0 0 10px rgba(22,194,212,.75));
}

.quote-wheel {
  --wheel-rotation: 0deg;
  width: 88%;
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -15deg, rgba(255,255,255,.19) 0 .55deg, transparent .55deg 60deg),
    conic-gradient(from -15deg,
      #73118a 0 60deg,
      #123b66 60deg 120deg,
      #a529b8 120deg 180deg,
      #0d7080 180deg 240deg,
      #511064 240deg 300deg,
      #146577 300deg 360deg);
  border: 1px solid rgba(255,255,255,.26);
  box-shadow:
    inset 0 0 70px rgba(0,0,0,.45),
    inset 0 0 20px rgba(255,255,255,.08),
    0 0 45px rgba(156,39,176,.2);
  transform: rotate(var(--wheel-rotation));
  transition: transform 3.35s cubic-bezier(.12,.68,.08,1);
  will-change: transform;
}

.quote-wheel.is-spinning {
  box-shadow:
    inset 0 0 70px rgba(0,0,0,.36),
    inset 0 0 24px rgba(255,255,255,.12),
    0 0 68px rgba(156,39,176,.32),
    0 0 36px rgba(22,194,212,.18);
}

.quote-wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  text-align: right;
  transform-origin: 0 50%;
  font: 600 clamp(.42rem, .65vw, .58rem)/1 var(--font-mono);
  letter-spacing: .12em;
  color: rgba(255,255,255,.76);
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

.quote-wheel-label-1 { transform: rotate(0deg) translateX(30%); }
.quote-wheel-label-2 { transform: rotate(60deg) translateX(30%); }
.quote-wheel-label-3 { transform: rotate(120deg) translateX(30%); }
.quote-wheel-label-4 { transform: rotate(180deg) translateX(30%); }
.quote-wheel-label-5 { transform: rotate(240deg) translateX(30%); }
.quote-wheel-label-6 { transform: rotate(300deg) translateX(30%); }

.quote-wheel-core {
  position: absolute;
  inset: 35%;
  z-index: 3;
  padding: 5px;
  border: 1px solid rgba(22,194,212,.65);
  border-radius: 50%;
  background: #071127;
  box-shadow: 0 0 32px rgba(22,194,212,.27), 0 0 0 10px rgba(4,10,24,.4);
  transform: rotate(var(--core-rotation, 0deg));
  transition: transform 3.35s cubic-bezier(.12,.68,.08,1);
}

.quote-wheel-core img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.quote-intro-content {
  max-width: 620px;
  padding-top: 44px;
}

.quote-intro-eyebrow,
.quote-intro-status,
.quote-intro-count {
  font-family: var(--font-mono);
  letter-spacing: .23em;
  text-transform: uppercase;
}

.quote-intro-eyebrow {
  margin-bottom: 20px;
  color: var(--cyan);
  font-size: .65rem;
}

.quote-intro-content h1 {
  font: 700 clamp(2.4rem, 5.1vw, 5.5rem)/.98 var(--font-display);
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.quote-intro-content h1 em {
  color: var(--mint);
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: none;
  text-shadow: 0 0 36px rgba(156,39,176,.3);
}

.quote-intro-copy {
  max-width: 42ch;
  margin-top: 24px;
  color: var(--ink-dim);
  font-size: clamp(.98rem, 1.4vw, 1.12rem);
}

.quote-result {
  max-width: 620px;
  margin: 24px 0 10px;
  padding: 12px 0 16px 26px;
  position: relative;
  border-left: 1px solid rgba(22,194,212,.55);
  animation: quote-result-in .75s var(--ease-out) both;
}

.quote-result[hidden] { display: none; }

.quote-result-mark {
  position: absolute;
  top: -18px;
  left: 18px;
  color: rgba(156,39,176,.42);
  font: 400 5rem/1 var(--font-serif);
  pointer-events: none;
}

.quote-result blockquote {
  position: relative;
  z-index: 1;
  white-space: pre-line;
  font: 400 clamp(1.25rem, 2.1vw, 1.8rem)/1.34 var(--font-serif);
  color: var(--ink);
}

.quote-result p {
  margin-top: 13px;
  color: var(--cyan);
  font: 600 .62rem/1 var(--font-mono);
  letter-spacing: .22em;
}

.quote-intro-status {
  min-height: 1em;
  margin-top: 26px;
  color: var(--ink-faint);
  font-size: .58rem;
}

.quote-intro-action {
  width: min(100%, 390px);
  min-height: 58px;
  margin-top: 14px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(156,39,176,.8);
  border-radius: 2px;
  background: linear-gradient(115deg, #7b168e, #b72ac5);
  color: #fff;
  font: 700 .72rem/1 var(--font-mono);
  letter-spacing: .2em;
  text-align: left;
  box-shadow: 0 0 0 rgba(156,39,176,0);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}

.quote-intro-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(156,39,176,.3);
  border-color: rgba(22,194,212,.72);
}

.quote-intro-action:active:not(:disabled) { transform: scale(.985); }
.quote-intro-action:disabled { cursor: wait; opacity: .68; }
.quote-intro-action[hidden] { display: none; }

.quote-intro-continue {
  background: transparent;
  border-color: rgba(22,194,212,.62);
}

.quote-intro-count {
  margin-top: 15px;
  color: var(--ink-faint);
  font-size: .52rem;
}

.quote-intro :focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

@keyframes quote-result-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
  .quote-intro-shell {
    grid-template-columns: 1fr;
    align-content: start;
    justify-items: center;
    gap: 18px;
    padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  }

  .quote-intro-brand {
    position: static;
    justify-self: start;
    width: 100%;
  }

  .quote-intro-brand img { width: 38px; height: 38px; }

  .quote-wheel-stage {
    width: min(67vw, 290px);
    margin-top: 2px;
  }

  .quote-wheel-pointer { right: -1px; border-top-width: 10px; border-bottom-width: 10px; border-left-width: 21px; }

  .quote-intro-content {
    width: 100%;
    max-width: 540px;
    padding-top: 0;
    text-align: center;
  }

  .quote-intro-eyebrow { margin-bottom: 10px; font-size: .55rem; }
  .quote-intro-content h1 { font-size: clamp(1.7rem, 8vw, 2.65rem); line-height: 1.02; }
  .quote-intro-copy { margin: 12px auto 0; font-size: .9rem; }
  .quote-result { margin: 14px auto 0; padding: 7px 12px 10px; border-left: 0; border-top: 1px solid rgba(22,194,212,.42); }
  .quote-result-mark { display: none; }
  .quote-result blockquote { font-size: clamp(1.1rem, 5vw, 1.4rem); line-height: 1.28; }
  .quote-result p { margin-top: 10px; }
  .quote-intro-status { margin-top: 12px; }
  .quote-intro-action { width: 100%; min-height: 54px; margin-top: 10px; }
  .quote-intro-count { margin-top: 10px; font-size: .45rem; }
}

@media (max-width: 390px) and (max-height: 760px) {
  .quote-wheel-stage { width: min(54vw, 220px); }
  .quote-intro-shell { gap: 10px; }
  .quote-intro-brand img { width: 34px; height: 34px; }
  .quote-intro-content h1 { font-size: 1.62rem; }
  .quote-intro-copy { font-size: .82rem; }
  .quote-result blockquote { font-size: 1.04rem; }
  .quote-intro-status { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-intro,
  .quote-wheel,
  .quote-wheel-core,
  .quote-result,
  .quote-intro-action { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
