/* ==========================================================================
   QRLume — Marketing Site Stylesheet
   Palette, type, and vernacular derived from the v2.0 product UI.
   ========================================================================== */

/* ---------- Self-Hosted Fonts (Local telemetry-free loading) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/archivo-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/archivo-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/archivo-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('assets/fonts/archivo-900.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* color */
  --void:        #08090D;   /* page background */
  --panel:       #10121A;   /* card surface */
  --panel-2:     #141726;   /* elevated surface */
  --line:        rgba(168, 135, 255, 0.14);
  --line-soft:   rgba(255, 255, 255, 0.07);
  --violet:      #8A2BE2;   /* brand core */
  --violet-hot:  #A855F7;   /* interactive / glow */
  --mint:        #5BD9A9;   /* subhead green from product cards */
  --alert:       #FF5C5C;   /* DETECTED red */
  --ink:         #F4F5F8;
  --mute:        #8C93A3;

  /* type */
  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* rhythm */
  --container: 1160px;
  --radius:    1.1rem;
  --radius-sm: 0.6rem;
  --section-pad: clamp(4.5rem, 9vw, 8rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
}

.mono { font-family: var(--font-mono); }

/* visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--violet-hot);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(138, 43, 226, 0.45); color: #fff; }

/* ---------- Type scale ---------- */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.hl { color: var(--mint); }

.lede {
  color: var(--mute);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  max-width: 36rem;
  margin: 0 0 2.2rem;
}

/* evidence tag — the in-app mono status label, reused as section eyebrow */
.evidence-tag {
  color: var(--violet-hot);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}
.evidence-tag::before {
  content: "[ ";
  color: var(--mute);
}
.evidence-tag::after {
  content: " ]";
  color: var(--mute);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 2rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-hot) 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(138, 43, 226, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(138, 43, 226, 0.55);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: var(--violet-hot);
  background: rgba(138, 43, 226, 0.1);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-build {
  font-size: 0.65rem;
  color: var(--violet-hot);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.1rem 0.5rem;
  letter-spacing: 0.08em;
}
.nav-links {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mute);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 0.6rem 1.3rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(138, 43, 226, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 40% at 15% 85%, rgba(91, 217, 169, 0.06), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.hero-platforms {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--mute);
}

/* hero visual: QR mark being scanned + two overlapping promo cards */
.hero-visual {
  position: relative;
  min-height: 480px;
}
.hero-scan {
  position: absolute;
  top: -1.5rem;
  right: -1rem;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0.9;
  box-shadow: 0 12px 40px rgba(138, 43, 226, 0.3);
}
.hero-qr { width: 100%; height: 100%; }
.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint), 0 0 36px rgba(91, 217, 169, 0.7);
  animation: scan 3.2s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 6%; }
  50%      { top: 92%; }
}

.hero-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}
.hero-card img { width: 100%; height: auto; }
.hero-card-mac {
  width: 88%;
  margin-top: 3.5rem;
}
.hero-card-ios {
  position: absolute;
  width: 36%;
  right: 0;
  bottom: -2.5rem;
  border-color: rgba(168, 135, 255, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 60px rgba(138, 43, 226, 0.18);
}

/* ---------- Trust ticker ---------- */
.ticker {
  border-block: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 0.85rem 0;
  background: rgba(255, 255, 255, 0.015);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--mute);
  animation: ticker 38s linear infinite;
  white-space: nowrap;
}
.ticker-track i {
  font-style: normal;
  color: var(--violet);
  font-size: 0.55rem;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* hash divider — chain-of-custody motif */
.hash-divider {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(140, 147, 163, 0.4);
  padding: 0 1.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}
.hash-divider::before,
.hash-divider::after { content: " // "; color: var(--violet); opacity: 0.5; }

/* ---------- Core grid ---------- */
.core-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.core-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.core-card:hover {
  border-color: var(--line);
  transform: translateY(-4px);
}
.core-card p {
  color: var(--mute);
  font-size: 0.97rem;
  margin: 0 0 1.6rem;
  flex: 1;
}
.core-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.3rem;
  color: var(--violet-hot);
  background: rgba(138, 43, 226, 0.12);
  border: 1px solid var(--line);
}
.core-icon svg { width: 26px; height: 26px; }

/* heuristic-style readout footer (mirrors in-app Engine Heuristics rows) */
.readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.9rem;
  color: var(--mute);
}
.readout .clear { color: var(--mint); font-weight: 700; }
.readout .warn  { color: #E8C25A;     font-weight: 700; }
.readout .alert { color: var(--alert); font-weight: 700; }

/* ---------- Deep dive grid ---------- */
.deep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.deep-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem 1.5rem;
  transition: border-color 0.25s ease;
}
.deep-card:hover { border-color: var(--line); }
.deep-card p {
  color: var(--mute);
  font-size: 0.93rem;
  margin: 0 0 1.2rem;
}
.deep-flag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--mint);
  border: 1px solid rgba(91, 217, 169, 0.3);
  background: rgba(91, 217, 169, 0.07);
  border-radius: 1rem;
  padding: 0.2rem 0.7rem;
}

/* ---------- Gallery ---------- */
.gallery {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 1.5rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}
.os-toggle {
  display: flex;
  gap: 0.4rem;
  width: max-content;
  margin: 0 auto 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  padding: 0.3rem;
}
.os-toggle button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.8rem;
  border: 1px solid transparent;
  border-radius: 1.5rem;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.os-toggle button.active {
  background: rgba(138, 43, 226, 0.16);
  border-color: var(--line);
  color: #fff;
  box-shadow: 0 4px 18px rgba(138, 43, 226, 0.3);
}
.main-view {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
}
.main-view[data-os="ios"] { aspect-ratio: auto; max-height: 640px; }
.main-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}
.main-view[data-os="ios"] img { max-height: 640px; }

.thumb-nav {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x mandatory;
}
.thumb-nav::-webkit-scrollbar { height: 6px; }
.thumb-nav::-webkit-scrollbar-thumb {
  background: rgba(168, 135, 255, 0.25);
  border-radius: 3px;
}
.thumb-item {
  flex: 0 0 110px;
  aspect-ratio: 16 / 10;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid transparent;
  background: #000;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item:hover { opacity: 0.85; }
.thumb-item.active {
  opacity: 1;
  border-color: var(--violet-hot);
  box-shadow: 0 0 14px rgba(138, 43, 226, 0.45);
}

/* ---------- Privacy ---------- */
.privacy-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.disclosure {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.disclosure-item {
  display: flex;
  gap: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.4rem;
}
.disclosure-item h3 { font-size: 1.02rem; }
.disclosure-item p {
  color: var(--mute);
  font-size: 0.93rem;
  margin: 0;
}
.disclosure-bullet {
  flex: 0 0 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(91, 217, 169, 0.7);
}
.privacy-visual {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 70px rgba(138, 43, 226, 0.12);
}

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: stretch;
}
.price-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  position: relative;
}
.price-featured {
  background: linear-gradient(180deg, rgba(138, 43, 226, 0.14) 0%, var(--panel) 55%);
  border-color: rgba(168, 135, 255, 0.4);
  box-shadow: 0 0 50px rgba(138, 43, 226, 0.18);
}
.price-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-hot));
  border-radius: 1rem;
  padding: 0.3rem 0.95rem;
  white-space: nowrap;
  margin: 0;
}
.price-tier {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--violet-hot);
  margin: 0 0 0.8rem;
}
.price-amount {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
}
.price-per {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0;
}
.price-card ul {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
  flex: 1;
}
.price-card li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--mute);
  font-size: 0.93rem;
  margin-bottom: 0.55rem;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--violet-hot);
}
.price-fineprint {
  max-width: 46rem;
  margin: 2.6rem auto 0;
  text-align: center;
  color: rgba(140, 147, 163, 0.65);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 3.5rem 0 2rem;
  background: rgba(255, 255, 255, 0.012);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-tag {
  color: var(--mute);
  font-size: 0.9rem;
  margin: 0.8rem 0 0;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  color: var(--mute);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(140, 147, 163, 0.6);
}
.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.6rem;
  color: rgba(140, 147, 163, 0.6);
  font-size: 0.82rem;
}
.footer-base a:hover { color: var(--ink); }
.footer-base p { margin: 0; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; margin-top: 1rem; }
  .hero-scan { top: -0.5rem; width: 110px; }
  .hero-card-mac { width: 100%; margin-top: 2.5rem; }
  .hero-card-ios { width: 32%; bottom: -1.5rem; }

  .core-grid, .deep-grid, .price-grid { grid-template-columns: 1fr 1fr; }
  .price-featured { order: -1; grid-column: span 2; }

  .privacy-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .core-grid, .deep-grid, .price-grid { grid-template-columns: 1fr; }
  .price-featured { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-card-ios { width: 38%; }
  .hash-divider { font-size: 0.55rem; }
  .main-view { aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   i18n — language selector, RTL, script fallbacks
   ========================================================================== */

/* ---------- Language selector ---------- */
.lang-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-inline-start: auto; /* pushes selector + CTA to the end */
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease;
}
.lang-wrap:hover, .lang-wrap:focus-within { border-color: var(--line); }
.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--mute);
  flex: 0 0 auto;
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding-inline-end: 1.1rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238C93A3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}
[dir="rtl"] .lang-select { background-position: left center; }
.lang-select:focus { outline: none; }
.lang-select option {
  background: var(--panel);
  color: var(--ink);
}

/* nav-links no longer carries the auto margin */
.nav-links { margin-left: 0; margin-inline-start: auto; }

/* ---------- Script fallbacks (Archivo lacks Arabic / CJK glyphs) ---------- */
:lang(ar) {
  --font-display: "Archivo", "SF Arabic", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", sans-serif;
  --font-body:    "Archivo", "SF Arabic", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", sans-serif;
}
:lang(ja) {
  --font-display: "Archivo", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-body:    "Archivo", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}
:lang(ko) {
  --font-display: "Archivo", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-body:    "Archivo", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
:lang(zh-Hans) {
  --font-display: "Archivo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body:    "Archivo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* CJK + Arabic: looser line-height, no negative tracking on display type */
:lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(ko) h2,
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(ar) h1, :lang(ar) h2 {
  letter-spacing: 0;
  line-height: 1.22;
}
:lang(ja) body, :lang(ko) body, :lang(zh-Hans) body { line-height: 1.8; }

/* Arabic: mono eyebrows/tags read better without aggressive tracking */
:lang(ar) .evidence-tag, :lang(ar) .price-tier, :lang(ar) .ticker-track,
:lang(ar) .readout, :lang(ar) .deep-flag, :lang(ar) .price-badge {
  letter-spacing: 0;
}

/* ---------- RTL (Arabic) ---------- */
/* directional details flip automatically via logical properties below */
.disclosure-item {
  border-left: none;
  border-inline-start: 3px solid var(--violet);
}
.price-card li { padding-left: 0; padding-inline-start: 1.4rem; }
.price-card li::before { left: auto; inset-inline-start: 0; }

[dir="rtl"] .hero-scan { right: auto; left: -1rem; }
[dir="rtl"] .hero-card-ios { right: auto; left: 0; }
[dir="rtl"] .ticker-track { animation-name: ticker-rtl; }
@keyframes ticker-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}
[dir="rtl"] .scanline { left: 0; right: 0; }

/* selector collapses gracefully on small screens */
@media (max-width: 640px) {
  .lang-wrap { padding: 0.3rem 0.55rem; }
  .nav-inner { gap: 0.8rem; }
  .nav-cta { padding: 0.55rem 1rem; font-size: 0.85rem; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s ease;
}
.faq-item[open], .faq-item:hover { border-color: var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-marker {
  position: relative;
  flex: 0 0 14px;
  height: 14px;
}
.faq-marker::before, .faq-marker::after {
  content: "";
  position: absolute;
  background: var(--violet-hot);
  transition: transform 0.25s ease;
}
.faq-marker::before { left: 0; right: 0; top: 6px; height: 2px; }
.faq-marker::after  { top: 0; bottom: 0; left: 6px; width: 2px; }
.faq-item[open] .faq-marker::after { transform: scaleY(0); }
.faq-item p {
  margin: 0;
  padding: 0 1.4rem 1.3rem;
  color: var(--mute);
  font-size: 0.95rem;
  max-width: 46rem;
}

/* ==========================================================================
   Mobile hardening
   ========================================================================== */

/* iOS Safari zooms the page when a focused control is under 16px —
   give touch devices a 16px select with tightened padding to compensate */
@media (pointer: coarse) {
  .lang-select { font-size: 16px; padding-inline-end: 1rem; }
  .lang-wrap   { padding: 0.25rem 0.6rem; }
}

/* nav width budget on phones: shed decoration progressively */
@media (max-width: 640px) {
  .brand-build { display: none; }          /* drop the v2.0 badge */
  .nav-cta { white-space: nowrap; }
  h1 { font-size: clamp(2.1rem, 8.5vw, 2.6rem); overflow-wrap: break-word; }
  h2 { overflow-wrap: break-word; }
}
@media (max-width: 430px) {
  .brand-word { display: none; }           /* QR mark alone carries the brand */
  .lang-icon  { display: none; }
  .nav-inner  { gap: 0.6rem; }
  .nav-cta    { padding: 0.5rem 0.85rem; font-size: 0.8rem; }
}

/* comfortable thumb targets on touch screens */
@media (pointer: coarse) {
  .thumb-item { flex-basis: 96px; }
  .faq-item summary { padding: 1.25rem 1.4rem; }
}
