/* Bandly marketing site only. Mini-App tokens stay in brand/ and mini-app/.
   Light surfaces are white. Pink and mid purple are accents, not page fills.
   Dark navy applies only through prefers-color-scheme. There is no toggle.
   Use logical properties so a later Persian (dir=rtl) pass does not reflow by hand.
   TODO: exact hex pending for pink, mid, and light purple.
   TODO: typeface TBD. */

:root {
  --brand-primary: #6956CC;
  --brand-pink: #E1AAFF; /* TODO: exact hex pending */
  --brand-purple-mid: #CBAFFF; /* TODO: exact hex pending */
  --brand-purple-light: #E3DAFF; /* TODO: exact hex pending */
  --brand-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* TODO: typeface TBD */
  --primary: var(--brand-primary);
  --on-primary: #ffffff;
  --soft: var(--brand-purple-light);
  --bg: #ffffff;
  --ink: #2A1B5E;
  --muted: #4A3A78;
  --line: var(--brand-purple-mid);
  --card: #ffffff;
  --link: #3A2878;
  --focus: var(--brand-primary);
  --shadow: 0 8px 24px rgba(42, 27, 94, 0.1);
  --shadow-raised: 0 16px 40px rgba(42, 27, 94, 0.16);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --container: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --soft: #1a2152;
    --bg: #0b1030;
    --ink: #f4f5ff;
    --muted: #c3c7e4;
    --line: #2c356c;
    --card: #141a3f;
    --link: #c4c0ff;
    --focus: #c4c0ff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-raised: 0 16px 40px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--brand-font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  inset-block-start: 0.75rem;
  transform: translateY(-150%);
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  z-index: 5;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(var(--container), calc(100% - var(--space-4)));
  margin-inline: auto;
}

.site-header {
  padding-block: var(--space-2);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
}

.brand picture {
  display: inline-flex;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  object-fit: contain;
}

.telegram-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.header-bar > .telegram-channel {
  margin-inline-start: auto;
}

.telegram-channel:hover {
  background: #5342B0;
  color: #ffffff;
}

.site-nav {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding-block: 0.45rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover {
  color: var(--link);
}

.hero,
.section {
  padding-block: var(--space-5);
}

.hero {
  background: var(--bg);
}

.hero-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-2);
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-pink);
  color: #2A1B5E;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1.slogan {
  max-width: 16ch;
  margin: 0 0 var(--space-2);
  font-size: clamp(2.75rem, 7.5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h1,
h2,
h3 {
  line-height: 1.2;
  overflow-wrap: break-word;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 3.35rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  text-align: start;
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.lead {
  margin: 0 0 var(--space-3);
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button-primary:hover {
  background: #5342B0;
  color: var(--on-primary);
}

.button-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

.telegram-login {
  position: relative;
  min-height: 48px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.telegram-login iframe {
  max-width: 100%;
}

.widget-fallback {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.telegram-login:has(iframe) .widget-fallback {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.login-success,
.login-error {
  margin-block: 1rem 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}

.login-success {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.login-success p {
  margin: 0;
}

.login-error {
  color: var(--ink);
  border-color: var(--brand-primary);
}

.hero-mascot {
  order: -1;
  margin: 0;
  width: min(100%, 520px);
  justify-self: center;
}

.hero-mascot img {
  display: block;
  width: 100%;
  height: auto;
}

.section-intro {
  margin: 0 0 var(--space-3);
  max-width: 42rem;
  color: var(--muted);
}

.steps,
.skill-grid,
.price-grid {
  display: grid;
  gap: var(--space-2);
  align-items: stretch;
}

.step,
.skill-card,
.price-card,
.note-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--space-3);
  box-shadow: var(--shadow);
}

.skill-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin-block-end: var(--space-2);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-block-end: 0.7rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.skill-card p,
.step p,
.price-card p,
.note-card p {
  margin: 0;
  color: var(--muted);
}

.skill-card h3,
.step h3,
.price-card h3 {
  color: var(--ink);
}

.report-layout {
  display: grid;
  gap: var(--space-3);
  align-items: center;
}

.report-mockup {
  margin: 0;
  justify-self: center;
}

.report-mockup img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin-inline: auto;
}

.report-fallback {
  display: none;
  max-width: 320px;
  padding: var(--space-2);
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.report-mockup.is-image-failed picture {
  display: none;
}

.report-mockup.is-image-failed .report-fallback {
  display: block;
}

.example-chip {
  display: inline-block;
  margin: 0 0 var(--space-1);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-pink);
  color: #2A1B5E;
  font-size: 0.75rem;
  font-weight: 700;
}

.tg-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
}

.tg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  flex: none;
}

.tg-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: var(--space-2);
  border-radius: 16px 16px 16px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tg-bubble::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  bottom: 0;
  border-width: 0 8px 10px 0;
  border-style: solid;
  border-color: transparent var(--card) transparent transparent;
}

.tg-name,
.tg-overall,
.tg-fix {
  margin: 0;
}

.tg-name {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.tg-time {
  margin-inline-start: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.tg-overall {
  margin-block: 8px 12px;
  color: var(--ink);
  font-weight: 700;
}

.tg-overall strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.tg-criteria,
.tg-notes {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.tg-criteria li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 6px;
  border-block-end: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.9rem;
}

.tg-criteria b {
  color: var(--brand-primary);
}

.tg-notes {
  padding-inline-start: 1.1rem;
  list-style: disc;
  color: var(--muted);
}

.tg-notes li + li {
  margin-block-start: 4px;
}

.tg-fix {
  margin-block-start: var(--space-1);
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--brand-purple-light);
  color: #2A1B5E;
  font-size: 0.9rem;
}

.tg-fix s {
  color: #4A3A78;
  margin-inline-end: 8px;
}

.tg-fix span {
  font-weight: 700;
}

.taste {
  background: var(--bg);
}

.taste-inner {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: relative;
  transform: none;
}

.price-card .stars {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--muted);
  font-weight: 700;
}

.price-card .pack-size {
  color: var(--ink);
  font-weight: 600;
}

.price-card .per-mock {
  margin-block: 4px 8px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.price-card .soon {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 600;
  opacity: 0.72;
}

.price-card .button {
  width: 100%;
  margin-block-start: auto;
  font-size: 0.875rem;
}

.flag {
  align-self: flex-start;
  margin: 0 0 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.price-card.is-recommended {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-raised);
  z-index: 1;
}

.price-card.is-recommended .flag {
  background: #6956CC;
  color: #ffffff;
}

.price-card[data-stars="1800"] .flag {
  background: linear-gradient(100deg, #E1AAFF 0%, #6956CC 42%);
  color: #ffffff;
}

.fine-print {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq details {
  border-block-end: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  padding-block: 0.85rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--link);
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2013";
}

.faq details p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 46rem;
}

.site-footer {
  padding-block: 2rem 2.5rem;
  background: var(--bg);
  border-block-start: 1px solid var(--line);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-nav a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover {
  color: var(--link);
}

.legal-note,
.copyright {
  margin: var(--space-2) 0 0;
  color: var(--muted);
}

.legal-note {
  max-width: 42rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

.copyright {
  font-size: 0.875rem;
}

.draft-banner {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-align: center;
}

.legal {
  padding-block: 2rem 3rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.legal h2 {
  margin-block: 1.6rem 0.4rem;
  font-size: 1.35rem;
}

.legal p,
.legal li {
  max-width: 42rem;
}

.legal ul {
  padding-inline-start: 1.2rem;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .hero,
  .section {
    padding-block: var(--space-6);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-6);
  }

  .hero-mascot {
    order: 0;
    justify-self: end;
  }

  .steps,
  .skill-grid,
  .price-grid {
    gap: var(--space-3);
  }

  .price-grid {
    padding-block: var(--space-2);
  }

  .price-card.is-recommended {
    transform: scale(1.05);
  }

  .steps,
  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .taste-inner {
    grid-template-columns: minmax(0, 1.4fr) auto;
  }
}

@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .skill-grid,
  .price-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .report-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
