/* ============================================
   X-Telega v2 — Telegram Minimalist Dark
   ============================================ */

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

:root {
  --bg: #0e1621;
  --bg-alt: #17212b;
  --card: #1e2c3a;
  --accent: #2AABEE;
  --accent-h: #229ED9;
  --text: #c8d1d9;
  --dim: #6d7883;
  --white: #fff;
  --border: #243442;
  --radius: 12px;
  --tr: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fustat', sans-serif;
  color: var(--white);
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Buttons (smaller padding-y) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }



/* ── Header ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 20px 0;
  background: rgba(14,22,33,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow var(--tr);
}
header.scrolled { box-shadow: 0 1px 0 var(--border); }

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

.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Fustat', sans-serif; font-size: 1.15rem; font-weight: 700;
  color: var(--white); text-decoration: none;
}
.logo:hover { color: var(--white); }
.logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}

.desktop-nav { display: none; align-items: center; gap: 24px; }
.desktop-nav a { color: var(--dim); font-size: 0.85rem; font-weight: 500; transition: color var(--tr); }
.desktop-nav a:hover { color: var(--white); }
.header-cta { display: none; }

#burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; padding: 7px;
}
#burger span { display: block; height: 2px; background: var(--text); border-radius: 1px; transition: all .25s ease; }
#burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
#burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

#drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 998; }
#drawer {
  position: fixed; top: 0; left: 0; width: 100%; height: auto;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  z-index: 999; padding: 0; max-height: 70dvh; overflow-y: auto;
}

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--border);
}

#drawer-close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: none; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; padding: 0;
  font-size: 18px; font-weight: 600; color: var(--text);
  transition: all var(--tr);
}

#drawer-close:hover {
  background: var(--border);
  color: var(--white);
}

#drawer > a:not(.btn) { 
  display: block; padding: 14px 20px; color: var(--text); 
  font-size: 0.95rem; border-radius: 0; transition: all var(--tr);
  border-bottom: 1px solid rgba(36,52,66,0.3);
}

#drawer > a:not(.btn):hover { 
  background: rgba(42,171,238,.06); color: var(--accent); 
  padding-left: 24px;
}

#drawer .btn {
  margin: 16px 20px 20px; width: calc(100% - 40px);
}

/* ── Section helpers ── */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section-heading { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.section-desc { text-align: center; color: var(--dim); font-size: .9rem; max-width: 480px; margin: 0 auto 36px; }

/* ── Hero ── */
.hero { padding: 110px 0 48px; }
.hero-grid { display: flex; flex-direction: column; gap: 32px; align-items: center; }
.hero-content { text-align: center; }
.hero-rating {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 16px;
  background: rgba(42,171,238,.08); font-size: .78rem; color: var(--dim); margin-bottom: 20px;
}
.hero-rating .stars { color: #f5a623; letter-spacing: 1px; }
.hero h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.hero .accent { color: var(--accent); }
.hero-sub { color: var(--dim); font-size: .95rem; max-width: 460px; margin: 0 auto 22px; line-height: 1.6; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-image { max-width: 240px; margin: 0 auto; }

/* ── Split (Statement) ── */
.split { display: flex; flex-direction: column; gap: 24px; }
.split-text h2 { font-size: 1.35rem; margin-bottom: 10px; }
.split-text p { color: var(--dim); line-height: 1.65; }
.split-card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  border-left: 3px solid var(--accent);
}
.split-card p { color: var(--text); font-size: .92rem; margin-bottom: 16px; line-height: 1.65; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px; border-radius: 6px; font-size: .75rem; font-weight: 500;
  background: rgba(42,171,238,.08); color: var(--accent);
}

/* ── Features (horizontal list) ── */
.feature-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 36px; }
.feature-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius);
  transition: background var(--tr);
}
.feature-item:hover { background: var(--card); }
.feature-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(42,171,238,.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.feature-item h3 { font-size: .95rem; font-weight: 600; margin-bottom: 3px; }
.feature-item p { color: var(--dim); font-size: .85rem; line-height: 1.5; }

.features-visual { max-width: 340px; margin: 0 auto; }

/* ── Timeline (Workflow) ── */
.timeline {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  max-width: 640px; margin: 0 auto;
}
.timeline-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  transition: border-color var(--tr);
}
.timeline-item:hover { border-color: var(--accent); }
.timeline-dot { display: none; }
.timeline-num {
  font-size: .7rem; font-weight: 700; color: var(--accent);
  letter-spacing: .5px; text-transform: uppercase;
}
.timeline-content h3 { font-size: .92rem; font-weight: 600; margin: 3px 0 5px; }
.timeline-content p { color: var(--dim); font-size: .84rem; line-height: 1.5; }

/* ── Pillars (Matrix) ── */
.pillars { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pillar {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  border-top: 2px solid var(--accent); transition: transform var(--tr);
}
.pillar:hover { transform: translateY(-2px); }
.pillar-icon { color: var(--accent); margin-bottom: 12px; }
.pillar h3 { font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.pillar p { color: var(--dim); font-size: .85rem; line-height: 1.5; }

/* ── Compare table ── */
.compare-table { max-width: 640px; margin: 0 auto; }
.compare-header {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: 1px;
  font-size: .75rem; font-weight: 600; color: var(--dim);
  text-transform: uppercase; letter-spacing: .5px;
  padding: 0 0 10px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.compare-header > div:first-child { visibility: hidden; }
.compare-row {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: 1px;
  padding: 12px 0; border-bottom: 1px solid rgba(36,52,66,.5);
  font-size: .85rem;
}
.compare-label { font-weight: 600; color: var(--white); font-size: .85rem; }
.compare-cell--dim { color: var(--dim); }
.compare-cell--accent { color: var(--accent); }

/* ── Trust ── */
.trust-row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 36px; }
.trust-item {
  text-align: center; padding: 28px 20px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--tr), transform var(--tr);
}
.trust-item:hover { border-color: rgba(42,171,238,.25); transform: translateY(-2px); }
.trust-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(42,171,238,.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.trust-item h3 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.trust-item p { color: var(--dim); font-size: .84rem; line-height: 1.55; max-width: 240px; margin: 0 auto; }
.trust-visual { max-width: 280px; margin: 0 auto; }

/* ── Install ── */
.install-box {
  max-width: 560px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius);
  overflow: hidden;
}
.install-main { padding: 28px 24px; text-align: center; }
.install-main h3 { font-size: 1.1rem; margin-bottom: 6px; }
.install-main p { color: var(--dim); font-size: .9rem; margin-bottom: 18px; }
.install-steps {
  list-style: none; counter-reset: s;
  border-top: 1px solid var(--border); padding: 16px 24px;
  display: grid; gap: 10px;
}
.install-steps li {
  counter-increment: s; display: flex; align-items: center; gap: 12px;
  font-size: .88rem; color: var(--text);
}
.install-steps li::before {
  content: counter(s); flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(42,171,238,.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}

/* ── FAQ ── */
.faq-list { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border-radius: 10px; overflow: hidden; transition: background var(--tr);
}
.faq-item[open] { background: var(--card); }
.faq-item summary {
  padding: 14px 18px; font-weight: 600; font-size: .9rem; color: var(--white);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item summary:hover { color: var(--accent); }
.faq-body { padding: 0 18px 14px; color: var(--dim); font-size: .87rem; line-height: 1.6; }

/* ── CTA ── */
.cta-section { text-align: center; border-top: 1px solid var(--border); }
.cta-inner h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-inner p { color: var(--dim); margin-bottom: 20px; }

/* ── Footer ── */
footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 32px 0 20px; }
.footer-top { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.footer-brand p { color: var(--dim); font-size: .8rem; margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: var(--dim); font-size: .8rem; transition: color var(--tr); }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 16px; border-top: 1px solid var(--border);
  color: var(--dim); font-size: .75rem;
}
.footer-legal { margin-top: 6px; line-height: 1.6; }

/* ════ Tablet 768+ ════ */
@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .section { padding: 72px 0; }
  .section-heading { font-size: 1.7rem; }

  .desktop-nav { display: flex; }
  .header-cta { display: inline-flex; }
  #burger { display: none; }

  .hero { padding: 130px 0 56px; }
  .hero-grid { flex-direction: row; gap: 40px; }
  .hero-content { text-align: left; flex: 1; }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { margin: 0 0 22px; }
  .hero-buttons { justify-content: flex-start; }
  .hero-image { flex-shrink: 0; max-width: 260px; }

  .split { flex-direction: row; align-items: center; gap: 36px; }
  .split-text, .split-card { flex: 1; }

  .feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }

  .pillars { grid-template-columns: 1fr 1fr; }

  .compare-table { max-width: 100%; }

  .trust-row { grid-template-columns: repeat(3, 1fr); }

  .install-steps { grid-template-columns: 1fr 1fr; }

  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ════ Desktop 1024+ ════ */
@media (min-width: 1024px) {
  .container { padding: 0 40px; }
  .section { padding: 84px 0; }

  .hero { padding: 140px 0 64px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-image { max-width: 300px; }

  .split { gap: 48px; }
  .split-text h2 { font-size: 1.6rem; }

  .pillars { grid-template-columns: repeat(4, 1fr); }

  .timeline { grid-template-columns: 1fr 1fr; max-width: 100%; }

  .section-heading { font-size: 1.9rem; }

  .cta-inner h2 { font-size: 2rem; }
}

/* ════ Anim ════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content { animation: fadeUp .45s ease-out; }
.hero-image { animation: fadeUp .45s ease-out .1s both; }
