/* ===== TypeFix landing — styles ===== */
:root {
  --blue: #006FFD;
  --blue-700: #0057cc;
  --blue-light: #7fb4ff; /* accessible blue text on dark surfaces */
  --blue-glow: rgba(0, 111, 253, .35);
  --orange: #F26723;
  --green: #30D159;
  --yellow: #FAFE00;
  --gray: #A5A7A8;

  --ink-0: #11151a;
  --ink-1: #171c22;
  --ink-2: #1e252c;
  --surface: #232b33;
  --surface-2: #2b343d;
  --line: rgba(255, 255, 255, .09);
  --text: #eef2f6;
  --muted: #9aa3ad;

  --light-bg: #f4f7fb;
  --light-surface: #ffffff;
  --light-text: #1a2129;
  --light-muted: #5a6571;
  --light-line: #e4e9f0;

  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --header-h: 68px;
  --font: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); overflow-x: clip; }

body {
  font-family: var(--font);
  background: var(--ink-0);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 780px; }

.accent { color: var(--blue); }
.accent-orange { color: var(--orange); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px -6px var(--blue-glow);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: 0 12px 28px -6px var(--blue-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--blue-light);
  border: 1.5px solid var(--blue-light);
}
.btn-outline:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: .92rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-xl { padding: 18px 40px; font-size: 1.15rem; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(17, 21, 26, .55);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  background: rgba(17, 21, 26, .88);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.brand-logo { height: 30px; width: auto; }
.nav {
  display: flex;
  gap: 26px;
  margin-inline-start: auto;
  font-size: .95rem;
  font-weight: 500;
}
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 14px; }

/* Language dropdown — scales to many languages, works without JS via <details>. */
.lang-switch { position: relative; }
.lang-current {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  user-select: none;
  transition: background .2s, border-color .2s;
}
.lang-current::-webkit-details-marker { display: none; }
.lang-current:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.lang-current .flag { font-size: 1.05rem; line-height: 1; }
.lang-chev { opacity: .65; transition: transform .2s ease; }
.lang-switch[open] .lang-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 172px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .7);
  z-index: 60;
  animation: langpop .16s ease;
}
@keyframes langpop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.lang-opt .flag { font-size: 1.1rem; line-height: 1; }
.lang-opt:hover { background: rgba(255, 255, 255, .07); }
.lang-opt[aria-current="page"] { background: var(--blue); color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ===== Sections ===== */
.section { padding: 96px 0; position: relative; }
.section-dark { background: var(--ink-1); }
.section-dark:nth-of-type(even) { background: var(--ink-2); }
.section-light {
  background: var(--light-bg);
  color: var(--light-text);
}
.section-light .section-lead { color: var(--light-muted); }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.section-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  margin-top: 16px;
  max-width: 620px;
}
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* ===== Hero ===== */
.hero {
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 90px;
  /* ORIGINAL banner background (kept as the base layer under the video).
     To revert to the original banner: remove the <video class="hero-video">
     element from index.html and the .hero-video rule below. */
  background: radial-gradient(1200px 600px at 80% -10%, #1b3a63 0%, var(--ink-0) 55%);
  overflow: hidden;
  position: relative;
}
/* Keyboard video overlaid on the original background at 50% opacity */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}
/* Directional scrim: dark behind the text side, transparent over the video side,
   so the text stays readable while the video stays visible. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(8,11,15,.9) 0%, rgba(8,11,15,.62) 34%, rgba(8,11,15,.18) 64%, rgba(8,11,15,0) 100%);
}
[dir="rtl"] .hero-scrim {
  background: linear-gradient(to left, rgba(8,11,15,.9) 0%, rgba(8,11,15,.62) 34%, rgba(8,11,15,.18) 64%, rgba(8,11,15,0) 100%);
}
@media (max-width: 940px) {
  /* Hero stacks vertically on mobile -> darken from the top where the text sits */
  .hero-scrim, [dir="rtl"] .hero-scrim {
    background: linear-gradient(to bottom, rgba(8,11,15,.82) 0%, rgba(8,11,15,.62) 45%, rgba(8,11,15,.4) 100%);
  }
}
.hero-glow {
  position: absolute;
  top: -160px;
  inset-inline-end: 0;
  width: 520px;
  height: 520px;
  max-width: 70%;
  background: radial-gradient(circle, var(--blue-glow), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}
.menubar-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-light);
  font-weight: 600;
  font-size: .92rem;
  background: rgba(0, 111, 253, .18);
  border: 1px solid rgba(0, 111, 253, .45);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.02em;
}
/* Always break so the blue accent (+ its dot) sits on its own line, all sizes & languages */
.hero-title .accent::before { content: "\A"; white-space: pre; }
.hero-sub {
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  color: var(--muted);
  margin-top: 22px;
  max-width: 560px;
  line-height: 1.6;
  /* Let each sentence break into visually balanced lines instead of relying on
     a hard <br> that looks wrong at certain widths. */
  text-wrap: balance;
}
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: .9rem; margin-top: 18px; }
.hero-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: clamp(.78rem, 1.7vw, .92rem);
  font-weight: 500;
  margin-top: 14px;
  /* Keep the whole sentence on one line in every language (it wraps only on
     small phones, handled below). */
  white-space: nowrap;
}
.hero-privacy svg { flex: none; }
@media (max-width: 640px) {
  .hero-privacy { white-space: normal; align-items: flex-start; }
}

/* hero visual */
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.demo-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
  padding: 26px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.demo-side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.demo-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.demo-text { font-size: 1.5rem; font-weight: 800; direction: ltr; }
.demo-wrong { color: var(--orange); position: relative; }
.demo-wrong::after {
  content: '';
  position: absolute;
  inset-inline-start: -2px;
  top: 52%;
  height: 3px;
  width: 0;
  border-radius: 2px;
  background: var(--orange);
  animation: strike 4.5s ease-in-out infinite;
}
.demo-right { color: var(--green); animation: pop 4.5s ease-in-out infinite; }
.demo-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--blue); }
.demo-brand { font-size: .68rem; font-weight: 700; color: var(--blue); letter-spacing: .02em; }
[dir="rtl"] .demo-arrow svg { transform: scaleX(-1); }
.hero-menu-shot {
  width: 220px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, .7);
  border: 1px solid var(--line);
  transform: rotate(-2deg);
  margin-top: -6px;
}

@keyframes strike { 0%, 12% { width: 0; } 38%, 100% { width: calc(100% + 4px); } }
@keyframes pop { 0%, 42% { opacity: .25; transform: scale(.94); } 58%, 100% { opacity: 1; transform: scale(1); } }

/* ===== Problem ===== */
.problem-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.problem-emphasis {
  margin-top: 22px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--orange);
}
.gibberish-window {
  background: #0c0f13;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  direction: ltr;
}
.win-dots { display: flex; gap: 7px; margin-bottom: 14px; }
.win-dots span { width: 11px; height: 11px; border-radius: 50%; background: #3a424b; }
.win-dots span:nth-child(1) { background: #ff5f57; }
.win-dots span:nth-child(2) { background: #febc2e; }
.win-dots span:nth-child(3) { background: #28c840; }
.gib-line {
  color: #6f7a85;
  font-size: 1rem;
  letter-spacing: .04em;
  margin: 4px 0;
  opacity: .9;
}
.gib-line:nth-child(odd) { color: #8a949e; }

/* ===== How it works ===== */
.how .section-title { margin-bottom: 56px; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #338cff;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); }
.step-shot {
  margin-top: 22px;
  margin-top: auto;
  width: 100%;
  height: 170px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  /* Hover-zoom so the small mockup text becomes readable. */
  transform-origin: center;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1), box-shadow .28s ease, border-color .28s ease;
  cursor: zoom-in;
  position: relative;
  z-index: 1;
  will-change: transform;
}
/* With JS the zoom is driven by initStepZoom() so it stays inside the window;
   this is the no-JS fallback. .step-shot keeps z-index high while hovered
   (set both ways) so the enlarged image sits above neighbouring cards. */
html:not(.js) .step-shot:hover {
  transform: scale(1.85);
}
.step-shot:hover {
  z-index: 20;
}
@media (prefers-reduced-motion: reduce) {
  .step-shot { transition: none; }
}
.access-note {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 40px auto 36px;
  padding: 18px 22px;
  background: rgba(48, 209, 89, .08);
  border: 1px solid rgba(48, 209, 89, .25);
  border-radius: var(--radius);
  color: var(--green);
}
.access-note p { color: #cfe9d6; font-size: .98rem; }
.access-note svg { flex-shrink: 0; }

/* ===== Showcase (light) ===== */
.showcase .section-lead { margin-bottom: 48px; }
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.shot-card {
  background: var(--light-surface);
  border: 1px solid var(--light-line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 20px 44px -24px rgba(20, 40, 80, .22);
  text-align: center;
}
.shot-card img {
  margin: 0 auto 18px;
  border-radius: 12px;
  max-height: 320px;
  width: auto;
}
.shot-card figcaption { color: var(--light-muted); font-weight: 500; }

/* ===== Problem + live demo (merged, dark) ===== */
.examples .section-lead { margin-bottom: 40px; margin-inline: auto; white-space: pre-line; }
/* Hook build: measured, evenly-spaced lines with a bold accent punchline. */
.examples { padding-top: 60px; }
/* Two columns: the email card and the hook copy side by side. DOM order is
   card-then-copy, so flex + dir puts the card on the start side (right in RTL,
   left in LTR) and the copy opposite — i.e. it mirrors automatically. */
.hook-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 60px);
  max-width: 1040px;
  margin: 0 auto 4px;
}
.hook-row .example-grid { margin-top: 0; flex: 1 1 0; min-width: 0; }
/* Reserve the email-mockup height before examples.js injects it, so the page
   below (incl. #download) doesn't shift on load. Values match the rendered
   card height per breakpoint (the card is text-driven, so height varies). */
#exampleGrid { min-height: 536px; }
@media (max-width: 1100px) { #exampleGrid { min-height: 560px; } }
@media (max-width: 880px)  { #exampleGrid { min-height: 515px; } }
@media (max-width: 600px)  { #exampleGrid { min-height: 560px; } }
/* The copy column: title + build text, start-aligned (right in RTL, left in LTR),
   top-aligned with the email card and given room for the bubble below the punchline. */
.hook-copy {
  flex: 1 1 0;
  min-width: 0;
  text-align: start;
  position: relative;
  padding-top: clamp(6px, 2vw, 26px);
  padding-bottom: 8px;
}
/* Punchline + its bubble stacked and centred together — the bubble sits
   directly under the gibberish and flows naturally (incl. mobile). */
.hook-punch-wrap { display: inline-flex; flex-direction: column; align-items: center; }
.hook-title {
  font-size: clamp(2.3rem, 4.7vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin-bottom: 34px;
}
/* Setup lines: muted grey, building tension. */
.examples .hook-lead {
  max-width: 500px;
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.95;
  color: var(--muted);
}
/* Punchline: bright + bold, with the orange word the eye lands on. */
.hook-punch {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.hook-punch .accent-orange { font-weight: 800; }
/* "Curse" speech bubble, centred directly under the punchline. Symbols stay
   LTR (never mirrored); the tail points up at the gibberish above. */
.hook-bubble {
  position: relative;
  display: inline-block;
  margin-top: 16px;
  background: #fff;
  color: #16181d;
  border-radius: 14px;
  padding: 9px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.hook-bubble-text {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 3px;
}
.hook-bubble::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 3px;
  transform: translateX(-50%) rotate(45deg);
}
@media (max-width: 880px) {
  .hook-row { flex-direction: column-reverse; gap: 34px; align-items: stretch; }
  .hook-row .example-grid, .hook-copy { width: 100%; }
  .hook-copy { text-align: center; padding-top: 0; padding-bottom: 0; }
  .examples .hook-lead { margin: 0 auto 18px; }
}
.examples-instruction { color: var(--muted); margin: 30px auto 0; max-width: 560px; font-size: 1.05rem; }
.examples-closer {
  font-size: clamp(1.7rem, 4.6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-top: 22px;
}
.closer-logo {
  display: inline-block;
  height: 1.35em;
  width: auto;
  vertical-align: middle;
  margin: 0 .1em;
}
.example-grid { display: flex; justify-content: center; margin-top: 38px; }
.example-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  width: 100%;
  max-width: 600px;
}
.example-pair {
  font-size: .8rem;
  font-weight: 800;
  color: var(--blue-light);
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Centered blue labels at the top of each box — matching the arrow + caption. */
.example-tag {
  display: block;
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #006FFD;
  margin-bottom: 8px;
}
.example-line {
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
}
.example-line p { font-size: 1rem; line-height: 1.45; margin: 0 0 5px; overflow-wrap: anywhere; }
.example-line p:last-child { margin-bottom: 0; }
.example-line .mail-text { color: var(--text); }
.example-wrong .gib {
  color: #ff7a6b;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  margin-top: 2px;
}
/* Hand-drawn "curse" bubble attached to the top corner of the gibberish box,
   tail pointing down into it (kept un-mirrored so the symbols read correctly). */
.example-wrong { position: relative; }
.gib-bubble {
  position: absolute;
  /* Anchored proportionally to the gibberish box so the placement is identical
     at every resolution: width scales with the box, the horizontal offset is a
     percentage, and the vertical lift is a share of the bubble's own height
     (so the tail always dips the same amount into the box while the body pokes
     out above it). */
  top: 0;
  right: 4%;
  width: 36%;
  min-width: 96px;
  max-width: 196px;
  height: auto;
  margin: 0;
  transform: translateY(-12%);
  transform-origin: top right;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 5px 11px rgba(0, 0, 0, .38));
}
.example-right { background: rgba(48, 209, 89, .1); border-color: rgba(48, 209, 89, .35); }
.example-right p { color: var(--text); font-weight: 500; }
.example-right .fixed { font-weight: 600; }
.example-arrow { display: flex; justify-content: center; color: #006FFD; margin: -2px 0; }
.example-arrow svg { animation: exarrow 2.4s ease-in-out infinite; }
@keyframes exarrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 600px) { .example-card { max-width: 100%; } }

/* ----- Email-mockup demo card ----- */
.example-card.mail-mock {
  padding: 0;
  gap: 0;
  text-align: start;
  overflow: hidden;
}
.mail-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.mail-dots {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 6px;
}
.mail-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.mail-dots i:nth-child(1) { background: #ff5f57; }
.mail-dots i:nth-child(2) { background: #febc2e; }
.mail-dots i:nth-child(3) { background: #28c840; }
.mail-window {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}
.mail-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
}
.mail-row { display: flex; gap: 8px; font-size: .85rem; align-items: baseline; }
.mail-key { color: var(--muted); min-width: 56px; font-weight: 600; }
.mail-val { color: var(--text); overflow-wrap: anywhere; }
.mail-attach {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 16px 2px;
  padding: 7px 12px;
  background: rgba(0, 111, 253, .10);
  border: 1px solid rgba(0, 111, 253, .28);
  border-radius: 10px;
  font-size: .85rem;
  width: fit-content;
  max-width: calc(100% - 32px);
}
.mail-clip { color: var(--blue-light); display: inline-flex; flex: none; }
.mail-file { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.mail-size { color: var(--muted); font-size: .78rem; flex: none; }
.mail-body { padding: 4px 16px 12px; }
.mail-text { color: var(--text); font-size: 1rem; line-height: 1.45; margin: 0 0 5px; }
.mail-fix { margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }
.mail-fix .example-line { text-align: start; }
.mail-cap {
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #006FFD;
  padding: 2px 16px 10px;
}

/* ===== Features ===== */
.features .section-title { margin-bottom: 52px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(0, 111, 253, .4); background: var(--surface-2); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 14px;
}
.feature-icon svg { width: 36px; height: 36px; }
.feature h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ===== Privacy ===== */
.section-privacy {
  padding: 104px 0;
  background: radial-gradient(900px 500px at 15% 20%, #0c2a52 0%, #0d1320 60%);
  position: relative;
  overflow: hidden;
}
.privacy-glow {
  position: absolute;
  inset-inline-start: 0;
  bottom: -120px;
  width: 460px;
  height: 460px;
  max-width: 60%;
  background: radial-gradient(circle, var(--blue-glow), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}
.privacy-inner { position: relative; z-index: 1; }
.privacy-head { max-width: 720px; }
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-light);
  background: rgba(0, 111, 253, .18);
  border: 1px solid rgba(0, 111, 253, .5);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .03em;
  margin-bottom: 18px;
}
.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}
.privacy-point {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.privacy-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(0, 111, 253, .14);
  color: var(--blue-light);
  margin-bottom: 16px;
}
.privacy-point h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.privacy-point p { color: var(--muted); }

/* ===== Languages (light) ===== */
/* Multilingual-keyboard background; the copy sits on the white side and the
   right image variant is used per direction (keyboard on the far/end side). */
.languages {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  background-repeat: no-repeat;
  background-size: cover;
}
[dir="ltr"] .languages { background-image: url(img/lang-bg.png); background-position: right center; }
[dir="rtl"] .languages { background-image: url(img/lang-bg-rtl.png); background-position: left center; }
[dir="ltr"] .languages::before { background: linear-gradient(to right, var(--light-bg) 26%, rgba(244, 247, 251, 0) 72%); }
[dir="rtl"] .languages::before { background: linear-gradient(to left, var(--light-bg) 26%, rgba(244, 247, 251, 0) 72%); }
.languages::before { content: ""; position: absolute; inset: 0; z-index: 0; }
/* Narrow screens: no room to keep the keyboard beside the text, so wash it down
   to a subtle texture and let the copy sit on a clean, readable background. */
/* Tablet: keep the keyboard clearly visible (just a light veil for readability). */
@media (max-width: 960px) and (min-width: 601px) {
  [dir="ltr"] .languages::before,
  [dir="rtl"] .languages::before { background: rgba(244, 247, 251, .4); }
}
/* Phone: keyboard at ~50% so the copy stays readable above it. */
@media (max-width: 600px) {
  [dir="ltr"] .languages::before,
  [dir="rtl"] .languages::before { background: rgba(244, 247, 251, .5); }
}
.languages-inner { position: relative; z-index: 1; }
.lang-copy { max-width: 540px; }
.lang-stat { margin-top: 18px; font-size: 1.18rem; font-weight: 800; color: var(--light-text); }
.lang-list-btn { margin-top: 26px; display: inline-flex; align-items: center; gap: 8px; }
.lang-arrow { display: inline-block; transition: transform .2s; }
.lang-list-btn:hover .lang-arrow { transform: translateX(3px); }

/* ----- Full language list modal ----- */
.langlist-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 18, .6);
}
.langlist-modal[hidden] { display: none; }
.langlist-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.langlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.langlist-head h3 { font-size: 1.15rem; font-weight: 800; }
.langlist-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  padding: 5px;
  border-radius: 8px;
  flex: none;
}
.langlist-close:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.langlist-table-wrap { overflow-y: auto; }
.langlist-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.langlist-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 12px 16px;
  text-align: start;
}
.ll-logo-h { text-align: end; padding-block: 13px; }
.ll-logo { height: 28px; width: auto; display: inline-block; vertical-align: middle; }
.langlist-table td { padding: 11px 16px; border-top: 1px solid var(--line); }
.ll-num { color: var(--muted); width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ll-lang { display: flex; align-items: center; gap: 10px; }
.ll-flag { font-size: 1.25rem; flex: none; }
.ll-name { color: var(--text); font-weight: 600; }
.ll-tr { color: var(--muted); font-weight: 400; }
.ll-c { text-align: end; width: 1%; white-space: nowrap; }
.ll-yes { display: inline-flex; }

/* ===== Pricing ===== */
.pricing .section-title { margin-bottom: 48px; }
.price-card {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 36px;
  align-items: stretch;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .7);
}
.price-trial, .price-license { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.price-tag {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--green);
}
.price-trial-desc { color: var(--muted); margin-bottom: 6px; }
/* Free-trial benefit list with green checks. */
.price-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 6px 0 4px; }
.price-feats li { color: var(--text); position: relative; padding-inline-start: 26px; line-height: 1.4; }
.price-feats li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--green);
  font-weight: 900;
}
.price-divider { width: 1px; align-self: stretch; background: var(--line); }
.price-label { color: var(--text); font-size: 1.7rem; font-weight: 900; }
.price-value { font-size: 1.9rem; font-weight: 900; }
.price-period { color: var(--green); font-size: 1rem; font-weight: 700; }
.price-features { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 7px 0 2px; }
.price-note { color: var(--muted); font-size: .9rem; margin: 6px 0 4px; }
/* Both CTAs identical size, pushed to the bottom so they line up. */
.price-btn { margin-top: auto; min-width: 230px; justify-content: center; }
/* "Show supported languages" link inside the FAQ answer. */
.faq-lang-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--orange);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
}
.faq-lang-link:hover { text-decoration: underline; }
.faq-lang-link .lang-arrow { transition: transform .2s; }
.faq-lang-link:hover .lang-arrow { transform: translateX(3px); }

/* ===== FAQ (light) ===== */
.faq .section-title { margin-bottom: 40px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--light-surface);
  border: 1px solid var(--light-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* +/− toggle built from two lines so it morphs smoothly (blue + → orange −). */
.faq-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--blue);
  transition: color .3s ease, transform .35s cubic-bezier(.45, 0, .2, 1);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 2px;
}
.faq-icon::before { width: 16px; height: 2.5px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 2.5px; height: 16px; transform: translate(-50%, -50%); transition: transform .35s cubic-bezier(.45, 0, .2, 1); }
.faq-item[open] .faq-icon { color: var(--orange); transform: rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-answer { padding: 0 24px 20px; }
.faq-answer p { color: var(--light-muted); }

/* ===== Final CTA ===== */
.final-cta {
  background: radial-gradient(900px 500px at 50% 120%, #1b3a63 0%, var(--ink-1) 60%);
  overflow: hidden;
}
.final-glow {
  position: absolute;
  inset-inline: 0;
  bottom: -200px;
  margin-inline: auto;
  width: min(600px, 88%);
  height: 400px;
  background: radial-gradient(circle, var(--blue-glow), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.final-cta .container { position: relative; z-index: 1; }
.final-icon { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 20px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); }
.final-cta .section-lead { margin-bottom: 10px; }
.cta-trial-note { color: var(--green); font-weight: 600; font-size: 1.05rem; margin: 0 0 32px; }
.inline-logo { display: inline-block; height: 1.45em; width: auto; vertical-align: -.42em; margin: 0 .12em; }
.final-cta .btn { margin-bottom: 6px; }

/* ===== Footer ===== */
.site-footer { background: var(--ink-0); border-top: 1px solid var(--line); padding: 54px 0 30px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.footer-logo { height: 26px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
.footer-links a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { padding-top: 22px; }
.footer-bottom p { color: #6a7480; font-size: .86rem; }

/* ===== Changelog (discreet "what's new" strip) ===== */
.section.changelog { background: var(--ink-1); padding: 56px 0 36px; }
.changelog-card {
  max-width: 660px;
  margin-inline: auto;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.changelog-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.changelog-label { font-weight: 700; font-size: .9rem; color: var(--blue); letter-spacing: .02em; }
.changelog-version { font-size: .82rem; color: var(--muted); font-weight: 500; }
.changelog-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.changelog-list li { color: var(--muted); font-size: .94rem; line-height: 1.6; position: relative; padding-inline-start: 18px; }
.changelog-list li::before { content: '•'; color: var(--blue); position: absolute; inset-inline-start: 0; top: 0; font-weight: 700; }

/* ===== Discreet buy line (replaces big pricing section) ===== */
.buy-line {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.buy-line:hover { color: var(--text); border-bottom-color: var(--muted); }
.section-light .buy-line { color: var(--light-muted); }
.section-light .buy-line:hover { color: var(--light-text); border-bottom-color: var(--light-muted); }

/* ===== Contact modal ===== */
.no-scroll { overflow: hidden; }
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 11, 15, .68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
}
.contact-overlay:not([hidden]) { display: flex; animation: contactFade .2s ease; }
.contact-dialog {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
  padding: 36px 34px 30px;
  animation: contactPop .22s ease;
}
.contact-x {
  position: absolute;
  inset-inline-end: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.contact-x:hover { background: rgba(255, 255, 255, .12); color: var(--text); }

.contact-title { font-size: 1.5rem; font-weight: 800; text-align: center; }
.contact-title-sm { font-size: 1.25rem; text-align: start; margin-bottom: 18px; }
.contact-illus { display: block; width: max-content; margin: 6px auto 18px; }
.contact-intro { color: var(--muted); text-align: center; margin: 14px auto 26px; max-width: 400px; line-height: 1.6; }
.contact-step[hidden] { display: none; }
.contact-step[data-step="intro"]:not([hidden]) { display: flex; flex-direction: column; align-items: center; }
.contact-step[data-step="intro"] .btn { min-width: 220px; }

.contact-types { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contact-type {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: background .2s, border-color .2s, transform .15s;
}
.contact-type:hover { background: var(--surface-2); border-color: rgba(0, 111, 253, .4); transform: translateY(-1px); }
.contact-type svg { color: var(--blue-light); flex-shrink: 0; }
.contact-chev { margin-inline-start: auto; color: var(--muted); line-height: 1; }
.contact-chev::before { content: "\203A"; font-size: 1.4rem; }
[dir="rtl"] .contact-chev::before { content: "\2039"; }

.contact-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: .92rem;
  cursor: pointer;
  margin-bottom: 14px;
  padding: 0;
}
.contact-back:hover { color: var(--text); }
.contact-chev-back { color: inherit; line-height: 1; }
.contact-chev-back::before { content: "\2039"; font-size: 1.2rem; }
[dir="rtl"] .contact-chev-back::before { content: "\203A"; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-field label { font-weight: 600; font-size: .9rem; }
.contact-field .req { color: var(--orange); margin-inline-start: 3px; font-weight: 700; }
.contact-field input,
.contact-field textarea {
  width: 100%;
  margin-top: 7px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: .98rem;
  transition: border-color .2s, box-shadow .2s;
}
.contact-field textarea { resize: vertical; min-height: 96px; }
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.contact-field input.invalid,
.contact-field textarea.invalid { border-color: #ff5f57; box-shadow: 0 0 0 3px rgba(255, 95, 87, .25); }
.contact-hint { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.contact-file {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  padding: 10px 16px;
  width: max-content;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: .92rem;
  cursor: pointer;
  transition: background .2s;
}
.contact-file:hover { background: var(--surface-2); }
.contact-file svg { color: var(--blue-light); flex-shrink: 0; }
.contact-submit { align-self: center; margin-top: 6px; min-width: 180px; }
.contact-mail-hint { text-align: center; color: var(--muted); font-size: .84rem; margin-top: 2px; }

@keyframes contactFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes contactPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 540px) {
  .contact-dialog { padding: 30px 22px 24px; }
  .contact-row { grid-template-columns: 1fr; }
}

/* ===== Reveal animation (only hidden when JS is active) ===== */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 940px) {
  .site-header { height: auto; min-height: var(--header-h); }
  .header-inner { flex-wrap: wrap; row-gap: 14px; }
  .brand { order: 0; }
  .menu-toggle { display: flex; order: 1; margin-inline-start: auto; }
  .nav { display: none; }
  .header-actions { display: none; }
  .site-header.open { background: rgba(17, 21, 26, .98); border-bottom-color: var(--line); padding-bottom: 18px; }
  .site-header.open .nav {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    order: 3;
    margin-inline-start: 0;
    gap: 6px;
    font-size: 1.05rem;
  }
  .site-header.open .nav a { padding: 8px 0; }
  .site-header.open .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-basis: 100%;
    order: 4;
    gap: 14px;
  }
  .site-header.open .lang-switch { justify-content: center; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-inner, .problem-inner, .languages-inner { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .privacy-points { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .price-card { grid-template-columns: 1fr; gap: 24px; }
  .price-divider { width: 100%; height: 1px; }
  .price-trial, .price-license { align-items: center; text-align: center; }
  .price-feats { align-items: center; }
  .price-feats li { padding-inline: 26px 0; }
  .price-btn { margin-top: 16px; }
}

@media (max-width: 600px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  /* Closer: first sentence on line 1, logo + rest on line 2 */
  .examples-closer span:first-of-type::after { content: "\A"; white-space: pre; }
}

@media (max-width: 540px) {
  .section { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  /* Keep the demo side-by-side on mobile (arrow stays horizontal -> points at the result) */
  .demo-card { padding: 18px 12px; gap: 6px; }
  .demo-text { font-size: 1.2rem; }
  .demo-label { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}
