/* Visual language mirrors goairspeed.com: paper background, near-black ink,
   hairline borders, self-hosted Inter (500 for display), amber primary CTA,
   "sunrise" gradient accent, whisper-light shadows. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root {
  --paper: #FAFAF7;
  --paper-2: #F4F3EE;
  --surface: #FFFFFF;
  --ink: #0E0E0C;
  --ink-2: #3A3A37;
  --ink-3: #6A6A65;
  --ink-4: #9A9A93;
  --grey-muted: #5B5B54;
  --hair: #E7E5DE;
  --hair-2: #EFEDE6;

  --amber: #FFC267;
  --amber-hover: #F5B451;
  --amber-ink: #D08A1F;
  --green-live: #22A06B;
  --green-soft: #E8F6EC;
  --rose: #E14B4B;
  --indigo: #4F46E5;
  --indigo-soft: #EEF0FF;

  --gradient-headline: linear-gradient(90deg, #C86DD7 0%, #FF7BAC 35%, #FF8A6B 62%, #FFB86B 82%, #FFD98A 100%);

  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  --shadow-card: 0 1px 0 rgba(14,14,12,.04), 0 1px 2px rgba(14,14,12,.04);
  --shadow-soft: 0 1px 0 rgba(14,14,12,.04), 0 8px 24px -10px rgba(14,14,12,.10);
  --shadow-pop: 0 1px 0 rgba(14,14,12,.04), 0 10px 30px -8px rgba(14,14,12,.18), 0 30px 60px -20px rgba(14,14,12,.12);
}

* { box-sizing: border-box; }

/* Beats any id-level display rule, so `hidden` always works. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 56px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

#site-header {
  width: 100%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  height: 68px;
}

#logo-link { display: inline-flex; align-items: center; }
#logo { height: 26px; width: auto; display: block; }

/* ---------- Layout ---------- */

#layout {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

#main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

#rep-image {
  width: 100%;
  max-height: 44vh;
  object-fit: cover;
  border-radius: var(--r-xl);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-soft);
  display: block;
}

body.in-call #rep-image { max-height: 28vh; }

/* ---------- Cards & type ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 12px;
}

h1, h2 {
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 12px;
}

h1 { font-size: 34px; line-height: 1.08; }
h2 { font-size: 22px; line-height: 1.2; }

.gradient-text {
  background: var(--gradient-headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

p { margin: 0 0 12px; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }
.fine-print { font-size: 13px; line-height: 1.5; color: var(--grey-muted); }

/* ---------- Buttons ---------- */

button {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  height: 50px;
  padding: 0 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--amber);
  color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

button:hover { background: var(--amber-hover); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hair);
}
button.secondary:hover { background: var(--paper-2); border-color: var(--ink-4); }

#welcome button, #ended button { margin-top: 12px; }

/* ---------- In-call ---------- */

#call-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#call-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--hair);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }

#call-status[data-state="connecting"] .status-dot,
#call-status[data-state="initializing"] .status-dot { background: var(--amber-ink); animation: pulse 1.2s ease-in-out infinite; }
#call-status[data-state="listening"] .status-dot { background: var(--green-live); }
#call-status[data-state="thinking"] .status-dot { background: var(--amber-ink); animation: pulse .8s ease-in-out infinite; }
#call-status[data-state="speaking"] .status-dot { background: var(--indigo); animation: pulse .6s ease-in-out infinite; }
#call-status[data-state="error"] .status-dot { background: var(--rose); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: .55; }
}

#captions {
  width: 100%;
  max-height: 34vh;
  min-height: 120px;
  overflow-y: auto;
  padding: 14px;
  background: var(--paper);
  border-radius: var(--r-lg);
  border: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}

#captions:empty::before {
  content: "Your conversation will appear here.";
  color: var(--ink-4);
}

.caption { max-width: 85%; padding: 9px 13px; border-radius: 12px; color: var(--ink); }
.caption.agent { align-self: flex-start; background: var(--surface); border: 1px solid var(--hair); }
.caption.user { align-self: flex-end; background: var(--indigo-soft); }
.caption.interim { opacity: .55; }
.caption.notice {
  align-self: stretch;
  max-width: none;
  background: #FFF6E3;
  border: 1px solid #F3D9A4;
  color: #7A5A1E;
  font-size: 14px;
}

/* ---------- Side panel ---------- */

#side-panel { position: sticky; top: 20px; background: var(--paper-2); }

#book-demo-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
#book-demo-form label { font-size: 13px; font-weight: 500; color: var(--ink-3); }

#book-demo-form input {
  font: inherit;
  font-size: 15px;
  height: 50px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--hair);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#book-demo-form input::placeholder { color: var(--ink-4); }
#book-demo-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,14,12,.06); }
#book-demo-form input.invalid { border-color: var(--rose); }

.field-error { color: var(--rose); font-size: 13px; margin: -2px 0 0; }

.side-note { font-size: 12.5px; color: var(--grey-muted); margin-top: 12px; }

#audio-stream { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  #layout { grid-template-columns: 1fr; }
  #side-panel { position: static; order: 2; }
  #rep-image { max-height: 32vh; }
  .card { padding: 24px; }
  h1 { font-size: 28px; }
}
