/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
code {
  font-family: "SF Mono", ui-monospace, "Menlo", monospace;
  font-size: 0.9em;
}

:root {
  --ink: #1d1d1f;
  --gray: #6e6e73;
  --gray-light: #86868b;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #08080a;
  --bg-dark-2: #101014;
  --blue: #0071e3;
  --blue-2: #409cff;
  --purple: #7c5cff;
  --border: rgba(0,0,0,0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 20px 60px -20px rgba(0,0,0,0.25);
  --max-width: 1180px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-2), var(--purple));
  z-index: 2000;
  transition: width 0.1s linear;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.82;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover { opacity: 1; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lang-switch {
  position: relative;
  margin-right: 4px;
}
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { color: var(--ink); border-color: rgba(0,0,0,0.16); }
.lang-switch summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.6;
  flex-shrink: 0;
}
.lang-switch[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  max-height: min(360px, 70vh);
  overflow-y: auto;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 6px;
  z-index: 1100;
}
.lang-switch-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  opacity: 0.78;
  transition: opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.lang-switch-menu a:hover { background: var(--bg-alt); opacity: 1; }
.lang-switch-menu a[aria-current="true"] { opacity: 1; font-weight: 600; background: var(--bg-alt); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 20px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 980px;
  font-weight: 500;
  border: none;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-small { padding: 7px 16px; font-size: 12.5px; }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(0,113,227,0.55);
}
.btn-primary:hover { background: #0077ed; transform: translateY(-1px); }
.btn-secondary {
  background: rgba(0,0,0,0.06);
  color: var(--ink);
}
.btn-secondary:hover { background: rgba(0,0,0,0.09); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(0,0,0,0.05);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(0,0,0,0.09); }
.btn-full { width: 100%; }

.section-dark .btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.section-dark .btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 3000;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ===== Language suggestion banner =====
   Shown once per browser on the US English homepage when the browser's
   language differs — a dismissible suggestion, never a forced redirect. */
.lang-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(29,29,31,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
}
.lang-banner[hidden] { display: none; }
.lang-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lang-banner-inner p {
  flex: 1;
  min-width: 200px;
  margin: 0;
  font-size: 14px;
  color: #fff;
}
.lang-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lang-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-banner-close:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ===== Reveal on scroll =====
   Scoped to .js so the page stays readable when scripting is unavailable —
   otherwise every revealed block would be stuck at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.js .reveal.in-view { opacity: 1; transform: translateY(0); }
.js .delay-1.in-view { transition-delay: 0.08s; }
.js .delay-2.in-view { transition-delay: 0.16s; }
.js .delay-3.in-view { transition-delay: 0.24s; }
.js .delay-4.in-view { transition-delay: 0.32s; }

/* ===== Typography ===== */
h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 20px;
}
.section-title {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 18px;
}
.section-title.center { text-align: center; }
.section-title.light { color: #fff; }
#faq .section-title { margin-bottom: 48px; }
.section-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--gray);
  line-height: 1.5;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-sub.center { text-align: center; }
.section-sub.light { color: rgba(255,255,255,0.65); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 150px 0 130px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -280px; left: 50%;
  transform: translateX(-50%);
  width: 1100px; height: 700px;
  background: radial-gradient(ellipse at center, rgba(64,156,255,0.28), rgba(124,92,255,0.16) 45%, transparent 72%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}
.hero-inner { max-width: 900px; }
.hero-sub {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-footnote {
  font-size: 13px;
  color: var(--gray-light);
  margin: 0 0 64px;
}

/* ===== Hero mockup (app window) ===== */
.hero-mockup {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}
.hero-mockup::before {
  content: "";
  position: absolute;
  inset: -8% -4% -20%;
  background: radial-gradient(ellipse at 50% 55%, rgba(64,156,255,0.24), rgba(124,92,255,0.14) 45%, transparent 72%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}
.mockup-float {
  perspective: 1600px;
  animation: mockup-bob 7s ease-in-out infinite;
}
.mockup-window {
  background: #f6f6f7;
  border-radius: 12px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.03),
    0 2px 10px rgba(0,0,0,0.07),
    0 30px 60px -24px rgba(0,0,0,0.28),
    0 55px 110px -40px rgba(64,110,255,0.28);
  overflow: hidden;
  text-align: left;
  transform: rotateX(5deg);
  transform-origin: 50% 100%;
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1), box-shadow 0.6s ease;
  will-change: transform;
}
.mockup-window:hover {
  transform: rotateX(0deg) translateY(-6px);
  box-shadow:
    0 1px 1px rgba(0,0,0,0.03),
    0 4px 14px rgba(0,0,0,0.08),
    0 40px 70px -24px rgba(0,0,0,0.3),
    0 65px 130px -40px rgba(64,110,255,0.34);
}
.mockup-screenshot { display: block; width: 100%; height: auto; }

@keyframes mockup-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ===== Trust bar ===== */
.trustbar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.trustbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--gray);
}
.trust-item svg { color: var(--blue); flex-shrink: 0; }

/* ===== Sections ===== */
.section { padding: 120px 0; }
.section-flush-top { padding-top: 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: radial-gradient(ellipse at top, #17171c, var(--bg-dark) 60%);
  color: #fff;
}

/* ===== Formats ===== */
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.format-card {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.format-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
}
.format-card p {
  margin: 14px 0 0;
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.5;
}
.format-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  letter-spacing: -0.01em;
  color: #fff;
}
.badge-avif { background: linear-gradient(135deg, #ff6a88, #ff3860); }
.badge-jxl { background: linear-gradient(135deg, #7c5cff, #409cff); }
.badge-webp { background: linear-gradient(135deg, #34c8ff, #2b9df0); }
.badge-png { background: linear-gradient(135deg, #34d399, #10b981); }
.badge-heic { background: linear-gradient(135deg, #6e6e73, #3a3a3c); }
.badge-jpeg { background: linear-gradient(135deg, #ffb347, #ff8a00); }
/* ===== Compare demo (static screenshot of the app's real comparator) ===== */
.compare-wrap { position: relative; max-width: 960px; margin: 0 auto 56px; }
.compare-wrap::before {
  content: "";
  position: absolute;
  inset: -6% -4% -10%;
  background: radial-gradient(ellipse at 50% 55%, rgba(64,156,255,0.22), rgba(124,92,255,0.16) 45%, transparent 72%);
  filter: blur(45px);
  z-index: -1;
  pointer-events: none;
}
.compare-window {
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.2),
    0 30px 60px -24px rgba(0,0,0,0.55),
    0 50px 100px -40px rgba(64,110,255,0.3);
  transition: transform 0.4s cubic-bezier(.22,.61,.36,1), box-shadow 0.4s ease;
}
.compare-window:hover { transform: translateY(-4px); }
.compare-screenshot { display: block; width: 100%; height: auto; }
.compare-hint {
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  margin-top: 14px;
}

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  min-width: 0;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
}
.feature-card--highlight {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: left;
}
.feature-card--highlight .feature-icon { margin: 0; flex-shrink: 0; }
.feature-card--highlight .feature-text h3 { margin: 0 0 4px; }
.feature-card--highlight .feature-text p { margin: 0; }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #fff;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14px; color: var(--gray); line-height: 1.55; margin: 0; }

/* ===== Use cases ===== */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.usecase-card {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.usecase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
}
.usecase-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--blue);
}
.usecase-icon svg { width: 20px; height: 20px; }
.usecase-card h3 { font-size: 16.5px; margin: 0 0 8px; }
.usecase-card p { font-size: 13.5px; color: var(--gray); line-height: 1.55; margin: 0; }

/* ===== Automation ===== */
.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.automation-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 26px 26px 22px;
  /* A grid item defaults to min-width:auto, so the unwrappable <pre> inside
     stretched the whole grid past the viewport. This lets the card shrink and
     hands the scrolling to .code-block instead. */
  min-width: 0;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.automation-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.automation-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  margin: 0 0 10px;
  color: #fff;
}
.automation-icon {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 14px;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.automation-card p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  margin: 0 0 16px;
}
.code-block {
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0;
  text-align: left;
}
.code-block code {
  font-size: 12.5px;
  color: #9ff2c4;
  white-space: pre;
  line-height: 1.6;
}
.automation-note {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.automation-note:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.automation-note-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.automation-note-icon svg { width: 20px; height: 20px; }
.automation-note p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
}
.automation-note strong { color: #fff; }

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.pricing-activation { max-width: 640px; margin: 56px auto 0; }
.pricing-activation h3 { text-align: center; font-size: 22px; margin: 0 0 28px; }
.pricing-activation .doc-steps { text-align: left; }
.pricing-card {
  min-width: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
}
.pricing-featured {
  background: linear-gradient(160deg, #1a1a1f, #0c0c10);
  color: #fff;
  border: none;
  box-shadow: 0 30px 70px -25px rgba(64,92,255,0.35);
}
.pricing-featured:hover {
  box-shadow: 0 30px 70px -20px rgba(64,92,255,0.5);
}
.pricing-tag {
  position: absolute;
  top: -13px; left: 32px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.pricing-head { margin-bottom: 22px; }
.pricing-head h3 { font-size: 20px; margin: 0 0 10px; }
.pricing-price { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.pricing-price span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-light);
  margin-top: 4px;
}
.pricing-featured .pricing-price span { color: rgba(255,255,255,0.5); }
.pricing-list { margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.pricing-list li { font-size: 14.5px; }
.pricing-limit { color: var(--gray-light); }
.pricing-featured .pricing-limit { color: rgba(255,255,255,0.5); }
.pricing-card > .btn { margin-top: auto; }
.pricing-terms {
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  margin: 12px 0 0;
  color: var(--gray-light);
  /* Reserves the same two-line height on the Free card's empty placeholder
     (see index.html) as this text actually takes on the Pro card, so both
     cards' buttons — pinned to the bottom via `.pricing-card > .btn`'s
     margin-top: auto — land at the same height. */
  min-height: 52px;
}
.pricing-featured .pricing-terms { color: rgba(255,255,255,0.45); }
.pricing-terms a { color: inherit; text-decoration: underline; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.faq-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15);
}
.faq-heading { margin: 0; font-size: inherit; font-weight: inherit; }
/* The whole row is the control, so the hit target matches what looks clickable. */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
  background: none;
  border: none;
  font-family: inherit;
}
.faq-question:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}
.faq-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -8px -10px -8px 0;
  border-radius: 50%;
  color: var(--gray-light);
  transition: background 0.2s ease;
}
.faq-question:hover .faq-toggle { background: rgba(0,0,0,0.05); }
.faq-caret { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item.open .faq-caret { transform: rotate(180deg); }
/* max-height is set in px by the script from the real content height;
   visibility keeps collapsed text out of the accessibility tree and tab order. */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 0.35s ease, visibility 0s linear 0.35s;
}
.faq-item.open .faq-answer {
  visibility: visible;
  transition: max-height 0.35s ease, visibility 0s;
}
.faq-answer p {
  margin: 0;
  padding: 0 22px 20px;
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer { background: var(--bg-alt); padding: 64px 0 24px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 13px; color: var(--gray-light); margin: 10px 0 0; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h4 { font-size: 12px; color: var(--gray-light); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 14px; }
.footer-links a { display: block; font-size: 13.5px; color: var(--gray); margin-bottom: 10px; }
.footer-links a:hover { color: var(--ink); }
.footer-note { font-size: 13px; color: var(--gray); line-height: 1.6; margin: 0; }
.footer-bottom { padding-top: 22px; }
.footer-bottom p { font-size: 12.5px; color: var(--gray-light); margin: 0; }

/* ===== Page header (Contact / Legal) ===== */
.page-header { padding: 150px 0 60px; text-align: center; }
.page-header h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 16px;
}
.page-header p {
  font-size: 18px;
  color: var(--gray);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Contact ===== */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-bottom: 70px;
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-note { font-size: 14px; color: var(--gray-light); margin: 0; }

.contact-form-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 70px;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form-row { display: flex; flex-direction: column; gap: 6px; }
.contact-form-row label { font-size: 13px; font-weight: 600; color: var(--ink); }
.contact-form-row input, .contact-form-row textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form-row input:hover, .contact-form-row textarea:hover { border-color: rgba(0,0,0,0.18); }
.contact-form-row input:focus, .contact-form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.contact-form-row textarea { resize: vertical; min-height: 140px; }
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form-status {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.contact-form-status.is-success { color: #1a9c4e; background: rgba(26,156,78,0.1); }
.contact-form-status.is-error { color: #ff5c5c; background: rgba(255,92,92,0.1); }

@media (max-width: 560px) {
  .contact-form-card { padding: 28px 22px; }
  .contact-form-grid { grid-template-columns: 1fr; }
}

/* ===== Legal content ===== */
.legal-content h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 16.5px;
  letter-spacing: -0.01em;
  margin: 24px 0 12px;
}
.legal-content p {
  font-size: 15.5px;
  color: var(--gray);
  line-height: 1.7;
  margin: 0 0 14px;
}
.legal-content a { color: var(--blue); }
.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin: 0 0 14px;
  font-size: 15.5px;
  color: var(--gray);
  line-height: 1.7;
}
.legal-content li { margin-bottom: 8px; }
.legal-updated { font-size: 13px; color: var(--gray-light); margin-top: 40px; }
/* Emplacements que seul l'éditeur peut renseigner : volontairement voyants
   pour qu'une publication accidentelle saute aux yeux. */
.legal-todo {
  background: #fff3cd;
  color: #7a4f01;
  border: 1px dashed #d9a441;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.92em;
  font-weight: 600;
}

/* ===== Documentation ===== */
.doc-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 60px;
  align-items: start;
  padding-top: 116px;
  padding-bottom: 110px;
}
.doc-figure { margin: 0 0 34px; }
.doc-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px var(--radius-md) var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.doc-figure figcaption {
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.55;
  margin-top: 14px;
}
.doc-content var { font-style: italic; color: var(--gray); }
.doc-sidebar {
  position: sticky;
  top: 76px;
  min-width: 0;
}
.doc-sidebar-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-light);
  margin: 0 0 14px;
}
.doc-sidebar ol { counter-reset: docnav; }
.doc-sidebar a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--gray);
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease;
}
.doc-sidebar a:hover { background: var(--bg-alt); color: var(--ink); }
.doc-sidebar a[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--blue);
}
.doc-content { min-width: 0; }
.doc-breadcrumb { font-size: 13px; color: var(--gray-light); margin-bottom: 14px; }
.doc-breadcrumb a { color: var(--gray); }
.doc-breadcrumb a:hover { color: var(--ink); }
.doc-breadcrumb span { margin: 0 6px; }
.doc-content h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
  margin: 0 0 16px;
}
.doc-lead {
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--gray);
  margin: 0 0 34px;
}
.doc-content h2 {
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 52px 0 14px;
  scroll-margin-top: 76px;
}
.doc-content h3 {
  font-size: 17px;
  margin: 30px 0 10px;
  scroll-margin-top: 76px;
}
.doc-content p { font-size: 15.5px; line-height: 1.7; color: var(--gray); margin: 0 0 16px; }
.doc-content a:not(.btn):not(.doc-card) { color: var(--blue); }
.doc-content a:not(.btn):not(.doc-card):hover { text-decoration: underline; }
.doc-content strong { color: var(--ink); font-weight: 600; }
/* The global reset strips list markers, which documentation genuinely needs. */
.doc-content ul, .doc-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--gray);
}
.doc-content ul { list-style: disc; }
.doc-content ol { list-style: decimal; }
.doc-content li { margin-bottom: 8px; }
.doc-content li > strong:first-child { color: var(--ink); }
.doc-content code:not(pre code) {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink);
  white-space: nowrap;
}
.doc-content .code-block { margin: 0 0 20px; }
.doc-content .code-block code { white-space: pre; }

/* On-page table of contents */
.doc-toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 44px;
}
.doc-toc p {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-light);
  margin: 0 0 10px;
}
.doc-toc ol { margin: 0; padding-left: 20px; font-size: 14.5px; }
.doc-toc li { margin-bottom: 6px; }
.doc-toc a { color: var(--blue); }
.doc-toc a:hover { text-decoration: underline; }

/* Numbered procedures */
.doc-steps { counter-reset: step; list-style: none !important; padding-left: 0 !important; }
.doc-steps > li {
  position: relative;
  padding-left: 46px;
  margin-bottom: 22px;
  min-height: 30px;
}
.doc-steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Callouts */
.doc-note {
  display: flex;
  gap: 14px;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--bg-alt);
  border-left: 3px solid var(--gray-light);
  color: var(--gray);
}
.doc-note p { font-size: inherit; margin: 0 0 8px; }
.doc-note p:last-child { margin-bottom: 0; }
.doc-note-body { min-width: 0; }
.doc-note-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  color: var(--ink);
}
.doc-note-info { border-left-color: var(--blue); background: rgba(0,113,227,0.05); }
.doc-note-info .doc-note-label { color: var(--blue); }
.doc-note-warn { border-left-color: #d97706; background: rgba(217,119,6,0.07); }
.doc-note-warn .doc-note-label { color: #b45309; }
.doc-note-pro { border-left-color: var(--purple); background: rgba(124,92,255,0.06); }
.doc-note-pro .doc-note-label { color: var(--purple); }

/* Pro badge */
.doc-badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  color: #fff;
  margin-left: 8px;
}

/* Tables */
.doc-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.doc-table-note { font-size: 13px; line-height: 1.6; color: var(--gray-light); margin: 0 0 24px; }
.doc-table-note p { margin: 0; }
.doc-table-note p + p { margin-top: 10px; }
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}
.doc-table th, .doc-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.doc-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-light);
  font-weight: 600;
  background: var(--bg-alt);
}
.doc-table td { color: var(--gray); }
.doc-table td code { white-space: nowrap; }
.doc-table tr:last-child td { border-bottom: none; }

/* Hub cards */
.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.doc-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15); }
.doc-card h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--ink); }
.doc-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--gray); }
.doc-card-step {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 8px;
}

/* Flow diagram (watched folders) */
.doc-flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}
.doc-flow-step {
  flex: 1 1 150px;
  min-width: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.5;
}
.doc-flow-step b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 5px; }

/* Prev / next */
.doc-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.doc-pager a {
  font-size: 14px;
  color: var(--gray);
  max-width: 46%;
}
.doc-pager a:hover { color: var(--ink); }
.doc-pager b { display: block; color: var(--ink); font-weight: 600; margin-top: 3px; }
.doc-pager .doc-pager-next { text-align: right; margin-left: auto; }

/* ===== Releases / Downloads ===== */
.release-hero {
  position: relative;
  background: linear-gradient(160deg, #1a1a1f, #0c0c10);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  margin-bottom: 48px;
  box-shadow: 0 30px 70px -25px rgba(64,92,255,0.35);
}
.release-hero-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.release-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 6px;
}
.release-version { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.release-date { font-size: 13.5px; color: rgba(255,255,255,0.5); }
.release-summary { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.75); max-width: 640px; margin: 0 0 28px; }
.release-hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.release-hero-meta { font-size: 12.5px; color: rgba(255,255,255,0.5); }

.release-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
}
.release-badge-latest { background: linear-gradient(135deg, var(--blue-2), var(--purple)); }
.release-badge-stable { background: linear-gradient(135deg, #34d399, #10b981); }
.release-badge-beta { background: linear-gradient(135deg, #ffb347, #ff8a00); }

.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 48px; }
/* `display: grid` above beats the UA [hidden] rule at equal specificity
   (author origin always wins over user-agent origin) — this restores it
   while the JS-populated grid is still empty, on first paint or no-JS. */
.download-grid[hidden] { display: none; }
.download-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.download-card-head { display: flex; align-items: center; gap: 12px; }
.download-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-2), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.download-icon svg { width: 20px; height: 20px; }
.download-card h3 { margin: 0; font-size: 16.5px; }
.download-card-req { font-size: 12.5px; color: var(--gray-light); margin: 0; }
.download-card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--gray-light); margin: 0; list-style: none; padding: 0; }
.download-card-meta code { font-size: 11.5px; }
.download-card .btn { margin-top: auto; }

.changelog-section { margin-bottom: 36px; }
.changelog-section:last-child { margin-bottom: 0; }
.changelog-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 14px; }
.changelog-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.changelog-list li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.6; color: var(--gray); }
.changelog-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; }
.changelog-features li::before { background: var(--blue-2); }
.changelog-fixes li::before { background: #ef4444; }
.changelog-technical li::before { background: var(--gray-light); }

.release-history-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.release-history-version { font-weight: 600; color: var(--ink); }
.release-history-date { font-size: 12.5px; color: var(--gray-light); }
.release-history-empty { font-size: 14px; color: var(--gray-light); padding: 4px 0 20px; }
.release-history-toggle { text-align: center; margin-top: 18px; }

.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .doc-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 36px; }
  /* Sept entrées de menu ne tiennent plus à l'espacement nominal. */
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 12.5px; }
}

@media (max-width: 900px) {
  .format-grid, .feature-grid, .usecase-grid, .automation-grid, .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .doc-shell { grid-template-columns: 1fr; gap: 32px; }
  .doc-sidebar {
    position: static;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
  }
  .doc-card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-links {
    display: flex;
    position: absolute;
    top: 52px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav.menu-open .nav-links a { font-size: 15px; opacity: 1; }
  .nav-actions .btn-ghost { display: none; }

  .hero { padding: 120px 0 70px; }
  .mockup-window { transform: none; }
  .mockup-window:hover { transform: none; }
  .mockup-float { animation: none; }
  .section { padding: 80px 0; }
  .section-sub { margin-bottom: 40px; }

  .format-grid, .feature-grid, .usecase-grid, .automation-grid, .pricing-grid {
    grid-template-columns: 1fr;
  }
  .feature-card--highlight { flex-direction: column; align-items: flex-start; }

  .automation-note { align-items: flex-start; padding: 20px; }

  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-links { gap: 32px; }

  .release-hero { padding: 32px 24px; }
  .release-version { font-size: 26px; }
}

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