/**
 * Voice agent desk calendar — hero embed (see js/agent-calendar.js + 02-docs/…agent-ideas.md)
 */

.agent-cal-aside {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.agent-cal-aside__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin: 0;
}

.agent-cal-aside__note {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.agent-cal-aside__note a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(234, 88, 12, 0.35);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.agent-cal-aside__note a:hover {
  color: var(--accent-3);
  border-bottom-color: rgba(251, 146, 60, 0.55);
}

/* ---- Frame (chassis + binding + shimmer) ---- */
.agent-cal-frame {
  position: relative;
  padding: clamp(10px, 2vw, 15px);
  border-radius: calc(var(--radius-lg) + 8px);
  background:
    linear-gradient(145deg, rgba(234, 88, 12, 0.07) 0%, transparent 42%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, transparent 38%),
    linear-gradient(180deg, #0c0a09 0%, #040303 100%);
  border: 1px solid rgba(234, 88, 12, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 28px 72px rgba(0, 0, 0, 0.5),
    0 0 60px -20px rgba(234, 88, 12, 0.12);
  overflow: hidden;
}

.agent-cal-frame::before {
  content: "";
  position: absolute;
  inset-inline: clamp(16%, 28%, 36%);
  top: -5px;
  height: 13px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.55), rgba(154, 52, 18, 0.4));
  box-shadow:
    0 2px 10px rgba(234, 88, 12, 0.35),
    inset 0 1px 0 rgba(255, 248, 240, 0.2);
  pointer-events: none;
  z-index: 2;
}

.agent-cal-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.04) 52%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: agent-cal-shimmer 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
  opacity: 0.45;
  mix-blend-mode: overlay;
}

@keyframes agent-cal-shimmer {
  0%,
  100% {
    background-position: 120% 0;
  }

  50% {
    background-position: -20% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-cal-frame::after {
    animation: none;
    opacity: 0.2;
  }
}

.agent-cal-flip-wrap {
  position: relative;
  z-index: 4;
  perspective: 1280px;
  perspective-origin: 50% 18%;
}

.agent-cal-stage {
  position: relative;
  border-radius: var(--radius-lg);
  height: min(clamp(296px, 39vh, 402px), 54vh);
  height: min(clamp(296px, 39vh, 402px), 54dvh);
}

.agent-cal-pivot {
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  will-change: transform;
  height: 100%;
}

.agent-cal-sheet {
  position: relative;
  border-radius: var(--radius-lg);
  height: 100%;
  background:
    radial-gradient(ellipse 95% 55% at 50% 0%, rgba(234, 88, 12, 0.09), transparent 55%),
    linear-gradient(175deg, rgba(255, 252, 250, 0.03) 0%, transparent 45%),
    linear-gradient(180deg, #141110 0%, #070605 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -28px 56px rgba(0, 0, 0, 0.38),
    0 20px 48px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.agent-cal-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(251, 146, 60, 0.06), transparent 42%);
  pointer-events: none;
}

.agent-cal-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -9deg,
    transparent,
    transparent 15px,
    rgba(255, 255, 255, 0.01) 15px,
    rgba(255, 255, 255, 0.01) 16px
  );
  pointer-events: none;
  opacity: 0.55;
}

.agent-cal-sheet-inner {
  position: relative;
  z-index: 2;
  padding: clamp(0.94rem, 2.6vw, 1.42rem) clamp(1rem, 2.8vw, 1.5rem) clamp(1rem, 2.6vw, 1.35rem);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.agent-cal-sheet-inner::-webkit-scrollbar {
  width: 6px;
}

.agent-cal-sheet-inner::-webkit-scrollbar-thumb {
  background: rgba(234, 88, 12, 0.28);
  border-radius: 99px;
}

.agent-cal-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  flex-shrink: 0;
}

.agent-cal-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  margin: 0;
  border: 1px solid rgba(234, 88, 12, 0.28);
  background: rgba(194, 65, 12, 0.1);
  color: rgba(254, 215, 170, 0.95);
}

.agent-cal-badge--enterprise {
  border-color: rgba(251, 146, 60, 0.32);
  background: rgba(251, 146, 60, 0.08);
  color: rgba(253, 230, 206, 0.98);
}

.agent-cal-badge--personal {
  border-color: rgba(251, 113, 60, 0.25);
}

.agent-cal-codename {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.agent-cal-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.35vw, 1.35rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text-primary);
  flex-shrink: 0;
}

.agent-cal-summary {
  margin: 0;
  font-size: 0.835rem;
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 52ch;
  flex-shrink: 0;
}

.agent-cal-features {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 2px;
  display: grid;
  gap: 0.42rem;
  flex-shrink: 0;
}

.agent-cal-features li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.746rem;
  line-height: 1.55;
  color: rgba(212, 208, 204, 0.9);
}

.agent-cal-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-bright));
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.38);
}

/* Toolbar */
/* Toolbar stays above frame decorative layers */
.agent-cal-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.agent-cal-counter {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.agent-cal-counter strong {
  color: var(--accent-3);
  font-weight: 700;
}

.agent-cal-progress {
  flex: 1;
  min-width: 100px;
  height: 3px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  --agent-cal-p: 0.1;
}

.agent-cal-progress-bar {
  display: block;
  height: 100%;
  width: calc(var(--agent-cal-p, 0.1) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-bright) 55%, var(--accent-3));
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.35);
  transition: width 0.52s var(--ease-out-expo);
}

.agent-cal-navgrp {
  display: flex;
  align-items: center;
  gap: 7px;
}

.agent-cal-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(234, 88, 12, 0.32);
  background: rgba(6, 5, 4, 0.75);
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.agent-cal-btn:hover {
  border-color: rgba(251, 146, 60, 0.55);
  background: rgba(234, 88, 12, 0.12);
  transform: translateY(-1px);
}

.agent-cal-btn:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.agent-cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 188px;
}

.agent-cal-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition:
    transform 0.22s var(--ease-out-expo),
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.agent-cal-dot:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.14);
}

.agent-cal-dot.is-active {
  background: linear-gradient(180deg, var(--accent-3), var(--accent-bright));
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.45);
}

/* Reduced motion stack */
.agent-cal-static {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: min(58vh, 498px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.agent-cal-static::-webkit-scrollbar {
  width: 5px;
}

.agent-cal-static::-webkit-scrollbar-thumb {
  background: rgba(234, 88, 12, 0.25);
  border-radius: 99px;
}

.agent-cal-static-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(12, 10, 9, 0.65);
  backdrop-filter: blur(12px);
}

.agent-cal-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0.25rem 0 0.35rem;
  letter-spacing: -0.02em;
}

.agent-cal--reduced .agent-cal-toolbar {
  display: none;
}

.agent-cal--reduced .agent-cal-progress {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .agent-cal-progress {
    display: none;
  }
}

/* ----- AI Voice Studio (Solutions): dual calendars ----- */
.voice-studios-block {
  margin-top: var(--space-xl, 2rem);
}

.voice-studios-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .voice-studios-grid {
    grid-template-columns: 1fr;
  }
}

.voice-studio-branch {
  min-width: 0;
}

.voice-studio-branch__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin: 0 0 0.35rem;
}

.voice-studio-branch__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.voice-studio-branch__lede {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.62;
  font-size: 0.9rem;
  max-width: 56ch;
}

.voice-studio-branch__lede--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.38em;
  line-height: 1.5;
  max-width: none;
}

.voice-studio-branch__lede-line {
  display: block;
}

@media (min-width: 981px) {
  .voice-studio-branch .voice-studio-branch__lede-line {
    white-space: nowrap;
  }
}

.voice-studios-studio {
  min-width: 0;
}

/* Fade-swap calendars: no 3D sheet edge (looked blank mid-flip) + clearer type */
.voice-studios-studio .agent-cal-flip-wrap {
  perspective: none;
}

.voice-studios-studio .agent-cal-pivot {
  transform: none !important;
  transform-style: flat;
}

.voice-studios-studio .agent-cal-sheet {
  overflow: visible;
  backface-visibility: visible;
}

.voice-studios-studio .agent-cal-summary {
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.62;
}

.voice-studios-studio .agent-cal-features li {
  font-size: 0.782rem;
  line-height: 1.52;
}

/* Taller stage + full-width summary so richer copy is visible, not “blank” */
.agent-cal-stage--studio-block {
  height: min(clamp(400px, 50vh, 520px), 65dvh);
}

.voice-studios-studio .agent-cal-dots {
  max-width: min(312px, 78vw);
  gap: 4px;
}

.voice-studios-studio .agent-cal-dot {
  width: 6px;
  height: 6px;
}

.voice-studios-studio.agent-cal--reduced .agent-cal-static {
  max-height: min(62vh, 560px);
}
