/* Intelligent Translator website.
 * Colors are the ones the app actually renders (Material 3 from the brand
 * seed #2874FF), so the site and the app read as one product. */
:root {
  --page: #eff3fd;
  --surface: #f9f8fe;
  --tint: #e2e6f4;
  --primary: #4c5d8e;
  --on-primary: #ffffff;
  --brand: #2874ff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --premium: #ffc107;
  --highlight: #fff176;
  --success: #16a34a;
  --shadow: 0 12px 32px rgba(39, 54, 102, 0.12);
  --badge-start: #2874ff;
  --badge-end: #4c5d8e;
  --badge-glow: rgba(40, 116, 255, 0.28);
  --badge-glow-strong: rgba(40, 116, 255, 0.5);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content: 1120px;
  --gutter: 16px;
  color-scheme: light;
}

/* Dark colors: from the device setting unless the visitor chose light with
   the switch, or always once they chose dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #101622;
    --surface: #1a2232;
    --tint: #242f46;
    --primary: #b3c5ff;
    --on-primary: #152c5c;
    --brand: #6f9bff;
    --text: #f4f7fb;
    --muted: #aab6c8;
    --border: #2b3549;
    --highlight: #ffd54f;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    --badge-start: #2f63d6;
    --badge-end: #3a4f86;
    --badge-glow: rgba(111, 155, 255, 0.25);
    --badge-glow-strong: rgba(111, 155, 255, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #101622;
  --surface: #1a2232;
  --tint: #242f46;
  --primary: #b3c5ff;
  --on-primary: #152c5c;
  --brand: #6f9bff;
  --text: #f4f7fb;
  --muted: #aab6c8;
  --border: #2b3549;
  --highlight: #ffd54f;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --badge-start: #2f63d6;
  --badge-end: #3a4f86;
  --badge-glow: rgba(111, 155, 255, 0.25);
  --badge-glow-strong: rgba(111, 155, 255, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 66px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
    "Noto Sans Bengali", "Nirmala UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus { left: var(--gutter); top: 8px; z-index: 10; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
}
.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}
.site-nav a:hover { background: var(--tint); color: var(--text); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { transform: rotate(-15deg); background: var(--tint); }
.theme-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.lang-switch {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  font-size: 1rem;
}
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.button[aria-disabled="true"] { cursor: default; }
/* Section headings: a pill that reads like a button, with a light sweeping
   across it and a soft pulsing glow. */
.badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  isolation: isolate;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(120deg, var(--badge-start), var(--badge-end));
  padding: 10px 24px;
  border-radius: 999px;
  box-shadow: 0 6px 18px var(--badge-glow);
  animation: badge-glow 2.8s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  animation: badge-dot 1.4s ease-in-out infinite;
}
.badge::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: badge-shine 3.2s ease-in-out infinite;
}
.badge:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 26px var(--badge-glow);
}

@keyframes badge-shine {
  0%, 35% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}
@keyframes badge-glow {
  0%, 100% { box-shadow: 0 6px 18px var(--badge-glow); }
  50% { box-shadow: 0 6px 28px var(--badge-glow-strong); }
}
@keyframes badge-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

/* Hero */
.hero { padding: 56px 0 32px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin: 16px 0;
  letter-spacing: -0.02em;
}
.hero .tagline {
  font-size: 1.15rem;
  color: var(--primary);
  font-style: italic;
  margin: 0 0 12px;
}
.hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

.phone {
  border: 10px solid #1f2430;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1f2430;
  max-width: 300px;
  margin: 0 auto;
}
.phone img { width: 100%; }

/* Sections */
section { padding: 56px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 12px 0; }
.section-head p { color: var(--muted); margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.card h3 { margin: 12px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--primary);
}
.icon svg { width: 24px; height: 24px; }

/* Feature cards: each has its own accent color, a tinted background, an
   accent bar on top, a floating icon, and a lift with a colored glow on
   hover. They rise into view as the page scrolls, where supported. */
.feature-1 { --accent: #2874ff; --accent-2: #6f9bff; }
.feature-2 { --accent: #f59e0b; --accent-2: #fbbf24; }
.feature-3 { --accent: #0891b2; --accent-2: #22d3ee; }
.feature-4 { --accent: #16a34a; --accent-2: #4ade80; }
.feature-5 { --accent: #9333ea; --accent-2: #c084fc; }
.feature-6 { --accent: #ea580c; --accent-2: #fb923c; }
.feature-7 { --accent: #db2777; --accent-2: #f472b6; }
.feature-8 { --accent: #0d9488; --accent-2: #2dd4bf; }

.feature {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0, transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.feature .icon {
  width: 52px;
  height: 52px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: icon-float 3.6s ease-in-out infinite;
}
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { color: var(--text); }
.feature:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 28%, transparent);
}
.feature:hover .icon { animation-duration: 1.2s; }

/* Neighbouring cards float out of step, so the grid ripples. */
.feature:nth-child(2n) .icon { animation-delay: -1.2s; }
.feature:nth-child(3n) .icon { animation-delay: -2.4s; }

@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-6deg); }
}

@supports (animation-timeline: view()) {
  .feature {
    animation: feature-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
  @keyframes feature-rise {
    /* translate/scale rather than transform, which the hover lift uses. */
    from { opacity: 0; translate: 0 28px; scale: 0.97; }
    to { opacity: 1; translate: 0 0; scale: 1; }
  }
}

/* Study highlight */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.split h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 12px 0; }
.split p { color: var(--muted); }
.mark {
  background: var(--highlight);
  color: #3d2d00;
  padding: 0 6px;
  border-radius: 4px;
}
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--success);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Screenshots */
.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  gap: 24px;
}
.screens figure { margin: 0; }
.screens figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.screens .phone { border-width: 7px; border-radius: 30px; }

/* Themes */
.theme-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.theme-strip figure { margin: 0; }
.theme-strip .phone { border-width: 7px; border-radius: 28px; }
.theme-strip figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 600;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
/* The seed colors each app theme is built from. */
.dot-light { background: #2874ff; }
.dot-dark { background: #101622; }
.dot-yellow { background: #ffc107; }
.dot-green { background: #43a047; }
.dot-cyan { background: #00bcd4; }

/* Pricing */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps .card { position: relative; }
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}
.packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.pack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
}
.pack strong { display: block; font-size: 1.4rem; }
.pack span { color: var(--muted); font-size: 0.9rem; }
.fine { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 16px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 32px 14px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* Call to action */
.cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
}
.cta h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta p { color: var(--muted); margin: 0 0 24px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 4px; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal .updated { color: var(--muted); margin: 0 0 24px; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal .note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* Not found */
.not-found { text-align: center; padding: 96px var(--gutter); }
.not-found h1 { font-size: 2.4rem; margin: 0 0 12px; }

/* Responsive */
@media (max-width: 900px) {
  .theme-strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 42%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .theme-strip figure { scroll-snap-align: center; }
  .hero .container, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero .phone { max-width: 260px; }
  .screens { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .split .phone { order: 2; }
}

@media (max-width: 640px) {
  .badge { font-size: 0.9rem; padding: 8px 18px; }
  .theme-strip { grid-auto-columns: 62%; }
  body { font-size: 16px; }
  .site-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  section { padding: 40px 0; }
  .hero .actions .button { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .screens { grid-template-columns: repeat(2, 1fr); }
  .screens figure:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; }
}

@media (max-width: 380px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge, .badge::before, .badge::after,
  .feature, .feature .icon { animation: none; }
  .feature { transition: none; }
  .badge { transition: none; }
}
