/*
 * Vendly marketing site. One stylesheet. Dark first; [data-theme="light"] switches to light.
 * Two layouts share the hero and story markup:
 *  - static (no JS, reduced motion, weak devices): every beat shows its own figure;
 *  - 3D (html.will-3d, set by boot.js): the WebGL scene sits in a sticky layer behind the text,
 *    and the static figures stay on top only until html.is-3d marks the scene as drawn.
 */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FEFC;
}

:root {
  color-scheme: dark;

  --canvas: #101312;
  --surface: #171b19;
  --surface-2: #1f2522;
  --border: #2c3430;
  --text: #eef2ec;
  --muted: #a4aea7;
  --green: #81f542;
  --green-hover: #95f760;
  --on-green: #0b2103;
  --green-text: #9ee480;
  --green-subtle: #182a10;
  --violet: #9c8bff;
  --coral: #ff9466;
  --no: #ff9a8c;
  --dot: rgb(238 242 236 / 9%);
  --shot-bg: #fff;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 24px 60px -30px rgb(0 0 0 / 70%);
  --font: "Readex Pro", system-ui, "Segoe UI", "Noto Sans Arabic", sans-serif;
  --page: min(1180px, 100% - 2.5rem);
}

:root[data-theme="light"] {
  color-scheme: light;

  --canvas: #f4f5f1;
  --surface: #fff;
  --surface-2: #eaede6;
  --border: #dde1d9;
  --text: #131614;
  --muted: #56605a;
  --green-hover: #74e334;
  --green-text: #2f6512;
  --green-subtle: #e4f8da;
  --violet: #5a44dc;
  --coral: #c4481a;
  --no: #b3261e;
  --dot: rgb(19 22 20 / 11%);
  --shadow: 0 1px 2px rgb(19 22 20 / 6%), 0 24px 60px -30px rgb(19 22 20 / 28%);
}

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

html {
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 4.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 350;
  line-height: 1.6;
}

:lang(ar) body,
body:lang(ar) {
  line-height: 1.85;
}

a {
  color: var(--green-text);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

img {
  block-size: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

:lang(ar) :is(h1, h2, h3) {
  letter-spacing: 0;
  line-height: 1.4;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

strong,
b {
  font-weight: 600;
}

.wrap {
  inline-size: var(--page);
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-green);
  font-weight: 600;
}

.skip:focus {
  inset-block-start: 1rem;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  border-block-end: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-block-size: 4rem;
}

.brand {
  display: inline-flex;
  flex: none;
  color: var(--text);
}

.logo {
  display: flex;
  align-items: center;
  direction: ltr;
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin-inline-start: 0.5rem;
  font-size: 0.9375rem;
}

.nav a,
.langs a,
.footer a {
  color: var(--muted);
  text-decoration: none;
}

.langs a {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.nav a:hover,
.langs a:hover,
.footer a:hover {
  color: var(--text);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-inline-start: auto;
}

.langs {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.short {
  display: none;
}

.langs a[aria-current="true"] {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

/* The theme switch needs JavaScript, so it only appears when JS runs. */
.theme-toggle {
  display: none;
  flex: none;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.js .theme-toggle {
  display: grid;
}

.theme-toggle svg {
  inline-size: 1.125rem;
  block-size: 1.125rem;
}

/* Shows the theme a click switches to. */
.theme-toggle .i-dark,
[data-theme="light"] .theme-toggle .i-light {
  display: none;
}

[data-theme="light"] .theme-toggle .i-dark {
  display: block;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--on-green);
  box-shadow: 0 12px 28px -14px rgb(129 245 66 / 75%);
}

.btn-primary:hover {
  background: var(--green-hover);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.btn-lg {
  min-block-size: 3.25rem;
  padding-inline: 1.75rem;
  font-size: 1rem;
}

.arrow {
  inline-size: 1rem;
  block-size: 1rem;
}

[dir="rtl"] .arrow {
  transform: scaleX(-1);
}

/* ── Sections ───────────────────────────────────────────────────────────────── */

main > section {
  padding-block: 6rem;
}

.section-head {
  max-inline-size: 46rem;
  margin-block-end: 3rem;
}

.section-head p {
  margin-block-start: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ── Stage: hero + story, with the builder canvas's dot grid behind ─────────── */

.stage {
  position: relative;
  isolation: isolate;
}

.stage::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.3px);
  background-size: 24px 24px;
  content: "";
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.scene-layer {
  display: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: center;
  min-block-size: min(calc(100svh - 4rem), 880px);
  padding-block: 3.5rem;
}

.hero h1 {
  display: grid;
  gap: 0.35em;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  letter-spacing: -0.035em;
}

.hero h1 .from {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--muted);
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero h1 .to svg {
  inline-size: 1.6em;
  block-size: 0.8em;
  color: var(--green);
}

[dir="rtl"] .hero h1 .to svg {
  transform: scaleX(-1);
}

.hero .lead {
  max-inline-size: 36rem;
  margin-block-start: 1.5rem;
  color: var(--muted);
  font-size: 1.1875rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 2rem;
}

.note {
  margin-block-start: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
}

/* Language switcher: radio buttons, so it works without JavaScript too. */
.switch {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
}

.switch legend {
  margin-block-end: 0.625rem;
  margin-inline: auto;
  padding: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.switch-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
}

.switch label {
  position: relative;
}

.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch label span {
  display: block;
  min-inline-size: 2.75rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.switch input:hover + span {
  color: var(--text);
}

.switch input:checked + span {
  background: var(--green);
  color: var(--on-green);
}

.switch input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* Static hero picture: the catalog card with phones around it. */
.hero-stack {
  position: relative;
  inline-size: min(100%, 540px);
  aspect-ratio: 1;
}

.product-card {
  margin: 0;
  padding: 0.6rem 0.6rem 0.9rem;
  border-radius: 20px;
  background: #fff;
  color: #131614;
  box-shadow: var(--shadow);
}

.product-card img {
  inline-size: 100%;
  border-radius: 12px;
}

.product-card p {
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem 0.4rem 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.product-card p span {
  color: #3f6e1f;
  font-weight: 500;
}

.product-card strong {
  font-weight: 500;
}

.product-card.in-hero {
  position: absolute;
  inset-block-start: 24%;
  inset-inline-start: 25%;
  z-index: 1;
  inline-size: 50%;
}

.phone {
  --x: 0%;
  --y: 0%;
  --r: 0deg;
  --z: 2;

  position: absolute;
  inset-block-start: var(--y);
  inset-inline-start: var(--x);
  z-index: var(--z);
  display: none;
  inline-size: 23%;
  aspect-ratio: 9 / 19;
  padding: 4px;
  border-radius: 20px;
  background: linear-gradient(145deg, #3a403c, #0d0f0e 45%);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 8%) inset,
    var(--shadow);
  rotate: var(--r);
}

.phone .screen {
  display: flex;
  align-items: center;
  block-size: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #050605;
}

.phone .screen img {
  inline-size: 100%;
}

.phone.tall .screen img {
  block-size: 100%;
  object-fit: cover;
}

/* "All": the phones marked data-all, at their a-slots. */
.phone[data-all] {
  display: block;
}

.a0 {
  --x: 0%;
  --y: 10%;
  --r: -9deg;
}

.a1 {
  --x: 77%;
  --y: 6%;
  --r: 8deg;
}

.a2 {
  --x: 9%;
  --y: 50%;
  --r: -4deg;
  --z: 3;
}

.a3 {
  --x: 68%;
  --y: 52%;
  --r: 5deg;
  --z: 3;
}

.a4 {
  --x: 38.5%;
  --y: 0%;
  --r: 0deg;
  --z: 0;
}

/* One ad language picked: only its phones, at their l-slots. */
.stage:has(.switch input:checked:not([value="all"])) .phone {
  display: none;
}

.stage:has(.switch input[value="en"]:checked) .phone[data-lang="en"],
.stage:has(.switch input[value="fr"]:checked) .phone[data-lang="fr"],
.stage:has(.switch input[value="ar"]:checked) .phone[data-lang="ar"],
.stage:has(.switch input[value="ary"]:checked) .phone[data-lang="ary"],
.stage:has(.switch input[value="es"]:checked) .phone[data-lang="es"] {
  display: block;
}

.stage:has(.switch input:checked:not([value="all"])) .l0 {
  --x: 4%;
  --y: 44%;
  --r: -6deg;
  --z: 3;
}

.stage:has(.switch input:checked:not([value="all"])) .l1 {
  --x: 73%;
  --y: 40%;
  --r: 6deg;
  --z: 3;
}

.stage:has(.switch input:checked:not([value="all"])) .l2 {
  --x: 38.5%;
  --y: 0%;
  --r: 0deg;
  --z: 0;
}

.stage:has(.switch input:checked:not([value="all"])) .l3 {
  --x: 2%;
  --y: 4%;
  --r: -10deg;
  --z: 0;
}

.stage:has(.switch input:checked:not([value="all"])) .l4 {
  --x: 75%;
  --y: 2%;
  --r: 10deg;
  --z: 0;
}

/* ── Story ──────────────────────────────────────────────────────────────────── */

.story {
  padding-block: 4rem 6rem;
}

.story-title {
  margin-block-end: 1rem;
}

.beats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.beat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
  padding-block: 3.5rem;
}

.beat-copy {
  max-inline-size: 30rem;
}

.beat-n {
  display: grid;
  place-items: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  margin-block-end: 1.25rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.beat h3 {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  letter-spacing: -0.025em;
}

.beat p {
  margin-block-start: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.beat .btn {
  margin-block-start: 1.75rem;
}

.beat-visual {
  display: grid;
  place-items: center;
  margin: 0;
}

.product-card.in-beat {
  inline-size: min(100%, 340px);
}

.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  inline-size: min(100%, 460px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.creative-grid li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.creative-grid img {
  inline-size: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.creative-grid .cap {
  display: grid;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.creative-grid .cap span {
  color: var(--muted);
}

/* The campaign tree, drawn like the app's canvas: campaign → ad set → ads. */
.tree {
  --wire: color-mix(in srgb, var(--muted) 50%, transparent);

  display: grid;
  justify-items: center;
  gap: 2rem;
  inline-size: min(100%, 460px);
}

.node {
  position: relative;
  display: grid;
  gap: 0.15rem;
  inline-size: min(100%, 280px);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.node + .node::before {
  position: absolute;
  inset-block-start: calc(-2rem - 1px);
  inset-inline-start: 50%;
  block-size: 2rem;
  border-inline-start: 2px dashed var(--wire);
  content: "";
}

.node-kind {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.node-kind::before {
  inline-size: 0.6rem;
  block-size: 0.6rem;
  border-radius: 3px;
  background: var(--green);
  content: "";
}

.node-adset .node-kind::before {
  background: var(--violet);
}

.node-ads .node-kind::before {
  background: var(--coral);
}

.node strong {
  font-size: 0.9375rem;
  font-weight: 500;
}

.node-ads {
  inline-size: 100%;
}

.node-ads ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.node-ads li {
  display: grid;
  gap: 0.3rem;
  font-size: 0.6875rem;
  line-height: 1.3;
}

.node-ads img {
  inline-size: 100%;
  border-radius: 8px;
}

.paused {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.35rem;
  margin-block-start: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font-size: 0.875rem;
  font-weight: 600;
}

.paused svg {
  inline-size: 0.9rem;
  block-size: 0.9rem;
}

.tree.is-paused .node {
  padding: 1.25rem 1.5rem;
  border-color: var(--green);
}

/* ── 3D layout ──────────────────────────────────────────────────────────────── */

.will-3d .scene-layer {
  position: sticky;
  inset-block-start: 0;
  z-index: 0;
  display: block;
  block-size: 100svh;
  margin-block-end: -100svh;
  pointer-events: none;
}

.will-3d .scene {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.is-3d .scene {
  opacity: 1;
}

.will-3d .hero,
.will-3d .story {
  position: relative;
  z-index: 1;
}

.will-3d .hero-stack {
  transition: opacity 0.6s ease;
}

.is-3d .hero-stack {
  opacity: 0;
  pointer-events: none;
}

/* Each beat is a full screen of scroll; its static figure waits on top until the scene is drawn. */
.will-3d .beat {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-block-size: 100svh;
  padding-block: 4rem;
}

.will-3d .beat-visual {
  position: absolute;
  inset-block: 15%;
  inset-inline-end: 0;
  inline-size: 52%;
  transition: opacity 0.6s ease;
}

.is-3d .beat-visual {
  opacity: 0;
  pointer-events: none;
}

.will-3d .beat-copy {
  max-inline-size: 26rem;
}

.will-3d .story {
  padding-block-end: 0;
}

/* ── Pain ───────────────────────────────────────────────────────────────────── */

.pain h2 {
  max-inline-size: 40rem;
}

.pain-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-block-start: 3rem;
}

.pain-list > div {
  padding-block-start: 1.25rem;
  border-block-start: 2px solid var(--border);
}

.pain-list p {
  margin-block-start: 0.6rem;
  color: var(--muted);
}

/* ── Comparison ─────────────────────────────────────────────────────────────── */

.compare-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
  padding: 1rem;
  border-block-end: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.compare-table thead th {
  font-size: 1rem;
  font-weight: 600;
}

.compare-table tbody th {
  inline-size: 22%;
  font-weight: 500;
}

.compare-table .ours {
  background: var(--green-subtle);
}

.compare-table thead .ours {
  border-start-start-radius: 14px;
  border-start-end-radius: 14px;
  color: var(--green-text);
}

.compare-table tbody tr:last-child .ours {
  border-end-start-radius: 14px;
  border-end-end-radius: 14px;
}

.cell {
  display: flex;
  gap: 0.5rem;
}

.mark {
  flex: none;
  inline-size: 1.1rem;
  block-size: 1.1rem;
  margin-block-start: 0.2rem;
}

.yes .mark {
  color: var(--green-text);
}

.partly .mark {
  color: var(--muted);
}

.no .mark {
  color: var(--no);
}

.col-name {
  display: none;
}

/* ── Meta builder ───────────────────────────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3.5rem;
  align-items: center;
  padding-block: 2.5rem;
}

.feature:nth-of-type(even) {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.feature:nth-of-type(even) .feature-copy {
  order: 2;
}

.feature-copy p {
  margin-block-start: 0.75rem;
  color: var(--muted);
}

.shot {
  margin: 0;
}

.shot img {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--shot-bg);
  box-shadow: var(--shadow);
}

.f-audience .shot img {
  inline-size: min(100%, 300px);
  margin-inline: auto;
}

/* ── Pricing ────────────────────────────────────────────────────────────────── */

.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  margin-block-start: 2.5rem;
  padding: 2.5rem;
  border: 1px solid var(--green);
  border-radius: 24px;
  background: var(--surface);
}

.plan-name {
  color: var(--green-text);
  font-weight: 500;
}

.plan-amount {
  margin-block-start: 0.25rem;
  font-size: clamp(2.6rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.plan-note {
  margin-block-start: 0.5rem;
  color: var(--muted);
}

.plan-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-list li {
  display: flex;
  gap: 0.6rem;
}

.plan-list .mark {
  color: var(--green-text);
}

.plan-cta {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.plan-cta p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ── FAQ ────────────────────────────────────────────────────────────────────── */

.faq {
  max-inline-size: 50rem;
  margin-block-start: 2rem;
}

.faq details {
  border-block-end: 1px solid var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  flex: none;
  color: var(--green-text);
  font-size: 1.4rem;
  line-height: 1;
  content: "+";
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  max-inline-size: 44rem;
  padding-block-end: 1.25rem;
  color: var(--muted);
}

/* ── Final call ─────────────────────────────────────────────────────────────── */

.final {
  position: relative;
  isolation: isolate;
  text-align: center;
}

.final::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.3px);
  background-size: 24px 24px;
  content: "";
  mask-image: radial-gradient(closest-side, #000, transparent);
}

.final h2 {
  max-inline-size: 40rem;
  margin-inline: auto;
}

.final p {
  margin-block: 1rem 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ── Legal and contact pages ────────────────────────────────────────────────── */

.doc {
  padding-block: 4rem 5rem;
}

.doc .wrap {
  max-inline-size: 46rem;
}

.doc h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.doc .updated {
  margin-block: 0.75rem 2.5rem;
  color: var(--muted);
}

.doc h2 {
  margin-block: 2.5rem 0.75rem;
  font-size: 1.375rem;
}

.doc p,
.doc ul,
.doc table {
  margin-block: 0 1rem;
}

.doc ul {
  padding-inline-start: 1.25rem;
}

.doc li + li {
  margin-block-start: 0.375rem;
}

.doc table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.doc th,
.doc td {
  padding: 0.625rem 0.75rem;
  border-block-end: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.doc th {
  color: var(--muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.todo {
  padding: 0 0.25rem;
  border-radius: 4px;
  background: #fff3d6;
  color: #7a4f00;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.eyebrow {
  color: var(--green-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-card {
  display: grid;
  gap: 0.75rem;
  margin-block: 2rem;
}

.contact-card a.email {
  font-size: 1.5rem;
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.footer {
  padding-block: 3rem;
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* ── Motion preferences ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ── Smaller screens ────────────────────────────────────────────────────────── */

/* The section links need room: French labels are long. */
@media (width <= 1100px) {
  .nav {
    display: none;
  }
}

@media (width <= 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    min-block-size: 0;
    padding-block: 2.5rem 3rem;
  }

  .hero-stack {
    inline-size: min(100%, 460px);
  }

  .beat,
  .feature,
  .plan {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .feature:nth-of-type(even) .feature-copy {
    order: 0;
  }

  .pain-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  /* 3D on narrow screens: the copy sits at the bottom and the figure box (where the scene draws)
     takes exactly the space above it, however long the copy is. */
  .will-3d .beat {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1rem;
    padding-block: 4.75rem 2rem;
  }

  .will-3d .beat-copy {
    max-inline-size: none;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    backdrop-filter: blur(10px);
  }

  .will-3d .beat-visual {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    order: -1;
    inline-size: 100%;
    min-block-size: 0;
    overflow: hidden;
  }

  .will-3d .hero-grid {
    min-block-size: calc(100svh - 4rem);
  }
}

/* Compact header: sign-in and languages move to the footer, French gets a short button label. */
@media (width <= 767px) {
  .actions .btn-ghost,
  .header .langs,
  .long {
    display: none;
  }

  .short {
    display: inline;
  }

  .header .logo {
    inline-size: auto;
    block-size: 24px;
  }

  /* The comparison table becomes one block per row; roles in the markup keep it a table. */
  .compare-table thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .compare-table tr {
    display: grid;
    padding-block: 1rem;
    border-block-end: 1px solid var(--border);
  }

  .compare-table th,
  .compare-table td {
    display: grid;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    border: 0;
  }

  .compare-table tbody th {
    inline-size: auto;
    padding-inline: 0;
    font-size: 1.0625rem;
  }

  .compare-table tbody tr:last-child .ours,
  .compare-table .ours {
    border-radius: 10px;
  }

  .col-name {
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
  }
}

@media (width <= 560px) {
  main > section {
    padding-block: 4rem;
  }

  .header .wrap {
    gap: 0.625rem;
  }

  .actions {
    gap: 0.5rem;
  }

  .actions .btn {
    padding-inline: 0.875rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .plan {
    padding: 1.5rem;
  }

  .switch label span {
    min-inline-size: 0;
    padding-inline: 0.7rem;
  }
}
