:root {
  --bg: #f8fafc;
  --bg-elevated: rgba(255, 255, 255, 0.9);
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-accent: rgba(37, 99, 235, 0.35);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #6366f1;
  --emerald: #059669;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Luminous Ambient Glow (Soft Pearl & Sky Pastels) */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.45;
  will-change: transform;
}

.blob-a {
  width: 600px;
  height: 600px;
  top: -150px;
  left: 20%;
  background: radial-gradient(circle, #bae6fd 0%, rgba(186, 230, 253, 0) 70%);
}

.blob-b {
  width: 550px;
  height: 550px;
  top: 35%;
  right: -80px;
  background: radial-gradient(circle, #ddd6fe 0%, rgba(221, 214, 254, 0) 70%);
}

.blob-c {
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -50px;
  background: radial-gradient(circle, #fed7aa 0%, rgba(254, 215, 170, 0) 70%);
  opacity: 0.35;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Floating Pill Navbar */
.nav-wrap {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 14px 6px 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  max-width: 820px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand img {
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-title {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-badge {
  font-size: 0.72rem;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 7px;
  border-radius: 9999px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Toggle Switch */
.lang-switch {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px;
}

.lang-switch button {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 150ms var(--ease);
}

.lang-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 180ms var(--ease);
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Hero Section */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #e0f2fe;
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 22px;
}

.eyebrow-pill .dot {
  width: 6px;
  height: 6px;
  background: #0284c7;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  color: #0f172a;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-actions .btn {
  padding: 10px 22px;
  font-size: 0.92rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}

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

.hero-meta svg {
  color: var(--emerald);
}

/* Interactive macOS Demo Box (Clean Light Window) */
.demo-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09), 0 1px 3px rgba(0, 0, 0, 0.04);
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  text-align: left;
}

.demo-bar {
  height: 38px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  position: relative;
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.demo-dot.red { background: #ff5f56; }
.demo-dot.yellow { background: #ffbd2e; }
.demo-dot.green { background: #27c93f; }

.demo-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.demo-body {
  padding: 24px;
  position: relative;
  background: #ffffff;
  min-height: 250px;
}

.editor-fake-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  color: #94a3b8;
  opacity: 0.6;
  font-size: 14px;
}

.editor-fake-toolbar svg {
  width: 15px;
  height: 15px;
}

.input-surface {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 90px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #0f172a;
}

.text-stream {
  word-break: break-word;
}

.text-selected {
  background: #6ee7b7;
  color: #064e3b;
  border-radius: 3px;
  padding: 1px 4px;
}

.text-replaced {
  background: #dcfce7;
  color: #15803d;
  border-radius: 3px;
  padding: 1px 4px;
  animation: swapGlow 0.8s ease-out;
}

/* Exact Real-App SwaprTrans HUD (1:1 with Screenshot) */
.swapr-hud {
  position: absolute;
  top: 48px;
  left: 28px;
  width: 320px;
  background: rgba(244, 245, 247, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 12px 14px 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 2px 10px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: all 0.22s var(--ease);
  pointer-events: none;
  z-index: 10;
  color: #1e293b;
}

.swapr-hud.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hud-direction-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.hud-direction-pill svg.hud-book-icon {
  width: 12px;
  height: 12px;
  color: #0284c7;
}

.hud-direction-pill svg.hud-swap-arrows {
  width: 10px;
  height: 10px;
  color: #64748b;
}

.hud-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-icon-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-provider-tag {
  font-size: 9.5px;
  color: #64748b;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 500;
}

.hud-body {
  margin-top: 4px;
  margin-bottom: 12px;
}

.hud-orig-text {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.hud-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 6px 0 8px;
}

.hud-trans-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
}

.hud-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 120ms ease;
}

.hud-btn.active,
.hud-btn-replace.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  transform: scale(0.97);
}

.demo-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.demo-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 5px 13px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 150ms var(--ease);
}

.demo-pill:hover,
.demo-pill.active {
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.35);
  color: #0369a1;
  font-weight: 600;
}

/* Compact Bento Features (4 Key Cards in Crisp White) */
.features-section {
  padding: 50px 0 36px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.bento-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  transition: all 200ms var(--ease);
  position: relative;
}

.bento-card:hover {
  border-color: rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.bento-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  margin-bottom: 14px;
}

.bento-card-icon.purple {
  background: #f5f3ff;
  border-color: #ede9fe;
  color: #7c3aed;
}

.bento-card-icon.emerald {
  background: #ecfdf5;
  border-color: #d1fae5;
  color: #059669;
}

.bento-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #0f172a;
}

.bento-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Compact Install & Setup Card */
.install-section {
  padding: 24px 0 60px;
}

.install-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

.install-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.install-step-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  flex-shrink: 0;
}

.install-step strong {
  color: #0f172a;
}

.install-cta-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 22px;
}

.install-cta-side .btn {
  width: 100%;
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #0369a1;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  width: 100%;
  text-align: left;
  overflow-x: auto;
}

/* Minimalist Light Footer */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 28px 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .install-box {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
}
