/* Talk to Strangers component layer.
   Loaded after tokens.css. Every value here resolves to a token — no literals
   except the 1px hairline, the 2px focus offset and the 44px hit floor.
   Prefix: at-  ·  Modifiers: at-block--variant  ·  State: data- attributes. */

/* ---------------------------------------------------------------- base --- */

.at-root {
  background: var(--surface-base);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.at-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.at-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

.at-eyebrow {
  font-family: var(--font-text);
  font-size: 11px; line-height: 14px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted);
}

.at-muted { color: var(--ink-muted); }
.at-measure { max-width: 68ch; }
.at-measure-lead { max-width: 56ch; }

:where(.at-root) :focus-visible,
.at-focusable:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* -------------------------------------------------------------- button --- */

.at-btn {
  --_btn-bg: transparent;
  --_btn-fg: var(--ink);
  --_btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--_btn-bd);
  border-radius: var(--radius-md);
  background: var(--_btn-bg);
  color: var(--_btn-fg);
  font-family: var(--font-text);
  font-size: 14px; line-height: 20px; font-weight: 600;
  letter-spacing: -0.004em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-1) ease-out,
              border-color var(--duration-1) ease-out,
              color var(--duration-1) ease-out,
              transform var(--duration-2) ease-out,
              box-shadow var(--duration-2) ease-out;
}

.at-btn svg { width: 18px; height: 18px; flex: none; }

.at-btn--primary {
  --_btn-bg: var(--accent);
  --_btn-fg: var(--on-accent);
  --_btn-bd: var(--accent);
  box-shadow: var(--shadow-accent);
}
.at-btn--primary:hover { --_btn-bg: var(--accent-strong); --_btn-bd: var(--accent-strong); transform: translateY(-1px); }
.at-btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.at-btn--secondary {
  --_btn-bg: var(--surface-raised);
  --_btn-fg: var(--ink);
  --_btn-bd: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.at-btn--secondary:hover { --_btn-bg: var(--surface-inset); transform: translateY(-1px); }
.at-btn--secondary:active { transform: translateY(0); }

.at-btn--ghost { --_btn-fg: var(--ink-muted); }
.at-btn--ghost:hover { --_btn-fg: var(--ink); --_btn-bg: var(--surface-inset); }

.at-btn--danger {
  --_btn-bg: var(--danger-soft);
  --_btn-fg: var(--danger);
  --_btn-bd: var(--danger);
}
.at-btn--danger:hover { --_btn-bg: var(--danger); --_btn-fg: var(--surface-base); }

.at-btn--sm { min-height: 36px; padding: var(--space-2) var(--space-4); font-size: 12px; line-height: 16px; border-radius: var(--radius-sm); }
.at-btn--lg { min-height: 56px; padding: var(--space-4) var(--space-6); font-size: 16px; line-height: 24px; border-radius: var(--radius-lg); }
.at-btn--block { width: 100%; }

.at-btn[disabled], .at-btn[aria-disabled="true"] {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------------------------------------------------------------- card --- */

.at-card {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.at-card--pad-lg { padding: var(--space-6); border-radius: var(--radius-xl); }

.at-card--interactive {
  transition: transform var(--duration-2) ease-out,
              box-shadow var(--duration-2) ease-out,
              border-color var(--duration-1) ease-out;
}
.at-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.at-card--glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-color: var(--glass-stroke);
  box-shadow: var(--shadow-lg);
}
.at-card--glass::before {
  content: ""; position: absolute; inset: 0 var(--space-5) auto;
  height: 1px; background: var(--glass-highlight); pointer-events: none;
}

.at-card--feature { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; }

.at-card-title {
  font-family: var(--font-display);
  font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.012em;
  color: var(--ink); margin: 0;
}
.at-card-body { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin: 0; }

/* --------------------------------------------------------------- icons --- */

.at-icon-well {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.at-icon-well svg { width: 22px; height: 22px; }
.at-icon-well--live { background: var(--live-soft); color: var(--live); }
.at-icon-well--plain { background: var(--surface-inset); color: var(--ink-muted); }

/* ---------------------------------------------------------------- pill --- */

.at-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: 600;
  white-space: nowrap;
}
.at-pill svg { width: 14px; height: 14px; flex: none; }
.at-pill--live { background: var(--live-soft); border-color: var(--live); color: var(--live); }
.at-pill--accent { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.at-pill--solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.at-dot {
  width: 8px; height: 8px; flex: none;
  border-radius: var(--radius-full);
  background: var(--live);
}
.at-dot--pulse { position: relative; }
.at-dot--pulse::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--live);
  animation: at-ping 1800ms ease-out infinite;
}
@keyframes at-ping {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ------------------------------------------------------------ waveform --- */

.at-wave {
  max-width: 520px;
  display: flex; align-items: center; justify-content: space-between; gap: 3px;
  width: 100%; height: 56px;
}
.at-wave-bar {
  flex: 1 1 4px; min-width: 3px; max-width: 5px;
  border-radius: var(--radius-full);
  background: var(--wave-rest);
  transform-origin: center;
}
.at-wave[data-state="live"] .at-wave-bar {
  animation: at-wave-pulse 1100ms ease-in-out infinite alternate;
}
.at-wave[data-speaker="near"] .at-wave-bar { background: var(--wave-near); }
.at-wave[data-speaker="far"] .at-wave-bar { background: var(--wave-far); max-width: 3px; }
@keyframes at-wave-pulse {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1); }
}

/* ------------------------------------------------------------- avatars --- */

.at-avatar {
  position: relative; display: inline-flex; flex: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--surface-inset);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 0 0 2px var(--surface-raised);
}
.at-avatar > img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-full);
}
.at-avatar--lg { width: 72px; height: 72px; font-size: 24px; }
.at-avatar--sm { width: 32px; height: 32px; font-size: 12px; }

.at-avatar-presence {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px;
  border-radius: var(--radius-full);
  background: var(--live);
  box-shadow: 0 0 0 2px var(--surface-raised);
}
.at-avatar--lg .at-avatar-presence { width: 16px; height: 16px; right: 2px; bottom: 2px; }

.at-avatar-stack { display: flex; }
.at-avatar-stack > .at-avatar + .at-avatar { margin-left: calc(var(--space-2) * -1); }

/* --------------------------------------------------------------- stats --- */

.at-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.at-stat-value {
  font-family: var(--font-display);
  font-size: 54px; line-height: 56px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.at-stat--sm .at-stat-value { font-size: 30px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.at-stat-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }

.at-timer {
  font-family: var(--font-mono);
  font-size: 15px; line-height: 20px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* --------------------------------------------------------------- steps --- */

.at-steps { display: grid; gap: var(--space-6); position: relative; }
.at-step { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-4); position: relative; }
.at-step::before {
  content: ""; position: absolute;
  left: 21px; top: 44px; bottom: calc(var(--space-6) * -1);
  width: 2px; background: var(--border-subtle);
}
.at-step:last-child::before { display: none; }
.at-step-mark {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
}
.at-step[data-state="done"] .at-step-mark,
.at-step[data-state="current"] .at-step-mark {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.at-step[data-state="current"] .at-step-mark { box-shadow: var(--shadow-accent); }
.at-step-title {
  font-family: var(--font-display);
  font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.012em;
  color: var(--ink); margin: 0 0 var(--space-1);
}
.at-step-body { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin: 0; }

/* ------------------------------------------------------------- pricing --- */

.at-price { display: flex; flex-direction: column; gap: var(--space-5); height: 100%; }
.at-price-tier {
  font-family: var(--font-display);
  font-size: 17px; line-height: 24px; font-weight: 700; color: var(--ink);
}
.at-price-amount {
  display: flex; align-items: baseline; gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 44px; line-height: 50px; font-weight: 800; letter-spacing: -0.028em;
  color: var(--ink);
}
.at-price-period { font-family: var(--font-text); font-size: 14px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.at-price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.at-price-list li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.at-price-list svg { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-text); }
.at-price-list li[data-off] svg { color: var(--wave-rest); }

.at-card--recommended { border-color: var(--accent); background: var(--accent-soft); }
.at-ribbon {
  position: absolute; top: calc(var(--space-3) * -1); left: var(--space-5);
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--accent); color: var(--on-accent);
  font-size: 12px; line-height: 16px; font-weight: 600;
}

/* ---------------------------------------------------------- testimonial --- */

.at-quote { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.at-quote-text { font-size: 16px; line-height: 27px; color: var(--ink); margin: 0; }
.at-quote-foot { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.at-quote-name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.at-quote-meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.at-stars { display: inline-flex; gap: 2px; color: var(--caution); }
.at-stars svg { width: 14px; height: 14px; }
.at-verified { display: inline-flex; align-items: center; gap: 4px; color: var(--live); font-size: 12px; font-weight: 600; }
.at-verified svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ faq --- */

.at-faq { display: grid; gap: var(--space-3); }
.at-faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  overflow: hidden;
}
.at-faq-item[open] { border-color: var(--border-strong); }
.at-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.006em;
  color: var(--ink);
}
.at-faq-q::-webkit-details-marker { display: none; }
.at-faq-q:hover { background: var(--surface-inset); }
.at-faq-chevron {
  width: 20px; height: 20px; flex: none; color: var(--ink-muted);
  transition: transform var(--duration-3) ease-out;
}
.at-faq-item[open] .at-faq-chevron { transform: rotate(180deg); }
.at-faq-a {
  padding: 0 var(--space-5) var(--space-5);
  font-size: 14px; line-height: 22px; color: var(--ink-muted);
  max-width: 68ch;
}
.at-faq-a p { margin: 0; }

/* ------------------------------------------------------------------ nav --- */

.at-nav {
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-full);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-md);
}
.at-nav-links { display: flex; align-items: center; gap: var(--space-2); }
.at-nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-1) ease-out, background-color var(--duration-1) ease-out;
}
.at-nav-link:hover { color: var(--ink); background: var(--surface-inset); }
.at-nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.at-nav-spacer { flex: 1 1 auto; }

.at-logo { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.at-logo-mark { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.at-logo-mark i { display: block; width: 4px; border-radius: var(--radius-full); background: var(--wave-near); }
.at-logo-mark i:nth-child(1) { height: 11px; }
.at-logo-mark i:nth-child(2) { height: 22px; background: var(--wave-far); }
.at-logo-mark i:nth-child(3) { height: 15px; }
.at-logo-word {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink);
}

/* ---------------------------------------------------------------- field --- */

.at-field { display: grid; gap: var(--space-2); }
.at-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.at-input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  color: var(--ink);
  font-family: var(--font-text); font-size: 16px; line-height: 24px;
  transition: border-color var(--duration-1) ease-out;
}
.at-input::placeholder { color: var(--ink-muted); }
.at-input:hover { border-color: var(--ink-muted); }
.at-field-help { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.at-field[data-invalid] .at-input { border-color: var(--danger); }
.at-field[data-invalid] .at-field-help { color: var(--danger); }

.at-choice {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-1) ease-out;
}
.at-choice:hover { color: var(--ink); }
.at-choice[aria-pressed="true"] {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text);
}
.at-choice[aria-pressed="true"] svg { color: var(--accent-text); }
.at-choice svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------- call panel --- */

.at-call {
  display: grid; gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow-lg);
}
.at-call-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.at-call-peer { display: flex; align-items: center; gap: var(--space-3); }
.at-call-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); }
.at-call-sub { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.at-call-stage {
  display: grid; gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.at-call-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-3); }
.at-call-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--duration-1) ease-out, transform var(--duration-2) ease-out;
}
.at-call-btn:hover { background: var(--surface-inset); transform: translateY(-1px); }
.at-call-btn svg { width: 20px; height: 20px; }
.at-call-btn--end { background: var(--danger); border-color: var(--danger); color: var(--surface-base); width: 64px; }
.at-call-btn--end:hover { background: var(--danger); filter: brightness(1.08); }

/* -------------------------------------------------------------- aurora --- */

.at-aurora { position: relative; isolation: isolate; overflow: hidden; }
.at-aurora > .at-aurora-blob {
  position: absolute; z-index: -1;
  border-radius: var(--radius-full);
  filter: blur(80px);
  opacity: var(--opacity-aurora);
  pointer-events: none;
}
.at-aurora-blob--1 { background: var(--aurora-1); }
.at-aurora-blob--2 { background: var(--aurora-2); }
.at-aurora-blob--3 { background: var(--aurora-3); }

/* ------------------------------------------------------------ skeleton --- */

.at-skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-inset) 0%, var(--border-subtle) 50%, var(--surface-inset) 100%);
  background-size: 200% 100%;
  animation: at-sweep 1400ms linear infinite;
}
@keyframes at-sweep {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  .at-wave[data-state="live"] .at-wave-bar,
  .at-dot--pulse::after,
  .at-skeleton { animation: none; }
  .at-wave[data-state="live"] .at-wave-bar { transform: scaleY(0.65); }
  .at-dot--pulse::after { opacity: 0.35; transform: scale(1.2); }
  .at-btn, .at-card--interactive, .at-call-btn, .at-faq-chevron, .at-choice {
    transition-duration: var(--duration-1);
  }
  .at-btn:hover, .at-card--interactive:hover, .at-call-btn:hover { transform: none; }
}
