/* ============================================================
   Lalarun — product page styles
   Brand: purple #6B63C8→#8A6FD8 · navy #2D2D4E
          coral #FF6B6B · pink #E8527C · gold #FFB627→#FFD75A
   ============================================================ */

:root {
  --purple: #6B63C8;
  --purple-lt: #8A6FD8;
  --navy: #2D2D4E;
  --navy-deep: #1c1c30;
  --coral: #FF6B6B;
  --pink: #E8527C;
  --gold: #FFB627;
  --gold-lt: #FFD75A;
  --ink: #1d1d1f;
  --ink-soft: #515163;
  --paper: #ffffff;
  --mist: #f5f5f7;
  --line: #e7e8f2;
  --radius: 22px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  letter-spacing: -0.022em;
  line-height: 1.07;
  margin: 0;
  font-weight: 700;
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__brand { display: flex; align-items: center; gap: 9px; }
.brand__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(45, 45, 78, 0.18);
}
.brand__word {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand__icon--sm { width: 24px; height: 24px; border-radius: 6px; }
.brand__word--sm { font-size: 17px; opacity: 0.9; }
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
}
.nav__links a {
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--purple); }
.nav__cta { margin-left: 4px; }

/* language selector */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 18px; /* desktop: sit just after the (right-aligned) nav links */
  padding: 5px 10px;
  border-radius: 980px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}
.lang__globe { font-size: 14px; line-height: 1; }
.lang__select {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  padding-right: 2px;
}
.lang__select:focus { outline: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 980px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
  cursor: pointer;
  border: none;
}
.btn--pill { padding: 8px 18px; font-size: 14px; }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
  box-shadow: 0 8px 22px rgba(107, 99, 200, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(107, 99, 200, 0.45); }
.btn--ghost { color: var(--purple); }
.btn--ghost:hover { opacity: 0.7; }
.btn--ghost-light { color: var(--gold-lt); }
.btn--block { width: 100%; margin-top: auto; }
.nav__cta {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
}
.nav__cta:hover { transform: translateY(-1px); }

/* ---------------- Hero ---------------- */
.eyebrow {
  font-size: 21px;
  font-weight: 600;
  color: var(--purple);
  margin: 0 0 10px;
  letter-spacing: 0;
}
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 92px 22px 70px;
  background: radial-gradient(120% 90% at 50% -10%, #efeaff 0%, #f7f7fb 45%, #ffffff 75%);
}
.hero__glow {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 520px;
  background: radial-gradient(50% 60% at 50% 30%, rgba(138, 111, 216, 0.35), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.hero__content { position: relative; max-width: 820px; margin: 0 auto; }
.hero__title {
  font-size: clamp(44px, 8.5vw, 88px);
  background: linear-gradient(180deg, var(--navy), #4a4a72);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 22px;
}
.hero__sub {
  font-size: clamp(18px, 2.4vw, 25px);
  color: var(--ink-soft);
  max-width: 660px;
  margin: 0 auto 34px;
  line-height: 1.42;
}
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* hero device */
.hero__device { position: relative; margin: 64px auto 0; width: max-content; }

/* ---------------- Generic sections ---------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 22px;
}
.section--dark {
  max-width: none;
  background: linear-gradient(180deg, var(--navy-deep), #14142a);
  color: #fff;
}
.section--dark .lead,
.section--dark .pricing__note { color: rgba(255,255,255,0.72); }
.section--dark > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.kicker {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.kicker--purple { color: var(--purple-lt); }
.kicker--coral  { color: var(--pink); }
.kicker--gold   { color: var(--gold); }
.kicker--center { text-align: center; }

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 18px 0 0;
}

/* ---------------- Feature rows ---------------- */
.feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}
.feature--reverse .feature__text { order: 2; }
.feature h2 { font-size: clamp(30px, 4.4vw, 50px); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li {
  position: relative;
  padding-left: 30px;
  margin: 12px 0;
  font-size: 17px;
  color: var(--ink-soft);
}
.section--dark .ticks li { color: rgba(255,255,255,0.78); }
.ticks li::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
}
.ticks li::after {
  content: "";
  position: absolute; left: 6px; top: 10px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.feature__art { display: flex; justify-content: center; }

/* ---------------- Device frame (iPhone bezel around a screenshot) ---------------- */
.device {
  position: relative;
  width: clamp(228px, 30vw, 290px);
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(155deg, #3a3a55, #16162a 60%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06) inset,
    0 36px 80px rgba(45, 45, 78, 0.42),
    0 6px 18px rgba(0, 0, 0, 0.25);
}
.device::after { /* side button */
  content: "";
  position: absolute; right: -2px; top: 128px;
  width: 3px; height: 56px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4a4a66, #26263c);
}
.device__screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(160deg, #6f5fd0, #4b3f9e); /* graceful fallback if img missing */
  aspect-ratio: 1260 / 2736;
}
.device__screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.device--hero { width: clamp(258px, 34vw, 320px); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
.device--tilt { transform: rotate(-3deg); transition: transform 0.5s var(--ease); }
.device--tilt:hover { transform: rotate(0deg); }

/* ---------------- Privacy ---------------- */
.privacy { text-align: center; }
.privacy__title { font-size: clamp(30px, 5vw, 52px); margin: 0 auto 56px; max-width: 760px; }
.privacy__grid, .stories__grid {
  display: grid;
  gap: 22px;
}
.privacy__grid { grid-template-columns: repeat(3, 1fr); text-align: left; }
.pcard {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.pcard__icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 26px; color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
  margin-bottom: 18px;
}
.pcard h3 { font-size: 22px; margin-bottom: 8px; }
.pcard p { color: var(--ink-soft); margin: 0; font-size: 16px; }

/* ---------------- Stories ---------------- */
.stories__grid { grid-template-columns: repeat(2, 1fr); }
.stories__showcase {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 52px;
}
.stories__device { display: flex; justify-content: center; }
.stories__stack { display: grid; gap: 22px; }
.story {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 38px 34px;
}
.story__tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  padding: 5px 12px; border-radius: 980px;
  margin-bottom: 18px;
}
.story h3 { font-size: 24px; margin-bottom: 12px; color: #fff; }
.story p { color: rgba(255,255,255,0.72); margin: 0; font-size: 16.5px; }

/* ---------------- Pricing ---------------- */
.pricing { text-align: center; }
.pricing__note { color: var(--ink-soft); font-size: 16px; margin: -34px auto 0; }
.pricing__group { margin-top: 56px; }
.pricing__group-title {
  font-size: 22px;
  margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.pricing__req {
  font-size: 13px; font-weight: 600;
  color: var(--purple);
  background: #efeaff;
  padding: 5px 12px; border-radius: 980px;
  text-transform: none; letter-spacing: 0;
}
.price-grid { display: grid; gap: 22px; max-width: 760px; margin: 0 auto; }
.price-grid--two { grid-template-columns: repeat(2, 1fr); }
.plan {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: left;
  display: flex; flex-direction: column;
  box-shadow: 0 14px 40px rgba(45,45,78,0.06);
}
.plan--accent {
  border-color: transparent;
  background: linear-gradient(160deg, #f3f0ff, #ffffff);
  box-shadow: 0 20px 50px rgba(107,99,200,0.18);
  outline: 2px solid var(--purple-lt);
}
.plan__badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--pink));
  padding: 4px 11px; border-radius: 980px;
}
.plan__name { font-size: 15px; font-weight: 700; color: var(--purple); margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.plan__price { font-size: 44px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.02em; }
.plan__price span { font-size: 17px; font-weight: 500; color: var(--ink-soft); }
.plan__desc { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 24px; }

/* ---------------- Download ---------------- */
.download { text-align: center; }
.download__grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}
.download__stores,
.download__direct {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
}
/* Official Apple App Store badge (white "alternative" style) — unmodified per
   Apple's marketing guidelines; localized SVG swapped by js/i18n.js. */
.store-badge {
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 4px; /* clear space around the badge */
  transition: transform 0.2s var(--ease);
}
.store-badge:hover { transform: translateY(-3px); }
.googleplay-badge { height: 74px; width: auto; display: block; }
.dl-card {
  display: flex; align-items: center; gap: 14px;
  height: 58px;
  padding: 0 22px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
  text-align: left;
}
.dl-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.12); }
.dl-card__icon {
  width: 34px; height: 34px; flex: none;
  background: #fff;
  -webkit-mask: var(--apple) center / contain no-repeat;
  mask: var(--apple) center / contain no-repeat;
  --apple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16.4 12.9c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.1-2.8.9-3.5.9s-1.8-.9-3-.8c-1.5 0-2.9.9-3.7 2.2-1.6 2.8-.4 6.9 1.1 9.2.8 1.1 1.6 2.3 2.8 2.3 1.1 0 1.5-.7 2.9-.7s1.7.7 2.9.7 2-1.1 2.7-2.2c.9-1.2 1.2-2.5 1.2-2.5s-2.7-1-2.7-3.7zM14.2 6.1c.6-.8 1-1.8.9-2.9-.9 0-2 .6-2.6 1.4-.6.7-1.1 1.7-.9 2.8 1 0 2-.6 2.6-1.3z'/%3E%3C/svg%3E");
}
.dl-card__icon--mac {
  --apple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 4h18a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-6l1 2h2a1 1 0 1 1 0 2H6a1 1 0 1 1 0-2h2l1-2H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 2v9h16V6H4z'/%3E%3C/svg%3E");
}
.dl-card__icon--android {
  --apple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.6 9.5l1.3-2.3a.4.4 0 0 0-.7-.4l-1.4 2.4a8.7 8.7 0 0 0-7.6 0L7.8 6.8a.4.4 0 0 0-.7.4l1.3 2.3A7.6 7.6 0 0 0 4.5 16h15a7.6 7.6 0 0 0-3.9-6.5zM9 13.4a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8zm6 0a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8z'/%3E%3C/svg%3E");
}
.dl-card__icon--windows {
  --apple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 4.4l7.7-1.1v8.2H3V4.4zm8.7-1.2L21 1.8v9.7h-9.3V3.2zM3 12.5h7.7v8.2L3 19.6v-7.1zm8.7 0H21v9.7l-9.3-1.3v-8.4z'/%3E%3C/svg%3E");
}
.dl-card__label { display: flex; flex-direction: column; line-height: 1.2; }
.dl-card__label small { font-size: 11px; color: rgba(255,255,255,0.6); }
.dl-card__label strong { font-size: 18px; }

/* beta */
.beta {
  margin: 64px auto 0;
  max-width: 860px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap;
  text-align: left;
  padding: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,182,39,0.12), rgba(232,82,124,0.12));
  border: 1px solid rgba(255,182,39,0.3);
}
.beta__text h3 { font-size: 26px; color: #fff; margin: 8px 0; }
.beta__text p { color: rgba(255,255,255,0.72); margin: 0; max-width: 420px; }
.beta__actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------------- Download page ---------------- */
.download-hero { padding-bottom: 58px; }
.download-hero__title {
  font-size: clamp(40px, 7vw, 76px);
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}
.download-detected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 980px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}
.download-detected strong { color: var(--purple); }
.download-page {
  display: grid;
  gap: 22px;
  padding-top: 64px;
}
.download-panel,
.download-all {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(45,45,78,0.07);
}
.download-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 36px;
}
.download-panel.is-active { display: grid; }
.download-panel__copy h2,
.download-all h2 {
  font-size: clamp(26px, 4vw, 42px);
}
.download-panel__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.download-panel__actions .btn { min-height: 52px; }
.download-beta {
  grid-column: 1 / -1;
  margin-top: 4px;
  max-width: none;
  background: linear-gradient(135deg, rgba(45,45,78,0.96), rgba(28,28,48,0.96));
  border-color: rgba(255,182,39,0.28);
}
.download-countdown {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.download-countdown strong {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-lt));
}
.download-all {
  padding: 30px;
}
.download-all > div:first-child {
  text-align: center;
  margin-bottom: 22px;
}
.download-all p {
  color: var(--ink-soft);
  margin: 10px 0 0;
}
.download-all__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.download-all .dl-card {
  background: var(--navy-deep);
  color: #fff;
  height: 66px;
  justify-content: flex-start;
}
.download-all .dl-card:hover { background: var(--navy); }
[dir="rtl"] .download-panel__actions { justify-content: flex-start; }

/* ---------------- Footer ---------------- */
.footer {
  background: var(--mist);
  border-top: 1px solid var(--line);
  padding: 40px 22px;
}
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 8px; }
.footer__links { display: flex; gap: 24px; font-size: 14px; }
.footer__links a { color: var(--ink-soft); }
.footer__links a:hover { color: var(--purple); }
.footer__copy { margin: 0 0 0 auto; color: var(--ink-soft); font-size: 13px; }

/* ---------------- Reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .device--hero { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- RTL (Farsi) ---------------- */
[dir="rtl"] .nav__links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang { margin-left: 0; margin-right: 18px; }
[dir="rtl"] .nav__cta { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .ticks { padding: 0; }
[dir="rtl"] .ticks li { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .ticks li::before { left: auto; right: 0; }
[dir="rtl"] .ticks li::after { left: auto; right: 6px; }
[dir="rtl"] .plan__badge { right: auto; left: 18px; }
[dir="rtl"] .device::after { right: auto; left: -2px; }
[dir="rtl"] .footer__copy { margin: 0 auto 0 0; }
[dir="rtl"] .pcard, [dir="rtl"] .plan, [dir="rtl"] .story { text-align: right; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .lang { margin-left: auto; }
  [dir="rtl"] .lang { margin-left: 0; margin-right: auto; }
  .feature { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .feature--reverse .feature__text { order: 0; }
  .ticks { display: inline-block; text-align: left; }
  .privacy__grid, .stories__grid, .price-grid--two { grid-template-columns: 1fr; }
  .download__grid { flex-direction: column; align-items: center; }
  .download__stores, .download__direct { flex-direction: column; }
  .stories__showcase { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 76px 22px; }
  .beta { text-align: center; justify-content: center; }
  .beta__text p { margin: 0 auto; }
  .download-panel {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 22px;
  }
  .download-panel__actions { justify-content: center; }
  .download-countdown { justify-content: center; }
  .download-all__grid { grid-template-columns: 1fr; }
  .footer__copy { margin: 0 auto; }
  .footer__inner { justify-content: center; text-align: center; }
}
