/* Jajrood Training — Minimalism & Swiss Style (UI UX Pro Max design system)
   Dark by default (user request 2026-10-31); light theme via [data-theme="light"].
   Tokens: primary #2563EB, accent/CTA #EA580C.
   Contrast 4.5:1 minimum. No emoji as icons. */

:root {
  --color-primary: #2563EB;
  --color-on-primary: #FFFFFF;
  --color-accent: #EA580C;
  --color-background: #0B1220;
  --color-foreground: #E2E8F0;
  --color-card: #131E32;
  --color-muted: #94A3B8;
  --color-muted-bg: #1E293B;
  --color-border: #26334A;
  --color-success: #4ADE80;
  --color-success-bg: #14532D;
  --color-banner-bg: #451A03;
  --color-banner-border: #9A3412;
  --color-banner-text: #FED7AA;
  --radius: 12px;
  --max-width: 960px;
}
[data-theme="light"] {
  --color-background: #F8FAFC;
  --color-foreground: #1E293B;
  --color-card: #FFFFFF;
  --color-muted: #475569;
  --color-muted-bg: #E9EFF8;
  --color-border: #E2E8F0;
  --color-success: #15803D;
  --color-success-bg: #DCFCE7;
  --color-banner-bg: #FFF7ED;
  --color-banner-border: #FDBA74;
  --color-banner-text: #7C2D12;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 0.6rem; }
h2 { font-size: 1.5rem; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4rem; }
h4 { font-size: 1rem; font-weight: 700; margin: 0 0 0.2rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--color-primary); }
img { max-width: 100%; display: block; }

/* Visible focus states (keyboard nav) */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  right: 1rem;
  top: -100px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
  transition: top 200ms ease;
}
.skip-link:focus { top: 1rem; color: var(--color-on-primary); }

/* Slim sticky progress strip (brand + nav removed at the user's request, 2026-10-31).
   Solid background so scrolling text never shows through. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -1rem;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
}
.progress-wrap { height: 6px; background: var(--color-muted-bg); }
.progress-bar {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 300ms ease;
}
.progress-row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.35rem 1rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.progress-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.theme-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.theme-btn:hover { color: var(--color-foreground); background: var(--color-muted-bg); }

/* Hero (pinned, scroll-scrub — 400vh section, sticky 100vh pin) */
.hero { position: relative; height: 400vh; }
.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 40%, transparent 60%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}
#scrollCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Short texts over the video — one at a time, changing with scroll */
.hero-steps {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 2vh 1.25rem 0;
  text-align: center;
  opacity: 0;
  transition: opacity 400ms ease;
}
.hero-step.active { opacity: 1; }
.hero-step h1,
.hero-step .hero-line {
  color: #FFFFFF;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75), 0 1px 4px rgba(0, 0, 0, 0.6);
  margin: 0;
}
.hero-kicker {
  color: #FDE68A;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  margin: 0;
}
.hero-scroll {
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

/* Main layout */
main { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem 3rem; }
.hero { max-width: none; margin: 0 -1rem; }

/* Section cards — Swiss: white, grid, sharp, lots of white space */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  margin: 1.5rem 0;
  scroll-margin-top: 70px;
}
.step {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-muted-bg);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
  margin-bottom: 0.7rem;
}
.note {
  background: var(--color-muted-bg);
  border-right: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Script + objections */
.script {
  background: var(--color-background);
  border-right: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 0 0 1rem;
  font-weight: 500;
}
.objection {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
}
.objection p { margin: 0; color: var(--color-muted); }

/* Checklists — 44px touch targets, clear checked state */
.checklist { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.checklist li { border-top: 1px solid var(--color-border); }
.checklist li:first-child { border-top: none; }
.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.7rem 0.2rem;
  cursor: pointer;
  transition: background 150ms ease;
  border-radius: 8px;
}
.checklist label:hover { background: var(--color-background); }
.checklist input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 0.35rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.checklist input[type="checkbox"]:checked + span {
  color: var(--color-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.card.done { border-color: var(--color-success); }
.card.done .step { color: var(--color-success); background: var(--color-success-bg); }

/* Product gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.2rem 0;
}
.gallery figure {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-background);
}
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FFFFFF;
}
.gallery figcaption {
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
}

/* Placeholder + Buddy additions */
.placeholder { border-style: dashed; background: var(--color-background); }
.additions { border: 2px solid var(--color-accent); }
.additions-banner {
  background: var(--color-banner-bg);
  border: 1px solid var(--color-banner-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  color: var(--color-banner-text);
}

/* Footer */
.footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 1.5rem 1rem 0;
}
.reset-btn {
  font-family: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  margin-top: 0.8rem;
  background: var(--color-card);
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 200ms ease;
}
.reset-btn:hover { background: var(--color-muted-bg); }

/* Responsive */
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero-step h1, .hero-step .hero-line { font-size: 1.6rem; }
  .card { padding: 2rem; }
}
@media (min-width: 1024px) {
  body { font-size: 17px; }
}
@media (max-width: 374px) {
  .gallery { grid-template-columns: 1fr; }
}

/* Reduced motion: no smooth scroll, no transitions, static hero */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .hero-pin { position: relative; height: auto; min-height: 80vh; }
}

/* Competitor gallery — section 3 */
.competitor-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.competitor-gallery figure {
  margin: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.competitor-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: var(--color-muted-bg);
}
.competitor-gallery figcaption {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-foreground);
  text-align: center;
}
