/* Call page. The preview copies the ChairAutopilot V4 booking page look (routes/booking-v4.js V4_CSS,
   mobile rules) read-only: dark #1B1D21, Cormorant Garamond wordmark, Inter text, white service cards. */
:root {
  --bg: #1B1D21; --surface: #24262B; --surface-2: #2C2E32; --text: #FFFFFF;
  --muted: rgba(255,255,255,0.6); --faint: rgba(255,255,255,0.35); --line: rgba(255,255,255,0.15);
  --accent: #FFFFFF; --danger: #E5484D; --ok: #3DD68C;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body { font-family: 'Inter', system-ui, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button { font: inherit; }

.layout { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; min-height: 100vh; }
.panel { min-width: 0; }

/* ---- call side ---- */
.call { padding: 40px 32px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--line); }
.brand { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 18px; letter-spacing: 3px; text-transform: uppercase; }
.call-title { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 34px; line-height: 1.15; letter-spacing: 0.5px; }
.call-sub { color: var(--muted); font-size: 14px; line-height: 1.6; font-weight: 300; }
.status { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status[data-state="connecting"]::before { background: #F5D90A; }
.status[data-state="live"]::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(61,214,140,0.18); }
.status[data-state="speaking"]::before { background: var(--ok); box-shadow: 0 0 0 7px rgba(61,214,140,0.25); }
.status[data-state="error"]::before, .status[data-state="busy"]::before { background: var(--danger); }

.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border: 1px solid rgba(255,255,255,0.6); background: transparent; color: var(--text); padding: 16px 28px;
  font-weight: 400; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; border-radius: 0;
  min-height: 48px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: rgba(255,255,255,0.1); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-start { background: #FFFFFF; color: #1B1D21; border-color: #FFFFFF; flex: 1 1 100%; }
.btn-start:hover { background: rgba(255,255,255,0.85); }
.btn-ghost[aria-pressed="true"] { background: rgba(255,255,255,0.14); }
.btn-end { border-color: var(--danger); color: #FFB4B6; }
.btn-ghost, .btn-end { flex: 1 1 0; }

.notice { border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; font-size: 14px; line-height: 1.6; }
.notice strong { display: block; margin-bottom: 6px; font-weight: 500; }
.notice ol { margin: 8px 0 0 18px; }
.notice[data-kind="error"] { border-color: rgba(229,72,77,0.6); }

.caption-wrap { border-top: 1px solid var(--line); padding-top: 16px; }
.caption-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.caption { font-size: 17px; line-height: 1.55; min-height: 5.5em; max-height: 14em; overflow-y: auto; font-weight: 300; }
.caption-empty { color: var(--faint); font-size: 14px; }
.caption .turn { margin-bottom: 10px; }
.caption .turn.old { color: var(--muted); font-size: 14px; }
.caption .rest { color: var(--faint); }
.fineprint { color: var(--faint); font-size: 12px; line-height: 1.5; margin-top: auto; }

/* ---- preview side (V4 look, phone-width layout) ---- */
.preview-panel { padding: 24px; background: #111215; display: flex; flex-direction: column; align-items: center; }
.preview-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; align-self: stretch; text-align: center; }
.preview { width: 100%; max-width: 430px; background: #1B1D21; border: 1px solid var(--line); overflow: hidden; position: relative; }
.v4-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.v4-nav-logo { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 18px; letter-spacing: 3.05px; color: #FFFFFF; text-transform: uppercase; transition: opacity .3s; overflow-wrap: anywhere; }
.v4-nav-logo[data-empty="1"] { opacity: 0.45; }
.v4-nav-logo.flash { animation: flash 1.2s ease; }
.v4-hamburger { display: flex; flex-direction: column; gap: 5px; padding: 4px; }
.v4-hamburger span { display: block; width: 22px; height: 1px; background: #FFFFFF; }
.v4-hero { position: relative; height: 420px; display: flex; align-items: center; justify-content: center;
  background-color: #1B1D21; background-image: url('/static/hero.webp'); background-size: cover; background-position: 60% 35%; background-repeat: no-repeat; overflow: hidden; }
.v4-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.45) 100%); pointer-events: none; }
.v4-hero-content { position: relative; z-index: 2; text-align: center; }
.v4-hero-book-btn { display: inline-block; border: 1px solid rgba(255,255,255,0.6); color: #FFFFFF; font-weight: 300; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; padding: 16px 56px; }
.v4-hero-powered { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 2.5px; color: rgba(255,255,255,0.6); text-transform: uppercase; font-weight: 300; white-space: nowrap; z-index: 2; }
.v4-services { background: #1B1D21; padding: 56px 0 64px; }
.v4-section-title { font-weight: 300; font-size: 11px; letter-spacing: 5px; text-transform: uppercase; color: rgba(255,255,255,0.6); text-align: center; margin-bottom: 40px; }
.v4-service-list { display: flex; flex-direction: column; gap: 2px; }
.v4-service-card { display: flex; flex-direction: column; }
.v4-service-card.new { animation: rise .5s ease; }
.v4-service-info { background: #FFFFFF; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.v4-service-name { font-weight: 500; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: #1a1a1a; overflow-wrap: anywhere; }
.v4-service-meta { font-size: 13px; color: #1a1a1a; font-weight: 400; }
.v4-service-meta span { color: #999; margin: 0 8px; }
.v4-select-btn { background: #2C2E32; color: #FFFFFF; padding: 13px 28px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; text-align: center; }
.pv-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 28px 24px; border: 1px dashed var(--line); margin: 0 20px; font-weight: 300; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { opacity: .3; } 100% { opacity: 1; } }

/* ---- phones: preview stacks under the controls ---- */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .call { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 16px 24px; padding-top: max(28px, env(safe-area-inset-top)); }
  .call-title { font-size: 28px; }
  .preview-panel { padding: 20px 16px 40px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
  .v4-hero { height: 340px; }
  .fineprint { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .v4-service-card.new, .v4-nav-logo.flash { animation: none; } }
