/* iSpeakSpokeSpoken English Test — custom styles */

:root {
  --coral: #d75858;
  --coral-dark: #bf4646;
  --purple: #7a68bd;
  --purple-dark: #5b4ea3;
  --amber: #fcbb00;
  --ink: #1a1a1a;
  --cream: #faf7f3;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "ss01", "cv11"; }

/* Layered, color-tinted shadows (anti-generic per CLAUDE.md) */
.card-shadow {
  box-shadow:
    0 1px 0 0 rgba(26, 26, 26, 0.04),
    0 4px 12px -4px rgba(122, 104, 189, 0.08),
    0 16px 32px -16px rgba(26, 26, 26, 0.10);
}
.card-shadow-lg {
  box-shadow:
    0 1px 0 0 rgba(26, 26, 26, 0.04),
    0 8px 24px -8px rgba(215, 88, 88, 0.18),
    0 32px 64px -24px rgba(26, 26, 26, 0.18);
}

/* Brand gradient: layered radial purples + coral undertone (anti-generic) */
.brand-grad {
  background:
    radial-gradient(circle at 12% 14%, rgba(252, 187, 0, 0.35), transparent 45%),
    radial-gradient(circle at 88% 86%, rgba(215, 88, 88, 0.55), transparent 50%),
    linear-gradient(135deg, #7a68bd 0%, #5b4ea3 100%);
}

/* Tighter heading rhythm */
.font-display {
  letter-spacing: -0.025em;
}

/* Body line-height for readability */
body, p, li {
  line-height: 1.65;
}

/* Focus ring — keyboard accessibility */
.focus-ring:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Voice activity orb */
.orb {
  position: relative;
  width: 220px; height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0) 60%),
    radial-gradient(circle at 70% 70%, rgba(252, 187, 0, 0.55), transparent 50%),
    linear-gradient(135deg, #7a68bd 0%, #d75858 100%);
  box-shadow:
    0 24px 48px -16px rgba(122, 104, 189, 0.55),
    0 8px 16px -8px rgba(215, 88, 88, 0.45),
    inset 0 -8px 16px rgba(0, 0, 0, 0.18),
    inset 0 8px 16px rgba(255, 255, 255, 0.4);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.orb.is-listening { transform: scale(1.04); }
.orb.is-speaking  { transform: scale(1.10); }
.orb.is-idle      { transform: scale(0.96); opacity: 0.7; }
.orb-pulse, .orb-pulse-2 {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(215, 88, 88, 0.35);
  animation: pulse 2.4s ease-out infinite;
}
.orb-pulse-2 { animation-delay: 1.2s; border-color: rgba(122, 104, 189, 0.35); }
@keyframes pulse {
  0%   { transform: scale(0.95); opacity: 0.55; }
  70%  { transform: scale(1.30); opacity: 0; }
  100% { transform: scale(1.30); opacity: 0; }
}
.orb.is-idle .orb-pulse, .orb.is-idle .orb-pulse-2 { animation-play-state: paused; opacity: 0; }

/* Transcript bubbles */
.t-bubble {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
}
.t-bubble.you { background: rgba(215, 88, 88, 0.06); border-left: 3px solid var(--coral); }
.t-bubble.ai  { background: rgba(122, 104, 189, 0.06); border-left: 3px solid var(--purple); }

/* CEFR badge */
.cefr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem; height: 5.5rem;
  border-radius: 1.25rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
  color: white;
  box-shadow: 0 12px 24px -8px currentColor;
}
.cefr-A1, .cefr-A2 { background: linear-gradient(135deg, #fcbb00, #f59e0b); color: #fcbb00; }
.cefr-B1          { background: linear-gradient(135deg, #d75858, #f97316); color: #d75858; }
.cefr-B2          { background: linear-gradient(135deg, #d75858, #7a68bd); color: #d75858; }
.cefr-C1          { background: linear-gradient(135deg, #7a68bd, #5b4ea3); color: #7a68bd; }
.cefr-C2          { background: linear-gradient(135deg, #5b4ea3, #1e1b4b); color: #5b4ea3; }
.cefr-A1 span, .cefr-A2 span, .cefr-B1 span, .cefr-B2 span, .cefr-C1 span, .cefr-C2 span { color: white; }

/* Score bars */
.score-bar { background: rgba(26, 26, 26, 0.06); height: 0.5rem; border-radius: 999px; overflow: hidden; }
.score-bar-fill { height: 100%; background: linear-gradient(90deg, var(--coral), var(--purple)); border-radius: 999px; transition: width 800ms cubic-bezier(0.16, 1, 0.3, 1); }

/* Print styles */
@media print {
  header, footer, button { display: none !important; }
  body { background: white; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .orb, .orb-pulse, .orb-pulse-2, .score-bar-fill { animation: none !important; transition: none !important; }
}
