/* Kursdosh AI — landing page. Same palette as the Mini App (app/webapp/static/style.css). */
:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --text: #0f1222;
  --text-2: #4d5468;
  --hint: #6f768b;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --brand: #5b5bf0;
  --brand-2: #8b5cf6;
  --success: #16a34a;
  --glass: rgba(246, 247, 251, 0.78);
  --glow: rgba(91, 91, 240, 0.16);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, 0.14);
  --tint: 13%;
  --radius: 20px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d14;
    --surface: #151824;
    --surface-2: #1c2030;
    --text: #f1f3fa;
    --text-2: #b0b6c8;
    --hint: #8a91a8;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --brand: #7c7cff;
    --brand-2: #a78bfa;
    --success: #34d399;
    --glass: rgba(11, 13, 20, 0.78);
    --glow: rgba(124, 124, 255, 0.18);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --tint: 20%;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d14;
  --surface: #151824;
  --surface-2: #1c2030;
  --text: #f1f3fa;
  --text-2: #b0b6c8;
  --hint: #8a91a8;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --brand: #7c7cff;
  --brand-2: #a78bfa;
  --success: #34d399;
  --glass: rgba(11, 13, 20, 0.78);
  --glow: rgba(124, 124, 255, 0.18);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --tint: 20%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg); }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.nav-in { height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand b, .grad {
  background: linear-gradient(135deg, var(--brand), var(--brand-2) 60%, #d946ef);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent);
}
.logo img { width: 100%; height: 100%; display: block; }
.links { display: flex; gap: 2px; margin-left: auto; }
.links a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: 15px; transition: background 0.15s, color 0.15s; }
.links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.lang a { padding: 7px 9px; border-radius: 9px; font-size: 13px; font-weight: 700; line-height: 1; color: var(--hint); }
.lang a:hover { color: var(--text); }
.lang a[aria-current] { background: var(--surface-2); color: var(--text); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); padding: 0;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: 16px; font-weight: 700; font-size: 16px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 35%, transparent);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 45%, transparent); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 19px; height: 19px; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn.sm { padding: 10px 16px; font-size: 14.5px; border-radius: 12px; box-shadow: none; }
.btn.white { background: #fff; color: #4338ca; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding: 72px 0 64px; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: -140px; height: 720px; pointer-events: none;
  background:
    radial-gradient(620px 340px at 12% 24%, var(--glow), transparent 70%),
    radial-gradient(560px 340px at 88% 30%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%);
}
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }
h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; margin: 22px 0 18px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 540px; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 15px; font-weight: 550; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks svg { width: 18px; height: 18px; color: var(--success); }

/* Hero illustration: a title page and two slides drawn in the bot's "Classic" theme. */
.art { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 0.88; container-type: inline-size; }
.page {
  position: absolute; left: 1%; top: 5%; width: 45%; aspect-ratio: 1 / 1.414; padding: 6% 4.5% 5%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #fff; color: #1d2433; border-radius: 1.4cqw; box-shadow: var(--shadow-lg);
  transform: rotate(-7deg); font-family: "Times New Roman", Times, serif;
}
.pg-top { font-size: 1.5cqw; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; }
.pg-ln { display: block; width: 100%; height: 0.7cqw; border-radius: 1cqw; background: #e3e6ee; margin-top: 1.3cqw; }
.pg-kind { margin-top: auto; font-size: 4cqw; font-weight: 700; letter-spacing: 0.14em; }
.pg-topic { font-size: 1.85cqw; line-height: 1.35; font-style: italic; margin-top: 1.4cqw; }
.pg-who { margin-top: auto; align-self: flex-end; width: 48%; }
.pg-city { margin-top: 7%; font-size: 1.6cqw; }

.slide {
  position: absolute; width: 63%; aspect-ratio: 16 / 9; border-radius: 1.4cqw; overflow: hidden; box-shadow: var(--shadow-lg);
  font-family: Calibri, Carlito, "Segoe UI", Roboto, sans-serif;
}
.slide i { position: absolute; display: block; }
.s-hero { right: 0; top: 2%; transform: rotate(3deg); color: #fff; background: linear-gradient(135deg, #1f3a5f, #2b5c8a); }
.s-bar { left: 0; top: 0; bottom: 0; width: 3%; background: #3a8dde; }
.s-title { position: absolute; left: 10%; top: 31%; font-size: 4.4cqw; font-weight: 700; letter-spacing: -0.01em; }
.s-sub { position: absolute; left: 10%; top: 52%; font-size: 2.3cqw; color: #d9e6f5; }
.s-line { left: 10%; top: 69%; width: 14%; height: 0.7cqw; border-radius: 1cqw; background: #3a8dde; }
.s-orb { right: -12%; bottom: -38%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: #3a8dde; opacity: 0.35; }

.s-body { right: 5%; bottom: 4%; display: grid; grid-template-columns: 1.15fr 1fr; gap: 5%; padding: 5.5% 5.5% 5.5% 7%; background: #fff; color: #2b2f36; }
.sb-title { font-size: 2.5cqw; font-weight: 700; color: #1f3a5f; line-height: 1.2; }
.sb-rule { position: static !important; width: 26%; height: 0.55cqw; border-radius: 1cqw; background: #3a8dde; margin: 1.4cqw 0 1.6cqw; }
.s-body ul { margin: 0; padding: 0; list-style: none; font-size: 1.7cqw; line-height: 1.75; }
.s-body li { display: flex; align-items: center; gap: 0.9cqw; white-space: nowrap; }
.s-body li::before { content: ""; width: 0.8cqw; height: 0.8cqw; border-radius: 50%; background: #3a8dde; flex: none; }
.sb-img {
  position: relative; border-radius: 1cqw; overflow: hidden; display: flex; align-items: flex-end; gap: 9%; padding: 0 10% 10%;
  background: linear-gradient(160deg, #e0edff, #b7d3f6);
}
.sb-img i { position: static !important; flex: 1; border-radius: 0.6cqw 0.6cqw 0 0; background: linear-gradient(#3a8dde, #1f3a5f); }

.badge {
  position: absolute; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 10px 14px; border-radius: 14px; font-size: max(12px, 2.5cqw); font-weight: 550;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.b-done { left: 0; bottom: 9%; }
.b-fmt { right: 3%; top: -5%; gap: 6px; padding: 8px; animation-delay: -3s; }
.ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); flex: none; }
.ok svg { width: 14px; height: 14px; }
.fmt { font-size: max(11px, 2cqw); font-weight: 800; letter-spacing: 0.03em; padding: 4px 8px; border-radius: 8px; color: #fff; }
.f-pptx { background: #d24726; }
.f-docx { background: #2b579a; }
.f-pdf { background: #e5484d; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--text-2); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding-top: 104px; }
.head { max-width: 660px; margin-bottom: 36px; }
.kicker { display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 12px; }
.head p { margin: 0; color: var(--text-2); font-size: 18px; }
h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }

.ico {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) var(--tint), transparent);
}
.ico svg { width: 24px; height: 24px; }

.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc {
  display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.svc p, .feat p, .steps p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.svc p { margin-bottom: 18px; }
.svc-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--hint); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 45px; right: -17px; width: 18px; border-top: 2px dashed var(--border-strong);
}
.n {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- advantages ---------- */
.adv-card {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center;
  padding: 52px; border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 120%);
  box-shadow: 0 24px 60px rgba(91, 70, 229, 0.3);
}
.adv-card::before, .adv-card::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, 0.1); pointer-events: none; }
.adv-card::before { width: 420px; height: 420px; right: -120px; top: -220px; }
.adv-card::after { width: 260px; height: 260px; left: 38%; bottom: -190px; background: rgba(255, 255, 255, 0.07); }
.adv-card .kicker { color: rgba(255, 255, 255, 0.8); }
.adv-card p { margin: 0 0 26px; font-size: 18px; color: rgba(255, 255, 255, 0.88); }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.perks li {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; font-weight: 600;
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.perks svg { width: 22px; height: 22px; flex: none; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.about-text p { margin: 0 0 16px; color: var(--text-2); font-size: 17px; line-height: 1.7; }
.about-text p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px;
  list-style: none; cursor: pointer; font-weight: 650; font-size: 17px; border-radius: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-top: -4px;
  border-right: 2px solid var(--hint); border-bottom: 2px solid var(--hint); transform: rotate(45deg); transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--text-2); }

/* ---------- final call ---------- */
.final {
  position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 64px 24px;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.final::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(520px 240px at 50% 0%, var(--glow), transparent 75%);
}
.final p { margin: 0 auto 28px; max-width: 520px; color: var(--text-2); font-size: 18px; }

/* ---------- footer ---------- */
.foot { margin-top: 104px; padding: 32px 0 40px; border-top: 1px solid var(--border); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; color: var(--text-2); font-size: 15px; }
.foot-brand { display: flex; flex-direction: column; gap: 2px; }
.foot-tag { color: var(--hint); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a:hover { color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .links { display: none; }
  .nav-actions { margin-left: auto; }
  .hero { padding-top: 44px; }
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .adv-card { grid-template-columns: 1fr; padding: 40px 32px; }
  .about { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 820px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 76px; }
  .feat-grid, .svc-grid { grid-template-columns: 1fr; }
  .svc { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; padding: 18px; }
  .svc .ico { grid-row: 1 / span 2; margin: 0; }
  .svc p { margin-bottom: 14px; }
  .svc-foot { grid-column: 1 / -1; }
  .cta .btn { flex: 1 1 100%; }
  .adv-card { padding: 32px 22px; border-radius: 24px; }
  .nav .btn.sm { display: none; }
  .final { padding: 48px 20px; }
  .foot { margin-top: 76px; }
  .stat { padding: 16px 18px; }
  .stat b { font-size: 26px; }
}
@media (max-width: 380px) {
  h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
