/* Keybored — static landing (App Store support / privacy URLs) */
:root {
  --bg: #0a0a0b;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #7cfc00;
  --accent-dim: rgba(124, 252, 0, 0.15);
  --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: var(--bg);
  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(124, 252, 0, 0.22);
}
.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, #7cfc00, #22c55e);
  color: #0a0a0b;
}

/* Official App Store badge (Apple marketing asset — linked href in HTML) */
.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;
}

/* —— Homepage keyboard demo (matches AnimatedDemoView) —— */
.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(139, 76, 245, 0.5),
    rgba(124, 252, 0, 0.28)
  );
  max-width: 100%;
  overflow: hidden;
}
.demo-frame-inner {
  border-radius: 15px;
  background: rgb(26, 20, 38);
  padding: 8px 8px 10px;
}

.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: rgb(31, 26, 46);
  color: #a1a1aa;
}
.demo-mode--active {
  background: rgba(139, 76, 245, 0.88);
  color: #fff;
}

.demo-hint-row {
  margin: 0;
  padding: 10px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  background: rgb(46, 31, 64);
  border-radius: 8px;
}

.demo-frame.demo-phase-hint .demo-stack {
  display: none;
}
.demo-frame.demo-static .demo-hint-row {
  display: none !important;
}
.demo-frame.demo-static .demo-stack {
  display: flex !important;
}
.demo-frame:not(.demo-phase-hint) .demo-hint-row {
  display: none;
}

.demo-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.demo-reply-bar {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  margin: 6px 6px 0;
  border-radius: 8px;
  background: rgb(38, 26, 51);
  color: #a1a1aa;
  line-height: 1.35;
}
.demo-reply-label {
  color: #a1a1aa;
}
.demo-reply-msg {
  color: #fff;
}

.demo-mood {
  margin: 4px 12px 6px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(0, 217, 166, 0.9);
}

.demo-tones-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 4px;
  min-height: 40px;
}
.demo-swipe-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #000;
  background: #22c55e;
  padding: 6px 10px;
  border-radius: 6px;
}
.demo-tones-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.demo-tones-scroll::-webkit-scrollbar {
  display: none;
}
.demo-tone {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgb(31, 26, 46);
  color: #a1a1aa;
}
.demo-tone--on {
  background: rgba(236, 72, 153, 0.45);
  color: #fff;
  outline: 1px solid rgba(236, 72, 153, 0.9);
}

.demo-goals {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px 6px;
}
.demo-goals-icon {
  font-size: 14px;
}
.demo-goals-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.demo-goal {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.demo-goal--on {
  color: #fff;
  background: rgba(236, 72, 153, 0.35);
  border-color: rgba(236, 72, 153, 0.85);
}

.demo-length-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 8px;
}
.demo-ico-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  background: rgb(31, 26, 46);
}
.demo-ico-btn--on {
  background: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1.5px #22c55e;
}
.demo-len {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgb(31, 26, 46);
  color: #a1a1aa;
}
.demo-len--on {
  background: rgba(139, 76, 245, 0.55);
  color: #fff;
}
.demo-lang {
  font-size: 10px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(139, 76, 245, 0.9);
  color: #fff;
}

.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,
.demo-frame.demo-static .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: rgba(139, 76, 245, 0.58);
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.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) {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 12px rgba(124, 252, 0, 0.15);
}
.demo-frame.demo-sel-1 .demo-card:nth-child(2) {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 12px rgba(124, 252, 0, 0.15);
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 6px 4px;
}
.demo-actions--secondary {
  padding-top: 0;
}
.demo-act {
  flex: 1 1 calc(50% - 8px);
  min-width: 72px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.demo-act-lbl {
  line-height: 1.1;
}
.demo-act-ico {
  font-size: 15px;
  line-height: 1;
}
.demo-act--pink {
  background: #ec4899;
}
.demo-act--blue {
  background: #2563eb;
}
.demo-act--green {
  background: rgba(34, 197, 94, 0.92);
}
.demo-act--cyan {
  background: rgba(6, 182, 212, 0.95);
}
.demo-act--teal {
  background: rgb(0, 148, 166);
}
.demo-act--purple {
  background: #9333ea;
}
.demo-act--coral {
  background: rgb(239, 91, 102);
}

.demo-send-text {
  position: relative;
  height: 1em;
}
.demo-st-sent {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.demo-frame.demo-sent .demo-st-send {
  display: none;
}
.demo-frame.demo-sent .demo-st-sent {
  display: block;
}
.demo-ico-check {
  display: none;
  font-size: 16px;
}
.demo-frame.demo-sent .demo-ico-plane {
  display: none;
}
.demo-frame.demo-sent .demo-ico-check {
  display: block;
}
.demo-frame.demo-sent .demo-btn-send {
  background: #22c55e !important;
}

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

.demo-keyboard-strip {
  padding: 8px 6px 4px;
}
.demo-kb-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.demo-kb-key {
  flex-shrink: 0;
  height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgb(31, 26, 46);
  color: #fff;
  font-size: 16px;
}
.demo-kb-space {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}
.demo-kb-return {
  min-width: 72px;
  font-size: 13px;
  color: rgba(180, 220, 185, 0.95);
}
.demo-kb-caption {
  margin: 8px 0 0;
  text-align: center;
  font-size: 10px;
  color: #a1a1aa;
  line-height: 1.35;
}

.demo-actions--primary .demo-act--pink,
.demo-actions--primary .demo-act--blue {
  flex: 1 1 calc(25% - 8px);
}
.demo-actions--primary .demo-btn-more,
.demo-actions--primary .demo-btn-send {
  flex: 1 1 calc(25% - 8px);
}

@media (max-width: 400px) {
  .demo-actions--primary .demo-act {
    flex: 1 1 calc(50% - 6px);
    min-width: 60px;
  }
}

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

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