/* Biseda Keyboard — static landing (App Store support / privacy URLs) */
:root {
  --bg: rgb(20, 23, 31);
  --bg-mid: rgb(15, 18, 26);
  --bg-bottom: rgb(5, 5, 8);
  --surface: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #007AFF;
  --accent-dim: rgba(0, 122, 255, 0.15);
  --card: rgb(33, 36, 46);
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--accent);
}
.brand-text {
  line-height: 1.2;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.nav-links a {
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 0.5rem 0 3rem;
}
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}
.hero-logo {
  width: min(42vw, 160px);
  height: min(42vw, 160px);
  border-radius: clamp(20px, 5vw, 36px);
  object-fit: cover;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 4px 24px rgba(0, 122, 255, 0.25);
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: center;
}
.hero-lead,
.btn-row,
.app-store-hint {
  text-align: center;
}
.hero-lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 32rem;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: default;
}

.btn-primary {
  background: linear-gradient(135deg, #007AFF, #0055CC);
  color: #fff;
}

.app-store-badge-link {
  display: inline-block;
  line-height: 0;
  border-radius: 6px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.app-store-badge-link:hover {
  opacity: 0.92;
  transform: scale(1.02);
  text-decoration: none;
}
.app-store-badge-img {
  display: block;
  height: 54px;
  width: auto;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.app-store-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* Sections */
.section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.feature-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}
.feature-list li {
  margin-bottom: 0.5rem;
}

/* Legal pages */
.page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
}
.updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.prose h2 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}
.prose p,
.prose ul {
  color: var(--muted);
  margin: 0 0 1rem;
}
.prose ul {
  padding-left: 1.25rem;
}
.prose li {
  margin-bottom: 0.35rem;
}

.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
}
.footer a:hover {
  color: var(--accent);
}

.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

/* ============ KEYBOARD DEMO (matches app design) ============ */
.demo-section {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}
.demo-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.demo-section-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.demo-frame {
  position: relative;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.3), rgba(0, 122, 255, 0.1));
  max-width: 100%;
  overflow: hidden;
}
.demo-frame-inner {
  border-radius: 15px;
  background: rgb(20, 23, 28);
  padding: 8px 8px 10px;
}

/* Mode tabs */
.demo-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.demo-mode {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 8px;
  background: transparent;
  color: #a1a1aa;
}
.demo-mode--active {
  background: rgba(0, 122, 255, 0.88);
  color: #fff;
}

/* Reply bar */
.demo-reply-bar {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  margin: 0 2px 6px;
  border-radius: 8px;
  background: var(--card);
  color: #a1a1aa;
  line-height: 1.35;
}
.demo-reply-label {
  color: #a1a1aa;
  margin-right: 4px;
}
.demo-reply-msg {
  color: #fff;
}

/* Phase visibility */
.demo-frame.demo-phase-hint .demo-stack {
  display: none;
}
.demo-frame.demo-phase-hint .demo-reply-bar {
  display: none;
}
.demo-frame:not(.demo-phase-hint) .demo-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Controls row — pill buttons */
.demo-controls-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 6px;
}
.demo-ctrl-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  background: var(--card);
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.demo-ctrl-icon--active {
  background: rgba(100, 220, 80, 0.65);
  color: rgba(0, 0, 0, 0.85);
}
.demo-pill {
  flex: 1;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 122, 255, 0.88);
  white-space: nowrap;
  padding: 0 8px;
}
.demo-pill-goal {
  display: none;
}
.demo-frame.demo-mode-dating .demo-pill-goal {
  display: inline-flex;
}
.demo-pill-lang {
  flex-shrink: 0;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 122, 255, 0.7);
  padding: 0 8px;
}

/* Suggestion cards — dark charcoal, selected gets blue */
.demo-suggestions-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.35s ease;
  margin: 0 4px;
}
.demo-frame.demo-phase-sug .demo-suggestions-panel {
  max-height: 420px;
  opacity: 1;
  margin: 0 4px 4px;
}

.demo-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-card {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 2px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-card--purple,
.demo-card--teal {
  background: var(--card);
}
.demo-card-text {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  line-height: 1.35;
}
.demo-frame.demo-sel-0 .demo-card:nth-child(1) {
  background: rgba(0, 122, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}
.demo-frame.demo-sel-1 .demo-card:nth-child(2) {
  background: rgba(0, 122, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Action buttons — dark charcoal like the app */
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 4px 2px;
}
.demo-act {
  flex: 1 1 0;
  min-width: 60px;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--card);
}
.demo-act--full {
  flex: 1 1 100%;
}
.demo-act-lbl {
  line-height: 1.1;
}
.demo-act-ico {
  font-size: 14px;
  line-height: 1;
}

/* Send button is the only colored action button */
.demo-act--send {
  background: rgba(0, 122, 255, 0.88);
}

/* Dating vs Work/Social action visibility */
.demo-actions--dating,
.demo-actions--dating-secondary {
  display: none;
}
.demo-actions--worksocial,
.demo-actions--worksocial-secondary {
  display: flex;
}
.demo-frame.demo-mode-dating .demo-actions--dating,
.demo-frame.demo-mode-dating .demo-actions--dating-secondary {
  display: flex;
}
.demo-frame.demo-mode-dating .demo-actions--worksocial,
.demo-frame.demo-mode-dating .demo-actions--worksocial-secondary {
  display: none;
}

/* Send / Sent states */
.demo-send-text {
  position: relative;
  height: 1em;
}
.demo-st-sent, .demo-st-sent-ws { display: none; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.demo-ico-check, .demo-ico-check-ws { display: none; font-size: 15px; }

.demo-frame.demo-sent .demo-st-send,
.demo-frame.demo-sent .demo-st-send-ws { display: none; }
.demo-frame.demo-sent .demo-st-sent,
.demo-frame.demo-sent .demo-st-sent-ws { display: block; }
.demo-frame.demo-sent .demo-ico-plane,
.demo-frame.demo-sent .demo-ico-plane-ws { display: none; }
.demo-frame.demo-sent .demo-ico-check,
.demo-frame.demo-sent .demo-ico-check-ws { display: block; }
.demo-frame.demo-sent .demo-btn-send,
.demo-frame.demo-sent .demo-btn-send-ws { background: #22c55e !important; }

/* More spin animation */
@keyframes demo-spin {
  to { transform: rotate(360deg); }
}
.demo-frame.demo-refreshing .demo-more-icon,
.demo-frame.demo-refreshing .demo-more-icon-ws {
  display: inline-block;
  animation: demo-spin 0.45s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .demo-suggestions-panel { transition: none; }
}

@media (min-width: 640px) {
  .wrap { padding: 0 2rem 5rem; }
}
