/* ===== Variables ===== */
:root {
  --bg: #0c0d10;
  --bg-card: #14161c;
  --bg-card-hover: #1a1d26;
  --text: #e8eaef;
  --text-muted: #8b8f9a;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --border: #2a2d38;
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-h: 72px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(34, 197, 94, 0.15);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

/* ===== Site announcement & offline ===== */
.site-announcement {
  background: rgba(34, 197, 94, 0.15);
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 24px;
  padding-top: calc(12px + var(--safe-top));
  text-align: center;
  font-size: 0.9375rem;
}

.site-offline {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  padding-left: calc(24px + var(--safe-left));
  padding-right: calc(24px + var(--safe-right));
}

.site-offline-inner {
  text-align: center;
  max-width: 400px;
}

.site-offline-inner h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.site-offline-inner p {
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.pricing-cta-section {
  text-align: center;
}

.pricing-cta-section .btn {
  margin-top: 8px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding-top: var(--safe-top);
  background: rgba(12, 13, 16, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #0c0d10;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #0c0d10;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text);
}
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-download { margin-top: 16px; }

.nav-toggle-cb { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 80px) 0 100px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.highlight { color: var(--accent); }

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 12px;
  text-align: center;
}
.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  max-width: 540px;
  margin: 0 auto 48px;
}

/* ===== Features ===== */
.features { background: #0f1014; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: background 0.2s, border-color 0.2s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(34, 197, 94, 0.3);
}

.feature-card-wide {
  grid-column: 1 / -1;
}

.feature-icon {
  display: inline-block;
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ===== How it works ===== */
.how-it-works .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.step {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #0c0d10;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.125rem;
  margin: 0 0 8px;
}
.step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.lang-note {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-loading {
  color: var(--text-muted);
  margin: 0;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.pricing-card .pricing-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.pricing-card .pricing-label {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.pricing-card .pricing-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

/* ===== Download ===== */
.download-box {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.download-info {
  text-align: left;
  margin-bottom: 24px;
}
.download-info p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.download-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 16px 0 0;
  opacity: 0.8;
}

.download-box-cta .download-box-lead {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.55;
}

/* ===== Support ===== */
.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.support-card h3 {
  font-size: 1.25rem;
  margin: 0 0 12px;
}
.support-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}
.contact-form select {
  cursor: pointer;
}
.contact-form button { align-self: flex-start; }

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 16px 0 0;
}

/* ===== Footer ===== */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand .logo { margin-bottom: 8px; }
.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===== Responsive / Mobile (auto-detected by screen width) ===== */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .header-inner {
    padding-left: calc(20px + var(--safe-left));
    padding-right: calc(20px + var(--safe-right));
  }
  .nav, .header .btn-primary { display: none; }
  .nav-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-right: 0;
  }

  .nav.open,
  .nav-toggle-cb:checked ~ .nav {
    display: flex;
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 999;
    padding: var(--safe-bottom) 0;
  }
  .nav.open a,
  .nav-toggle-cb:checked ~ .nav a { font-size: 1.25rem; padding: 12px 0; }
  .nav.open + .btn-primary,
  .nav-toggle-cb:checked ~ .nav + .btn-primary { display: none; }

  .hero { padding: calc(var(--header-h) + var(--safe-top) + 48px) 0 56px; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-cta { flex-direction: column; gap: 12px; }
  .hero-cta .btn { width: 100%; max-width: 280px; min-height: 48px; font-size: 1rem; }
  .hero-note { font-size: 0.8125rem; }

  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 0.9375rem; }
  .container { padding: 0 20px; padding-left: calc(20px + var(--safe-left)); padding-right: calc(20px + var(--safe-right)); }

  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { padding: 20px; }
  .feature-card h3 { font-size: 1.0625rem; }
  .feature-card p { font-size: 0.9375rem; }

  .steps { grid-template-columns: 1fr; gap: 20px; }
  .step { padding: 20px; }

  .download-box { padding: 24px 20px; margin: 0 -4px; }
  .download-box .btn { min-height: 48px; width: 100%; }

  .support-cards { grid-template-columns: 1fr; }
  .support-card { padding: 24px; }
  .support-card .btn { min-height: 48px; padding: 14px 24px; }

  .footer { padding: 32px 0 24px; padding-bottom: calc(24px + var(--safe-bottom)); }
  .footer-inner { flex-direction: column; text-align: center; gap: 20px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; padding-left: calc(16px + var(--safe-left)); padding-right: calc(16px + var(--safe-right)); }
  .section { padding: 40px 0; }
  .hero-title { font-size: 1.5rem; }
  .download-box { padding: 20px 16px; }
}

/* Touch-friendly: larger tap targets on touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; padding: 12px 20px; }
  .btn-lg { min-height: 48px; }
  a[href] { min-height: 1em; }
}
