/* Call by 313bits */
:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #0f172a;
  --text: #334155;
  --muted: #5b6678;
  --border: #e2e7e4;
  --border-strong: #cfd7d3;
  --accent: #0f766e;
  --accent-hover: #0c625b;
  --accent-soft: #e3f2ef;
  --gold: #d4a017;
  --gold-soft: #fbf1d3;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --on-accent: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -6px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 24px 56px -12px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #121b2e;
    --surface-2: #162036;
    --ink: #f1f5f9;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --border: #223049;
    --border-strong: #2e3d59;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --gold: #e7b934;
    --gold-soft: rgba(231, 185, 52, 0.14);
    --danger: #ef4444;
    --danger-hover: #f87171;
    --on-accent: #042f2c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header / footer ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-lg {
  min-height: 58px;
  padding: 0 30px;
  font-size: 1.08rem;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn-whatsapp {
  background: #25d366;
  color: #062e16;
}

.btn-whatsapp:hover {
  background: #1fbf5b;
}

/* ---------- landing ---------- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.hero h1 {
  margin: 20px auto 16px;
  max-width: 760px;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lead {
  max-width: 560px;
  margin: 0 auto 30px;
  font-size: 1.15rem;
  color: var(--text);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-note {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-note .ico {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.demo {
  margin: 48px auto 0;
  max-width: 420px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 26px 22px 22px;
  text-align: center;
}

.demo-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.demo-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  background: var(--accent-soft);
  position: relative;
}

.demo-avatar.talking::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  opacity: 0.5;
}

.demo-avatar.gold {
  color: var(--gold);
  background: var(--gold-soft);
}

.demo-wave {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 28px;
}

.demo-wave i {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.6;
}

.demo-status {
  margin: 14px 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.demo-status b {
  color: var(--ink);
}

.demo-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.demo-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
}

.demo-btn.end {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 34px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.steps,
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 1.05rem;
  margin: 12px 0 6px;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

.card-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.plus {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
}

@media (min-width: 760px) {
  .plus {
    grid-template-columns: 1.4fr 1fr;
  }
}

.plus h2 {
  margin-bottom: 8px;
}

.plus ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.plus li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.plus li .ico {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--muted);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin: 0 0 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: calc(100% - 32px);
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

/* ---------- call screen ---------- */
.call-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.call-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.panel {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 30px 24px 24px;
  text-align: center;
}

.panel h1 {
  font-size: 1.6rem;
}

.panel p {
  margin: 0 0 18px;
}

.panel label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.panel input,
.panel select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  margin-bottom: 16px;
}

.panel .btn {
  width: 100%;
}

.state-ico {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.state-ico .ico {
  width: 30px;
  height: 30px;
}

.state-ico.danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.peer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.peer-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  position: relative;
  transition: box-shadow 0.12s;
}

.peer-avatar.waiting {
  color: var(--muted);
  background: var(--surface-2);
  border: 2px dashed var(--border-strong);
}

.peer-avatar.waiting::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.peer-avatar .muted-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  border: 3px solid var(--surface);
}

.peer-avatar .muted-badge .ico {
  width: 15px;
  height: 15px;
}

.peer-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.peer-status {
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.5em;
  font-variant-numeric: tabular-nums;
}

.peer-status.live {
  color: var(--accent);
  font-weight: 600;
}

.peer-status.warn {
  color: var(--gold);
  font-weight: 600;
}

.share-box {
  margin: 20px 0 6px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
}

.share-box h2 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.share-box p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.share-link {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.share-link input {
  margin: 0;
  min-height: 44px;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}

.share-link .btn {
  width: auto;
  min-height: 44px;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-actions .btn {
  width: 100%;
  min-height: 44px;
  font-size: 0.92rem;
}

.controls {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}

.ctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.ctl-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  transition:
    background 0.15s,
    transform 0.1s;
}

.ctl:active .ctl-btn {
  transform: scale(0.95);
}

.ctl-btn .ico {
  width: 24px;
  height: 24px;
}

.ctl[aria-pressed='true'] .ctl-btn {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.ctl.end .ctl-btn {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.ctl.end:hover .ctl-btn {
  background: var(--danger-hover);
}

.level {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin: 0 0 16px;
}

.level i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.08s linear;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 600px) {
  .sheet-backdrop {
    align-items: center;
  }
}

.sheet {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  text-align: left;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 600px) {
  .sheet {
    border-radius: 24px;
  }
}

.sheet h2 {
  font-size: 1.15rem;
}

.sheet label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.sheet select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  margin-bottom: 8px;
}

.sheet .hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.sheet .btn {
  width: 100%;
}

.small-print {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 16px;
}
