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

:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --border:   #334155;
  --muted:    #475569;
  --subtle:   #64748b;
  --text:     #e2e8f0;
  --text-dim: #94a3b8;
  --accent:   #38bdf8;
  --accent-h: #7dd3fc;
  --accent-d: #0284c7;
  --green:    #4ade80;
  --radius:   12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:       #f8fafc;
    --surface:  #ffffff;
    --border:   #e2e8f0;
    --muted:    #cbd5e1;
    --subtle:   #94a3b8;
    --text:     #0f172a;
    --text-dim: #475569;
    --accent:   #0284c7;
    --accent-h: #0369a1;
    --accent-d: #0284c7;
    --green:    #16a34a;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ─── Nav ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  gap: 0.1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  color: var(--text-dim);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: color 0.15s;
}

.lang-switch a:hover { color: var(--accent); }

.lang-active {
  color: var(--accent);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.nav-cta {
  background: var(--accent);
  color: var(--bg);
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-h); color: var(--bg); }

/* ─── Hero ────────────────────────────────────────── */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-hero-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-hero-primary:hover { background: var(--accent-h); color: var(--bg); transform: translateY(-1px); }

.btn-hero-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-hero-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── App preview ─────────────────────────────────── */
.preview-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.preview-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.preview-titlebar {
  background: color-mix(in srgb, var(--border) 50%, var(--surface));
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.preview-dot:nth-child(1) { background: #ef4444; }
.preview-dot:nth-child(2) { background: #f59e0b; }
.preview-dot:nth-child(3) { background: #22c55e; }

.preview-url {
  margin-left: 0.8rem;
  font-size: 0.78rem;
  color: var(--subtle);
  background: var(--bg);
  border-radius: 5px;
  padding: 0.2rem 0.8rem;
  flex: 1;
  text-align: center;
  max-width: 300px;
}

.preview-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 320px;
}

@media (max-width: 640px) {
  .preview-body { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
}

.preview-sidebar {
  border-right: 1px solid var(--border);
  padding: 1rem;
}

.preview-searchbar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  color: var(--subtle);
  margin-bottom: 0.8rem;
}

.preview-note {
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.preview-note.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.preview-note-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.preview-note-preview {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.preview-note-date {
  font-size: 0.68rem;
  color: var(--subtle);
  margin-top: 0.3rem;
}

.preview-editor {
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.preview-editor-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.preview-text-line {
  height: 10px;
  background: var(--border);
  border-radius: 3px;
}

/* Width variants for the mock text lines */
.preview-text-line.w-75 { width: 75%; }
.preview-text-line.w-55 { width: 55%; }
.preview-text-line.w-65 { width: 65%; }
.preview-text-line.w-40 { width: 40%; }

.preview-badge-enc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-top: auto;
}

/* ─── Sections ────────────────────────────────────── */
section { max-width: 1100px; margin: 0 auto; padding: 5rem 1.5rem; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ─── Feature grid ────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.9rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ─── How it works ────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  counter-reset: steps;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  counter-increment: steps;
}

.step-num {
  width: 2.2rem;
  height: 2.2rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
}

.step-num::before { content: counter(steps); }

.step-title {
  font-size: 1rem;
  font-weight: 700;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ─── Divider ─────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Tech specs ──────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}

.tech-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.tech-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ─── CTA Banner ──────────────────────────────────── */
.cta-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.cta-banner {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%,
    var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* ─── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--subtle);
}
