/* ============================================
   Tea With Clara — Nostalgic CSS
   Mood: 1950s café, warm gold, soft shadows
   ============================================ */

:root {
  --gold:       #C9A84C;
  --gold-light: #E8D5A3;
  --cream:      #FAF6EE;
  --warm-brown: #6B4C2A;
  --text-dark:  #3A2A1A;
  --text-soft:  #7A6A5A;
  --red-dress:  #8B2635;
  --shadow:     rgba(58, 42, 26, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 38, 53, 0.05) 0%, transparent 50%);
  font-family: 'Assistant', sans-serif;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- AI Disclosure ---- */
.disclosure {
  width: 100%;
  background: rgba(201, 168, 76, 0.12);
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ---- Main Layout ---- */
.experience {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 32px;
  max-width: 600px;
  width: 100%;
}

/* ---- Clara's Café Frame ---- */
.cafe-frame {
  position: relative;
  width: 280px;
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 8px 32px var(--shadow),
    0 2px 8px rgba(201, 168, 76, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.6);
  border: 2px solid rgba(201, 168, 76, 0.25);
  background: linear-gradient(160deg, #D4B896 0%, #B8956A 100%);
}

/* Vintage vignette overlay */
.cafe-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(58,42,26,0.25) 100%);
  pointer-events: none;
  z-index: 2;
}

.avatar-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.clara-image,
#clara-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Warm film filter */
  filter: sepia(15%) saturate(90%) brightness(105%);
}

.tea-cup-decoration {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ---- Listening Indicator ---- */
.listening-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  z-index: 4;
}

.listening-indicator span {
  display: block;
  width: 4px;
  background: var(--gold);
  border-radius: 2px;
  animation: wavebar 1.2s ease-in-out infinite;
}

.listening-indicator span:nth-child(1) { height: 8px;  animation-delay: 0s;    }
.listening-indicator span:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.listening-indicator span:nth-child(3) { height: 10px; animation-delay: 0.3s;  }

@keyframes wavebar {
  0%, 100% { transform: scaleY(1);   opacity: 0.6; }
  50%       { transform: scaleY(1.8); opacity: 1;   }
}

/* ---- Speech Bubble ---- */
.speech-bubble {
  background: white;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid rgba(201, 168, 76, 0.2);
  max-width: 340px;
  width: 100%;
  position: relative;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-bottom-color: rgba(201, 168, 76, 0.2);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-bottom-color: white;
}

#clara-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-dark);
  text-align: center;
  font-style: italic;
}

/* ---- Controls ---- */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-start {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--red-dress), #A83040);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px 36px;
  font-size: 18px;
  font-family: 'Playfair Display', serif;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(139, 38, 53, 0.35);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139, 38, 53, 0.45);
}

.btn-start:active {
  transform: translateY(0);
}

.btn-icon { font-size: 22px; }

.btn-mic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: white;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow);
  transition: all 0.2s ease;
}

.btn-mic:hover        { background: var(--gold-light); transform: scale(1.05); }
.btn-mic.listening    { background: var(--gold); border-color: var(--warm-brown); animation: pulse 1.5s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}

.btn-end {
  background: transparent;
  border: 1px solid rgba(122, 106, 90, 0.3);
  color: var(--text-soft);
  border-radius: 24px;
  padding: 8px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-end:hover {
  border-color: var(--text-soft);
  color: var(--text-dark);
}

.status-text {
  font-size: 14px;
  color: var(--text-soft);
  min-height: 20px;
  text-align: center;
  font-weight: 300;
}

/* ---- Tablet / Desktop ---- */
@media (min-width: 640px) {
  .experience {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 48px;
    padding: 48px 32px;
    max-width: 900px;
  }

  .clara-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .cafe-frame {
    width: 320px;
    height: 380px;
  }

  .speech-bubble {
    max-width: 300px;
  }

  .controls {
    padding-top: 80px;
  }
}

/* ---- Fade-in animation ---- */
.experience {
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
