/* Qanat site — V2 design (owner, docs/store/design/index-v2.html), single external
   stylesheet. No third-party resources: system font stack + emoji from the
   system emoji font only (no @font-face, no downloads — gallery-label emoji
   stay). Strict CSP: no inline styles anywhere (check.py fails on style=
   attributes and <style> elements in *.html; the <style> blocks inside the
   img/*.svg logo artwork are part of those image assets, not page styles).
   Contrast audit (O-48 step 3, body text pairs, all >= 4.5:1, no shade
   changes needed): #1F0A3A on #FAF5FF 16.8; #6B5B7B on #FAF5FF 5.7;
   #7B2CBF on #FFFFFF 7.1; #C2185B on #FAF5FF 5.5; #5B1A8E on #FFFFFF 10.6;
   #FFFFFF on #5B1A8E 10.6 / on #7B2CBF 7.1 / on #C2185B 5.9;
   footer translucent whites on #5B1A8E also pass (0.6 white ~= 6.9). */
:root {
  --purple-deep: #5B1A8E;
  --purple: #7B2CBF;
  --magenta: #C2185B;
  --pink: #E91E8A;
  --lavender: #F3E8FF;
  --lavender-soft: #FAF5FF;
  --text: #1F0A3A;
  --text-muted: #6B5B7B;
  --sc-purple: #6B0FC1;
  --sc-red: #E63946;
  --sc-dark: #0F1115;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  color: var(--text);
  background: var(--lavender-soft);
  line-height: 1.6;
  overflow-x: hidden;
}

[dir="rtl"] body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, 'Noto Kufi Arabic', Arial, sans-serif; }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 245, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(123, 44, 191, 0.08);
  transition: all 0.3s;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  color: var(--purple-deep);
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--purple); }

.nav-cta {
  background: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
  color: white !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(194, 24, 91, 0.35);
}

/* HERO */
.hero {
  min-height: 100vh;
  padding: 140px 32px 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(194, 24, 91, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(91, 26, 142, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid rgba(123, 44, 191, 0.15);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(123, 44, 191, 0.05);
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--magenta);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero .nocontent-line {
  font-size: 16px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(194, 24, 91, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(194, 24, 91, 0.45);
}

.btn-secondary {
  background: white;
  color: var(--purple-deep);
  border: 1px solid rgba(123, 44, 191, 0.2);
}

.btn-secondary:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tv-mockup {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--magenta) 100%);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(91, 26, 142, 0.35);
  position: relative;
  animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.tv-screen {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0d0618;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tv-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tv-shot-1 { z-index: 1; }
.tv-shot-2 {
  z-index: 2;
  opacity: 0;
  animation: heroShot2 12s ease-in-out infinite;
}
.tv-shot-3 {
  z-index: 3;
  opacity: 0;
  animation: heroShot3 12s ease-in-out infinite;
}

@keyframes heroShot2 {
  0%, 28.33% { opacity: 0; }
  33.33%, 66.67% { opacity: 1; }
  71.67%, 100% { opacity: 0; }
}

@keyframes heroShot3 {
  0%, 61.67% { opacity: 0; }
  66.67%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

.tv-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.06) 28%,
    rgba(255, 255, 255, 0) 52%
  );
}

.floating-card {
  position: absolute;
  z-index: 3;
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(91, 26, 142, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.floating-card-1 {
  top: -20px; left: -30px;
  animation: floatY 5s ease-in-out infinite;
}

.floating-card-2 {
  bottom: -20px; right: -30px;
  animation: floatY 7s ease-in-out infinite reverse;
}

.fc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.fc-purple { background: linear-gradient(135deg, var(--purple), var(--magenta)); color: white; }
.fc-pink { background: linear-gradient(135deg, var(--magenta), var(--pink)); color: white; }

.fc-sub { font-size: 12px; color: var(--text-muted); }

/* SECTIONS */
section {
  padding: 100px 32px;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  color: var(--magenta);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: white;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(123, 44, 191, 0.08);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(91, 26, 142, 0.12);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  color: white;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* SCREENSHOTS — real 16:9 shots inside the V2 dark card frame */
.screenshots {
  background: linear-gradient(180deg, var(--lavender-soft) 0%, #EBE0F5 100%);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.screen {
  margin: 0;
  border-radius: 20px;
  background: var(--sc-dark);
  border: 1px solid rgba(107, 15, 193, 0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  padding: 12px 12px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sc-purple), var(--sc-red));
  z-index: 2;
}

.screen:hover {
  transform: translateY(-8px);
  border-color: var(--sc-red);
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.25);
}

.screen img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.screen-label {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: white;
  opacity: 0.9;
  padding-top: 12px;
}

/* CTA */
.cta-section {
  padding: 120px 32px;
}

.cta-box {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--magenta) 100%);
  border-radius: 32px;
  padding: 80px 60px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(194, 24, 91, 0.3);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
  border-radius: 50%;
}

.cta-box::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  border-radius: 50%;
}

.cta-box h2 {
  color: white;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.cta-box p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.cta-box .btn {
  background: white;
  color: var(--purple-deep);
  position: relative;
  z-index: 2;
}

.cta-box .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* CONTENT PAGES (privacy / terms / support): same V2 type scale on a plain
   centered column so every page shares the design. */
.prose {
  max-width: 800px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}

.prose h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
}

.prose h2 {
  font-size: 24px;
  margin-top: 40px;
}

.prose p, .prose li {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 12px;
}

.prose ul { padding-inline-start: 24px; }

.prose .meta { color: var(--text-muted); font-size: 15px; }

.prose a { color: var(--purple); }

.draft {
  background: white;
  border: 1px solid var(--magenta);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.prose dl dt { font-weight: 700; margin-top: 20px; font-size: 17px; }
.prose dl dd { margin: 4px 0 0; color: var(--text-muted); font-size: 16px; }

.prose code {
  background: var(--lavender);
  padding: 0 0.3em;
  border-radius: 4px;
  font-size: 15px;
}

/* FOOTER */
footer {
  background: var(--purple-deep);
  color: rgba(255,255,255,0.8);
  padding: 60px 32px 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.7;
  max-width: 300px;
}

.footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 16px;
}

/* RTL mirror: grids and flex rows mirror automatically; swap the absolute
   floating cards. */
[dir="rtl"] .floating-card-1 { left: auto; right: -30px; }
[dir="rtl"] .floating-card-2 { right: auto; left: -30px; }
[dir="rtl"] .feature-card::before { transform-origin: right; }
[dir="rtl"] .hero p, [dir="rtl"] .hero h1 { text-align: right; }

@media (max-width: 899px) {
  .hero-inner { grid-template-columns: 1fr; gap: 60px; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 599px) {
  .floating-card-1 { left: -8px; }
  .floating-card-2 { right: -8px; }
  [dir="rtl"] .floating-card-1 { left: auto; right: -8px; }
  [dir="rtl"] .floating-card-2 { right: auto; left: -8px; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .cta-box { padding: 50px 30px; }
  section { padding: 70px 20px; }
  .prose { padding: 120px 20px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before, .hero::after,
  .badge-dot, .tv-mockup,
  .floating-card-1, .floating-card-2,
  .tv-shot-2, .tv-shot-3 { animation: none; }
  .tv-shot-2, .tv-shot-3 { display: none; }
  .btn, .btn-primary, .btn-secondary,
  .feature-card, .screen, .nav-cta,
  .nav-links a, .footer-col a { transition: none; }
}
