/* Parla Signature: two voices, one conversation. Presentation only. */
html[data-parla-design="voice"] {
  --sig-ink: #161a2e;
  --sig-indigo: var(--parla-blue);
  --sig-indigo-deep: var(--parla-blue-hover);
  --sig-teal: var(--parla-teal);
  --sig-paper: #faf7f3;
  --sig-line: #cbc6d5;
  --sig-room-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40' fill='none' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath stroke='%23353cce' d='M3 20H14C20 20 19 8 26 8s6 24 13 24 7-12 17-12h4'/%3E%3Cpath stroke='%23006f70' d='M60 20h4c10 0 10-12 17-12s6 24 13 24 6-12 12-12h11'/%3E%3Ccircle cx='60' cy='20' r='3.5' fill='%23faf7f3' stroke='%23353cce' stroke-width='1.7'/%3E%3C/svg%3E");
  --sig-tour-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40' fill='none' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath stroke='%23353cce' d='M3 20H14C20 20 19 8 26 8s6 24 13 24 7-12 17-12h4'/%3E%3Cpath stroke='%23006f70' d='M60 20h57M60 20c23 0 29-13 46-13h11M60 20c23 0 29 13 46 13h11'/%3E%3Ccircle cx='60' cy='20' r='3.5' fill='%23faf7f3' stroke='%23353cce' stroke-width='1.7'/%3E%3C/svg%3E");
}

/* The hero stays interactive during a single decorative pass. */
html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden) {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  grid-template-areas: "copy art" "actions art" "quick art" "secondary art";
  gap: 12px clamp(22px, 5vw, 75px);
  align-items: start;
  margin: clamp(26px, 6vw, 72px) auto 0;
}
html[data-parla-design="voice"] .v2-entry-copy {
  grid-area: copy;
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
}
html[data-parla-design="voice"] .v2-entry-copy::after { content: none; }
html[data-parla-design="voice"] .v2-entry-shell .v2-conversation-preview[aria-hidden="true"] { display: none !important; }
html[data-parla-design="voice"] .v2-entry-copy h1 {
  font-size: clamp(2rem, 5.4vw, 4.5rem);
  line-height: 1.06;
  color: var(--sig-ink);
}
html[data-parla-design="voice"] .v2-entry-copy h1 .parla-home-accent { color: var(--sig-indigo-deep); }
html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden)::after {
  content: "";
  grid-area: art;
  align-self: stretch;
  min-height: 320px;
  border: 1px solid var(--sig-line);
  border-radius: clamp(20px, 3vw, 42px);
  background: url("../assets/brand/parla-voice-sculpture.webp") center 48% / 87% auto no-repeat, #faf7f3;
  pointer-events: none;
}
html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden)::before {
  content: "" !important;
  position: relative;
  grid-area: art;
  z-index: 2;
  justify-self: center;
  align-self: end;
  inset: auto;
  width: clamp(110px, 15vw, 168px);
  height: 42px;
  margin-bottom: 20px;
  opacity: 1;
  background: var(--sig-room-mark) center / contain no-repeat;
  pointer-events: none;
  mask: linear-gradient(#000 0 0) left / 51% 100% no-repeat, linear-gradient(#000 0 0) right / 51% 100% no-repeat;
  animation: parla-signature-meet 850ms cubic-bezier(.2,.65,.24,1) both;
}
@keyframes parla-signature-meet {
  from { mask-size: 18% 100%, 18% 100%; opacity: .55; }
  to { mask-size: 51% 100%, 51% 100%; opacity: 1; }
}
html[data-parla-design="voice"] body:has(#homeMotionPaused:checked) .v2-entry-shell:not(.v2-entry-hidden)::before {
  animation: none;
}
html[data-parla-design="voice"] .v2-entry-actions { grid-area: actions; grid-template-columns: 1fr; gap: 9px; }
html[data-parla-design="voice"] .v2-quick-card { grid-area: quick; }
html[data-parla-design="voice"] .v2-entry-secondary { grid-area: secondary; justify-content: flex-start; }
html[data-parla-design="voice"] :is(.v2-entry-actions, .v2-quick-card, .v2-entry-secondary) { width: 100%; max-width: none; margin: 0; }
html[data-parla-design="voice"] .v2-entry-primary { background: var(--sig-indigo) !important; border-color: var(--sig-indigo) !important; }
html[data-parla-design="voice"] .v2-entry-primary:hover:not(:disabled) { background: var(--parla-blue-hover) !important; }

/* Existing room state names are emitted by v2-functional-adapter.js. */
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State:not(.hidden) {
  grid-template-columns: 62px minmax(0, 1fr) !important;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb {
  position: relative;
  isolation: isolate;
  width: 62px !important;
  height: 36px !important;
  border: 1px solid #c3bfde;
  border-radius: 11px;
  box-shadow: none !important;
  background: #f7f5fe var(--sig-room-mark) center / 54px auto no-repeat !important;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb > span { display: none; }
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb::before { content: none !important; }
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb::after {
  content: "";
  position: absolute;
  top: calc(50% - 3px);
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sig-indigo);
  opacity: 0;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State:is([data-state="listening"], [data-state="speech"]) .room-v2-orb::after {
  left: 14%; opacity: 1; background: var(--parla-teal);
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State[data-state="translating"] .room-v2-orb::after {
  animation: parla-signature-relay 620ms ease-in-out both;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State:is([data-state="partner"], [data-state="playback"]) .room-v2-orb::after {
  left: 77%; opacity: 1; background: var(--sig-teal);
}
@keyframes parla-signature-relay {
  from { left: 14%; opacity: 1; }
  to { left: 77%; opacity: 1; background: var(--sig-teal); }
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State[data-state="error"] .room-v2-orb { background: #fff1ee var(--sig-room-mark) center / 54px auto no-repeat !important; }
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State[data-state="reconnecting"] .room-v2-orb { background: #fff6e7 var(--sig-room-mark) center / 54px auto no-repeat !important; }

/* One voice fans out in Tour. The mark is never a control or a status label. */
html[data-parla-design="voice"] :is(#tourBar:not(.hidden) .rb-main, #tourListenerView:not(.hidden) .tour-listener-toolbar > div:first-child)::after {
  content: "";
  display: inline-block;
  flex: 0 0 62px;
  vertical-align: middle;
  width: 62px;
  height: 24px;
  margin-inline-start: 8px;
  background: var(--sig-tour-mark) center / contain no-repeat;
  pointer-events: none;
}
html[data-parla-design="voice"] body:has(#tourMic.live) #tourBar:not(.hidden) .rb-main::after,
html[data-parla-design="voice"] #tourListenerView:not(.hidden):has(#tourListenerMic.live) .tour-listener-toolbar > div:first-child::after {
  mask: linear-gradient(#000 0 0) left / 51% 100% no-repeat, linear-gradient(#000 0 0) right / 51% 100% no-repeat;
  animation: parla-signature-meet 620ms ease-out both;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #stream .room-chat.b,
html[data-parla-design="voice"] body:has(#tourBar:not(.hidden)) #tourGuideFeed .mine,
html[data-parla-design="voice"] #screenTour .tour-caption.mine {
  background: var(--sig-indigo-deep) !important;
  border-color: var(--sig-indigo-deep) !important;
}
html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #stream .room-chat.a .room-message-speaker,
html[data-parla-design="voice"] body:has(#tourBar:not(.hidden)) #tourGuideFeed :not(.mine) > .tour-caption-sender,
html[data-parla-design="voice"] #screenTour .tour-caption:not(.mine) .tour-caption-sender { color: var(--parla-muted) !important; }

@media (max-width: 690px) {
  html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "art" "actions" "quick" "secondary";
    gap: 10px;
    max-width: 470px;
    margin-top: 20px;
  }
  html[data-parla-design="voice"] .v2-entry-copy { margin-bottom: 2px; }
  html[data-parla-design="voice"] .v2-entry-copy h1 { font-size: clamp(1.95rem, 8.3vw, 3.3rem); }
  html[data-parla-design="voice"] .v2-entry-copy .v2-entry-eyebrow { margin-bottom: 10px; }
  html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden)::after {
    min-height: 0;
    height: clamp(113px, 34vw, 200px);
    background-size: auto 100%;
    background-position: center top;
  }
  html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden)::before {
    width: 70px; height: 22px; justify-self: end; margin: 0 10px 6px 0;
  }
}
@media (max-width: 380px) {
  html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State:not(.hidden) {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }
  html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb {
    width: 42px !important;
    background-size: 35px auto !important;
  }
  html[data-parla-design="voice"] #tourListenerView:not(.hidden) .tour-listener-toolbar > div:first-child::after {
    display: block; margin-inline-start: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-parla-design="voice"] .v2-entry-shell:not(.v2-entry-hidden)::before,
  html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State .room-v2-orb::after,
  html[data-parla-design="voice"] :is(#tourBar:not(.hidden) .rb-main, #tourListenerView:not(.hidden) .tour-listener-toolbar > div:first-child)::after {
    animation: none !important;
  }
  html[data-parla-design="voice"] body:has(#roomBar:not(.hidden)) #roomV2State[data-state="translating"] .room-v2-orb::after {
    opacity: 1;
  }
}
