/* ASKAI locked plate. 390×844 artboard. The viewport only scales the whole picture. */

:root {
  --art-w: 390;
  --art-h: 844;
  --ink: #2a261f;
  --ink-soft: #4a453c;
  --ivory: #f4eadb;
  --stone: #eee5d7;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --chatgpt: #2f8a7d;
  --claude: #c7783f;
  --gemini-a: #5a8ee8;
  --gemini-b: #8b74dc;
  --perplexity: #3c93a3;
  color: var(--ink);
  background: var(--stone);
  color-scheme: light;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e8dccb;
  direction: ltr;
}
html[dir="rtl"] {
  direction: ltr;
}
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid #8a7340; outline-offset: 4px; }

.stage-wrap {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e8dccb;
  direction: ltr;
  unicode-bidi: isolate;
}

.stage {
  width: 390px;
  height: 844px;
  position: relative;
  overflow: hidden;
  flex: none;
  direction: ltr;
  transform-origin: center center;
  transform: scale(min(100vw / 390px, 100svh / 844px));
}

/* --- atmosphere lives inside the plate --- */

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 82% 16%, #fff8ec 0, transparent 42%),
    linear-gradient(180deg, #e7d8c4 0%, #f3eadc 38%, #e8dccb 100%);
}

.atmosphere-photo {
  position: absolute;
  inset: 0;
  background: url("background.jpg") center top / cover no-repeat;
}

.atmosphere-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247, 239, 226, 0.42) 0%, rgba(247, 239, 226, 0.16) 22%, transparent 40%),
    radial-gradient(ellipse at 50% 38%, rgba(255, 250, 240, 0.28) 0%, transparent 46%),
    linear-gradient(180deg, transparent 62%, rgba(238, 229, 215, 0.38) 82%, rgba(232, 221, 204, 0.62) 100%);
}

.atmosphere-stone {
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(214, 200, 178, 0.18));
}

.experience {
  position: absolute;
  inset: 0;
  z-index: 1;
  direction: ltr;
}

.brand {
  position: absolute;
  top: 32px;
  left: 0;
  width: 390px;
  text-align: center;
}

.brand p { margin: 0; }

#brand {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
}

#tagline {
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.constellation {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  width: 390px;
  height: 640px;
  border: 0;
  background: transparent;
  direction: ltr;
}

.constellation.is-choosing .question {
  opacity: 0.92;
}

.orbits {
  position: absolute;
  top: 28px;
  left: 8px;
  right: auto;
  margin: 0;
  width: 374px;
  height: 560px;
  z-index: 0;
  pointer-events: none;
  border: 0;
  background: none;
}

.orbit-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255, 252, 244, 0.7);
  border-radius: 50%;
  box-sizing: border-box;
  background: none;
}

.orbit-outer {
  width: 340px;
  height: 400px;
  transform: translate(-50%, -50%) rotate(-11deg);
}

.orbit-inner {
  width: 248px;
  height: 292px;
  transform: translate(-50%, -50%) rotate(16deg);
  border-color: rgba(255, 253, 246, 0.46);
}

.spheres {
  position: absolute;
  top: 28px;
  left: 8px;
  right: auto;
  margin: 0;
  width: 374px;
  height: 560px;
  z-index: 1;
  pointer-events: none;
}

.sphere {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff4c8 0 16%, #e3b453 42%, #b07a22 76%, #7a5314 100%);
  box-shadow: 0 2px 5px rgba(90, 62, 18, 0.28), inset 0 -2px 3px rgba(80, 48, 8, 0.28);
  offset-anchor: 50% 50%;
}

.sphere-a { offset-path: ellipse(170px 200px at 187px 280px); animation: orbit-a 28s linear 800ms infinite; }
.sphere-b { offset-path: ellipse(170px 200px at 187px 280px); animation: orbit-b 34s linear 900ms infinite; }
.sphere-c { offset-path: ellipse(124px 146px at 187px 280px); animation: orbit-c 22s linear 850ms infinite; }
.sphere-d { offset-path: ellipse(124px 146px at 187px 280px); animation: orbit-d 31s linear 950ms infinite; }

@keyframes orbit-a { from { offset-distance: 8%; } to { offset-distance: 108%; } }
@keyframes orbit-b { from { offset-distance: 58%; } to { offset-distance: 158%; } }
@keyframes orbit-c { from { offset-distance: 78%; } to { offset-distance: 178%; } }
@keyframes orbit-d { from { offset-distance: 28%; } to { offset-distance: 128%; } }

@supports not (offset-path: ellipse(170px 200px at 187px 280px)) {
  .sphere-a { top: 36px; left: 182px; }
  .sphere-b { top: 268px; left: 346px; }
  .sphere-c { top: 508px; left: 182px; }
  .sphere-d { top: 268px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sphere { animation: none !important; }
  .sphere-a { top: 36px; left: 182px; }
  .sphere-b { top: 268px; left: 346px; }
  .sphere-c { top: 508px; left: 182px; }
  .sphere-d { top: 268px; left: 18px; }
  .sphere-card-a { top: -8px; left: 155px; }
  .sphere-card-b { top: 48px; left: 305px; }
  .disc img { animation: none !important; transform: none; }
  .handoff.is-visible .handoff-picto { animation: none; }
  .constellation.is-choosing .disc.is-selected,
  .constellation.is-handoff[data-handoff="claude"] .disc.is-selected,
  .constellation.is-handoff[data-handoff="gemini"] .disc.is-selected {
    transform: none;
  }
}

.cluster {
  position: absolute;
  inset: 0;
  z-index: 4;
  direction: ltr;
  unicode-bidi: isolate;
}

.question {
  position: absolute;
  top: 191px;
  left: 48px;
  right: auto;
  margin: 0;
  width: 294px;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}

.question h1 {
  margin: 0 auto;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.18;
  text-shadow: 0 1px 14px rgba(255, 248, 236, 0.72);
  direction: rtl;
  unicode-bidi: isolate;
}

.question-rule {
  display: block;
  width: 34px;
  height: 1px;
  background: #5f594e;
}

.rule-above { margin: 10px auto 14px; }
.rule-below { margin: 14px auto 10px; }

.question p,
.ask-label {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.disc {
  --rim: var(--chatgpt);
  position: absolute;
  right: auto;
  bottom: auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: visible;
  background: transparent;
  direction: ltr;
  transform: none;
  transition: filter 400ms var(--ease), opacity 400ms var(--ease), transform 400ms var(--ease);
}

.disc[data-provider="chatgpt"] { top: 78px; left: 64px; right: auto; margin: 0; }
.disc[data-provider="claude"] { top: 78px; left: 230px; right: auto; margin: 0; --rim: var(--claude); }
.disc[data-provider="gemini"] { top: 374px; left: 64px; right: auto; margin: 0; --rim: var(--gemini-a); }
.disc[data-provider="perplexity"] { top: 374px; left: 230px; right: auto; margin: 0; --rim: var(--perplexity); }

.disc img {
  display: block;
  width: 114px;
  height: 114px;
  margin: -9px;
  object-fit: contain;
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: disc-breathe 3.6s ease-in-out infinite;
}

.disc[data-provider="claude"] img { animation-duration: 4.1s; animation-delay: 0.55s; }
.disc[data-provider="gemini"] img { animation-duration: 3.3s; animation-delay: 1.1s; }
.disc[data-provider="perplexity"] img { animation-duration: 3.9s; animation-delay: 0.25s; }

@keyframes disc-breathe {
  0%, 100% {
    filter: brightness(0.94) drop-shadow(0 2px 4px rgba(70, 50, 20, 0.1));
  }
  50% {
    filter: brightness(1.1) drop-shadow(0 16px 22px rgba(70, 50, 20, 0.34));
  }
}

.disc-hit {
  position: absolute;
  inset: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  z-index: 2;
}

.disc.is-pressed img {
  animation-play-state: paused;
  filter: brightness(0.92) drop-shadow(0 2px 4px rgba(70, 50, 20, 0.12));
}

@media (hover: hover) and (pointer: fine) {
  .disc:hover { filter: brightness(1.06); }
}

.constellation.is-choosing .disc:not(.is-selected) {
  opacity: 0.26;
  filter: saturate(0.4) brightness(1.08);
}

.constellation.is-choosing .disc:not(.is-selected) img {
  animation-play-state: paused;
}

.constellation.is-choosing .disc.is-selected {
  z-index: 6;
  opacity: 1;
  transform: scale(1.04);
  filter: brightness(1.14);
}

.constellation.is-handoff[data-handoff="claude"] .disc.is-selected {
  transform: scale(1.04) translate(-3px, 3px);
}

.constellation.is-handoff[data-handoff="gemini"] .disc.is-selected {
  transform: scale(1.04) translate(3px, -3px);
}

.constellation.is-handoff .orbit-ring {
  border-color: rgba(255, 252, 244, 0.95);
}

.constellation.is-handoff[data-handoff="claude"] .sphere-b {
  animation-duration: 12s;
}

.constellation.is-handoff[data-handoff="gemini"] .sphere-d {
  animation-duration: 12s;
}

.handoff {
  --rim: var(--claude);
  position: absolute;
  z-index: 14;
  width: 176px;
  padding: 9px 11px 11px;
  border-radius: 20px;
  background: rgba(255, 252, 244, 0.96);
  border: 1px solid rgba(255, 250, 243, 0.95);
  box-shadow: 0 10px 24px rgba(70, 55, 30, 0.18);
  text-align: center;
  pointer-events: none;
}

.handoff[data-anchor="claude"] {
  top: 8px;
  left: 168px;
  --rim: var(--claude);
  box-shadow: 0 10px 24px rgba(70, 55, 30, 0.18), 0 0 0 1px rgba(199, 120, 63, 0.48);
}

.handoff[data-anchor="gemini"] {
  top: 452px;
  left: 12px;
  --rim: var(--gemini-a);
  box-shadow: 0 10px 24px rgba(70, 55, 30, 0.18), 0 0 0 1px rgba(90, 142, 232, 0.48);
}

.handoff-picto {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto 7px;
  object-fit: contain;
}

.handoff.is-visible .handoff-picto {
  animation: handoff-picto-in 260ms var(--ease) both;
}

@keyframes handoff-picto-in {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.handoff-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #3f6b4d;
}

.handoff-hint {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
}

.card-contacts {
  position: absolute;
  top: 502px;
  left: 50%;
  width: 318px;
  margin: 0 0 0 -159px;
  padding: 8px 22px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 8;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  overflow: visible;
}

.card-contacts::before {
  content: "";
  position: absolute;
  inset: -8px 25px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: #efe6d6;
  opacity: 0.5;
}

.sphere-card-a,
.sphere-card-b {
  z-index: 2;
  pointer-events: none;
  offset-path: ellipse(134px calc(50% + 8px) at 50% 50%);
}

.sphere-card-a { animation: orbit-a 28s linear 800ms infinite; }
.sphere-card-b { animation: orbit-b 34s linear 900ms infinite; }

@supports not (offset-path: ellipse(170px 200px at 187px 280px)) {
  .sphere-card-a { top: -8px; left: 155px; }
  .sphere-card-b { top: 48px; left: 305px; }
}

.card-contact {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 4px;
  font-size: 15.6px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.08;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.card-contact:hover,
.card-contact:focus-visible {
  color: #5a4c32;
}

.bottom-area {
  position: absolute;
  left: 0;
  bottom: 78px;
  width: 390px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 12;
  pointer-events: auto;
}

.security-badge {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 250, 243, 0.72);
  border-radius: 999px;
  background: rgba(255, 252, 241, 0.42);
  box-shadow: 0 3px 12px rgba(90, 72, 42, 0.06);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.8;
  position: relative;
  z-index: 13;
  pointer-events: auto;
  cursor: pointer;
  direction: rtl;
}

#security-text {
  direction: ltr;
  unicode-bidi: isolate;
}

.security-badge:hover { opacity: 1; }

.shield {
  display: block;
  width: 26px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(40, 36, 28, 0.28));
}

.feedback {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 150px;
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.feedback:empty { display: none; }

.copy-fallback {
  position: absolute;
  left: 15px;
  bottom: 158px;
  width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 252, 244, 0.94);
  box-shadow: 0 10px 30px rgba(70, 55, 30, 0.16);
  z-index: 8;
  text-align: center;
}

.copy-fallback p { margin: 0 0 8px; font-size: 14px; }
.copy-fallback textarea { width: 100%; font: inherit; padding: 8px; }
.copy-fallback-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.copy-fallback button,
.fallback-open {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c8b89a;
  background: #fffdf8;
  text-decoration: none;
}

.development {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 40vh;
  overflow: auto;
  margin: 0;
  padding: 20px;
  background: #fff;
  border-top: 1px solid #b6aa98;
  font: 16px / 1.5 system-ui, sans-serif;
  z-index: 20;
}

.development textarea { display: block; width: 100%; font: inherit; padding: 8px; }
.development dd { overflow-wrap: anywhere; margin: 0; }
.development dt { margin-top: 10px; font-weight: bold; }
.development button { min-height: 44px; margin: 8px; }
.noscript { text-align: center; padding: 24px; }
