/* Landing page (index.html) */

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--s-8) var(--s-9); isolation: isolate; }
.hero-backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-backdrop::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 85% 10%, rgba(224, 69, 123, 0.32), transparent 70%),
    radial-gradient(45% 50% at 10% 85%, rgba(194, 24, 91, 0.22), transparent 70%),
    radial-gradient(35% 35% at 50% 40%, rgba(120, 60, 200, 0.10), transparent 70%);
  filter: blur(10px);
}
.hero-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
}
.hero-backdrop img {
  position: absolute; width: 640px; height: 640px; inset-inline-end: -120px; top: -80px;
  opacity: 0.14; filter: blur(28px) saturate(0.6); border-radius: 50%;
}
.hero-fade { position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-7); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 6px 14px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); margin-bottom: var(--s-5);
}
.hero-badge b { background: var(--grad-pink); color: #fff; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.2; margin-bottom: var(--s-5); }
.grad-text { background: linear-gradient(135deg, #ff7aa8 0%, #e0457b 55%, #ff9cc0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 560px; margin-bottom: var(--s-6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
html[dir="ltr"] #hero-start svg { transform: scaleX(-1); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-3); font-size: var(--fs-sm); }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }

/* Code window (shared with teaser) */
.code-window {
  direction: ltr; text-align: left;
  background: linear-gradient(180deg, #1a1a1d 0%, #151517 100%);
  border: 1px solid var(--border-strong); border-radius: var(--r-xl);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(224, 69, 123, 0.06), 0 0 80px rgba(224, 69, 123, 0.12);
  overflow: hidden;
}
.code-window__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.code-window__bar i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.code-window__bar i:nth-child(1) { background: #ff5f57; }
.code-window__bar i:nth-child(2) { background: #febc2e; }
.code-window__bar i:nth-child(3) { background: #28c840; }
.code-window__tab { margin-inline-start: 14px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-2); background: rgba(255, 255, 255, 0.05); padding: 4px 12px; border-radius: 8px; border: 1px solid var(--border); }
.code-window__run { margin-inline-start: auto; font-family: var(--font-ar); font-size: var(--fs-xs); font-weight: 700; color: #fff; background: var(--grad-pink); padding: 4px 12px; border-radius: 8px; direction: rtl; }
html[dir="ltr"] .code-window__run { direction: ltr; font-family: inherit; }
.code-window pre { margin: 0; padding: 20px 22px; font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem); line-height: 1.85; overflow-x: auto; color: #d4d4d4; tab-size: 4; }
.code-window pre .ln { display: inline-block; width: 1.8em; color: var(--code-gutter); user-select: none; }
.code-output { border-top: 1px solid var(--border); padding: 16px 22px 20px; font-family: var(--font-mono); font-size: 0.875rem; background: rgba(0, 0, 0, 0.25); }
.code-output__label { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-family: var(--font-ar); font-size: var(--fs-xs); margin-bottom: 8px; direction: rtl; }
html[dir="ltr"] .code-output__label { direction: ltr; font-family: inherit; }
.code-output__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.code-output p { color: var(--green); line-height: 1.8; }
.code-output p[dir="rtl"] { text-align: left; }
/* Syntax colours */
.tk-k { color: #c586c0; font-weight: 600; } .tk-d { color: #569cd6; font-weight: 600; } .tk-f { color: #dcdcaa; } .tk-s { color: #ce9178; unicode-bidi: isolate; } .tk-n { color: #b5cea8; }
.tk-v { color: #9cdcfe; } .tk-c { color: #6a9955; } .tk-b { color: #4ec9b0; } .tk-p { color: #ffd700; }

.hero-media { position: relative; }
.hero-media .code-window { transform: perspective(1400px) rotateY(6deg) rotateX(2deg); transition: transform 0.5s var(--ease); }
html[dir="ltr"] .hero-media .code-window { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
.hero-media:hover .code-window, html[dir="ltr"] .hero-media:hover .code-window { transform: none; }
.floating-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(28, 28, 31, 0.92); border: 1px solid var(--border-strong); box-shadow: var(--shadow-2); font-size: var(--fs-sm); font-weight: 600;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.floating-chip svg { width: 18px; height: 18px; }
.floating-chip--a { top: -18px; inset-inline-start: -10px; color: var(--green); }
.floating-chip--b { bottom: -22px; inset-inline-end: 24px; color: var(--pink-text); }
.hero-media .code-output { padding-bottom: 34px; }

/* ---------- Why ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.why-card:hover { transform: translateY(-3px); background: var(--surface-2); }

/* ---------- Tracks ---------- */
.track-card { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); overflow: hidden; }
.track-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-pink); opacity: 0.85; }
.track-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.track-card__num { font-family: var(--font-mono); color: var(--text-3); font-size: var(--fs-sm); }
.track-card h3 { font-size: var(--fs-xl); margin: 0; }
.track-card p { flex: 1; }
.chip bdi, .chip[dir="ltr"] { font-family: var(--font-mono); font-size: 0.8125rem; }
.tracks-note { margin-top: var(--s-5); text-align: center; color: var(--text-3); }

/* ---------- How ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); counter-reset: step; }
.step { position: relative; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: var(--s-4);
  background: var(--grad-pink); color: #fff; font-weight: 700; font-size: 1.125rem; box-shadow: var(--shadow-pink);
}
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.step p { color: var(--text-2); }

/* ---------- Simulator teaser ---------- */
.teaser { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s-7); align-items: center; }
.check-list { list-style: none; padding: 0; margin: var(--s-5) 0 var(--s-6); display: grid; gap: var(--s-3); }
.check-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 4px; }

/* ---------- Watch & app ---------- */
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.channel-card { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); overflow: hidden; isolation: isolate; }
.channel-card::after { content: ""; position: absolute; width: 260px; height: 260px; inset-inline-end: -80px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 69, 123, 0.22), transparent 70%); z-index: -1; }
.channel-card h3 { font-size: var(--fs-xl); margin: 0; }
.channel-card .btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: var(--s-3); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color 0.2s; }
.faq details[open] { border-color: var(--pink-border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 60px; padding: 14px 20px; font-weight: 600; font-size: var(--fs-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--pink-soft) center / 14px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7aa8' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--text-2); }

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  border-radius: var(--r-xl); border: 1px solid var(--pink-border); padding: var(--s-8) var(--s-5);
  background: radial-gradient(70% 120% at 50% 0%, rgba(224, 69, 123, 0.28), transparent 70%), var(--surface);
}
.final-cta img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto var(--s-5); border: 1px solid var(--border-strong); }
.final-cta h2 { font-size: var(--fs-2xl); margin-bottom: var(--s-3); }
.final-cta p { color: var(--text-2); font-size: var(--fs-lg); max-width: 600px; margin: 0 auto var(--s-6); }
.final-cta .hero-ctas { justify-content: center; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .teaser { grid-template-columns: 1fr; }
  .hero-media { max-width: 640px; margin-inline: auto; width: 100%; }
  .hero-media .code-window { transform: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .channels { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding-block: var(--s-8); }
  .hero { padding-block: var(--s-6) var(--s-8); }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .floating-chip--a { inset-inline-start: 8px; }
  .floating-chip--b { inset-inline-end: 8px; }
  .track-card, .channel-card { padding: var(--s-5); }
  .hero-backdrop img { width: 420px; height: 420px; }
}
