/* =========================================================================
   ASC Voice Agent — Styles
   Color: Dark Navy (#0f1923), Gold Accent (#c9a84c), White (#f8f9fa)
   Font: Plus Jakarta Sans
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f1923;
  --navy-light: #1a2a3a;
  --navy-mid: #152231;
  --gold: #c9a84c;
  --gold-light: #e0c76e;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --white: #f8f9fa;
  --gray: #8899aa;
  --gray-light: #c0cdd8;
  --text: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.header-logo span { color: var(--gold); }

.header-tagline {
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p {
  font-size: 1.1rem;
  color: var(--gray-light);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-cta:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
}

/* --- Services --- */
.services {
  padding: 3rem 2rem 5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.services-title {
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--navy-light);
  border: 1px solid rgba(201, 168, 76, 0.08);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity 0.25s;
}

.service-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.service-icon svg { width: 24px; height: 24px; }

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.65;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(201, 168, 76, 0.08);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--gray);
  font-size: 0.8rem;
}

.footer a { color: var(--gold); }

/* =========================================================================
   Voice Widget
   ========================================================================= */

#voice-widget-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

/* --- Controls row --- */
.vw-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Status badge --- */
.vw-status {
  background: var(--navy-mid);
  color: var(--gray-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

/* --- Mic Button --- */
.vw-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
  transition: all 0.2s;
  position: relative;
}

.vw-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.45);
}

.vw-btn svg { width: 24px; height: 24px; }

/* Connecting — spinner */
.vw-btn--connecting {
  background: var(--navy-light);
  color: var(--gold);
  border: 2px solid var(--gold);
  animation: vw-spin 1.2s linear infinite;
}

@keyframes vw-spin {
  100% { transform: rotate(360deg); }
}

/* Active (listening) — pulse */
.vw-btn--active {
  background: var(--gold);
  animation: vw-pulse 2s ease-in-out infinite;
}

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

/* Speaking — double pulse */
.vw-btn--speaking {
  animation: vw-speak 1s ease-in-out infinite;
}

@keyframes vw-speak {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4), 0 0 0 0 rgba(201, 168, 76, 0.2); }
  50% { box-shadow: 0 0 0 10px rgba(201, 168, 76, 0), 0 0 0 20px rgba(201, 168, 76, 0); }
}

/* --- Transcript Panel --- */
.vw-transcript-panel {
  width: 320px;
  max-height: 300px;
  background: var(--navy-mid);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vw-transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}

.vw-transcript-close {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

.vw-transcript-close:hover { color: var(--white); }

.vw-transcript-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vw-msg {
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  max-width: 85%;
  word-wrap: break-word;
}

.vw-msg--user {
  background: var(--gold-dim);
  color: var(--gold-light);
  align-self: flex-end;
  text-align: right;
}

.vw-msg--agent {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  align-self: flex-start;
}

/* --- DSGVO Consent Dialog --- */
.vw-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.vw-consent-dialog {
  background: var(--navy-light);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow);
}

.vw-consent-dialog h3 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.vw-consent-dialog p {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.vw-consent-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.vw-consent-accept {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.vw-consent-accept:hover { background: var(--gold-light); }

.vw-consent-decline {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: transparent;
  color: var(--gray);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.vw-consent-decline:hover {
  border-color: rgba(201, 168, 76, 0.4);
  color: var(--white);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .header { padding: 1rem 1.25rem; }
  .header-tagline { display: none; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .services { padding: 2rem 1.25rem 3rem; }
  .vw-transcript-panel { width: 280px; max-height: 250px; }
  #voice-widget-container { bottom: 1rem; right: 1rem; }
}

/* --- Scrollbar --- */
.vw-transcript-body::-webkit-scrollbar { width: 4px; }
.vw-transcript-body::-webkit-scrollbar-track { background: transparent; }
.vw-transcript-body::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, 0.2); border-radius: 2px; }
