/* ── Variables ────────────────────────────────────────────────── */
:root {
  --brand-from:   #4797F5;
  --brand-to:     #A855F7;
  --brand-grad:   linear-gradient(135deg, var(--brand-from), var(--brand-to));

  --bg:           #08080E;
  --surface:      #101018;
  --card-bg:      #13131E;
  --card-border:  #1E1E30;
  --text:         #E8E8F2;
  --text-muted:   #888899;
  --text-dim:     #555566;
  --radius:       14px;
  --radius-sm:    8px;
  --transition:   200ms ease;
}

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Utility ──────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Layout wrapper ───────────────────────────────────────────── */
.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Sticky Header ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 8, 14, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  transition: opacity var(--transition);
}

.header-brand:hover {
  opacity: 0.8;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.header-link:hover {
  color: var(--text);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px 6px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: color var(--transition), background var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lang-sep {
  color: var(--card-border);
  font-size: 0.75rem;
  margin: 0 2px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 120px 0 56px;
  gap: 16px;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(71, 151, 245, 0.15) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

.hero-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 24px rgba(71, 151, 245, 0.35));
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 480px;
}

.hero-cta {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn--large {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 999px;
}

.btn--glow {
  position: relative;
}

.btn--glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: var(--brand-grad);
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
  transition: opacity var(--transition);
}

.btn--glow:hover::before {
  opacity: 0.8;
  filter: blur(12px);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(71, 151, 245, 0.1);
  border: 1px solid rgba(71, 151, 245, 0.25);
  color: var(--brand-from);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.version-badge.hidden { display: none; }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* ── Showcase ─────────────────────────────────────────────────── */
.showcase-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 24px;
  position: relative;
}

.showcase-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.showcase-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: var(--brand-grad);
  z-index: -1;
  opacity: 0.5;
  filter: blur(16px);
}

.showcase-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #08080E;
}

/* ── Features (Bento Grid) ────────────────────────────────────── */
.features-section {
  padding-bottom: 80px;
}

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

@media (max-width: 760px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.bento-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.15);
}

.bento-card--large {
  grid-column: span 2;
  background: linear-gradient(145deg, rgba(71, 151, 245, 0.08), rgba(168, 85, 247, 0.08));
}

.bento-card--large:hover {
  background: linear-gradient(145deg, rgba(71, 151, 245, 0.12), rgba(168, 85, 247, 0.12));
  border-color: rgba(168, 85, 247, 0.3);
}

@media (max-width: 760px) {
  .bento-card--large {
    grid-column: span 1;
  }
}

.bento-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.bento-card--large .bento-title {
  font-size: 1.5rem;
}

.bento-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Platform section ─────────────────────────────────────────── */
.platform-section {
  padding-bottom: 80px;
}

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 28px;
}

/* ── Platform grid ────────────────────────────────────────────── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 540px) {
  .platform-grid { grid-template-columns: 1fr; }
}

@media (min-width: 760px) {
  .platform-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}

.card:hover {
  border-color: #2A2A44;
  transform: translateY(-2px);
}

/* Gradient border for recommended card */
.card--recommended {
  background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
              var(--brand-grad) border-box;
  border: 1.5px solid transparent;
}

.card--recommended:hover {
  background: linear-gradient(#16162A, #16162A) padding-box,
              var(--brand-grad) border-box;
  border-color: transparent;
  transform: translateY(-2px);
}

.recommended-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-grad);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.card--hidden { display: none; }

/* ── Card header ──────────────────────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.card--recommended .platform-icon { color: var(--brand-from); }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Card actions ─────────────────────────────────────────────── */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:focus-visible {
  outline: 2px solid var(--brand-from);
  outline-offset: 2px;
}
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand-grad);
  color: #fff;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.btn--secondary:hover { background: rgba(255, 255, 255, 0.1); }

/* ── Card note (install guidance) ────────────────────────────── */
.card-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.site-footer a:hover { color: var(--text); text-decoration: none; }

/* ── No-script notice ─────────────────────────────────────────── */
.nojs-notice {
  display: none;
}
