/* LeafBound landing page — feuille de style unique, sans JavaScript.
   Palette et typographies reprises de l'application (src/theme/tokens.ts). */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-400-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --forest: #1c2e23;
  --forest-2: #24362b;
  --moss: #2f4a3a;
  --leaf: #4f7a5e;
  --sage: #9ab488;
  --mist: #eef2e7;
  --mist-2: #dfe6d4;
  --ink: #1c2e23;
  --ink-soft: #435649;
  --ochre: #d4a23c;
  --rust: #b85c3a;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--mist);
  color: var(--ink);
  border-radius: 8px;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* ───────── Boutons ───────── */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: var(--sage);
  color: var(--forest);
  transition: background-color 0.2s;
}
.button:hover {
  background: #b0c8a0;
}
.button--dark {
  background: var(--forest);
  color: var(--mist);
}
.button--dark:hover {
  background: var(--moss);
}

/* ───────── En-tête et héros ───────── */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60rem 32rem at 82% 30%, #2c4636 0%, transparent 65%),
    var(--forest);
  color: #f3efe2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.header-nav a {
  text-decoration: none;
  opacity: 0.85;
}
.header-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}
.header-nav .lang {
  padding: 0.25rem 0.7rem;
  border: 1px solid rgb(243 239 226 / 0.35);
  border-radius: 999px;
  opacity: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-top: clamp(2.5rem, 7vw, 6rem);
}

.hero-copy {
  align-self: center;
  padding-bottom: clamp(3rem, 8vw, 7rem);
}

.hero h1 {
  font-size: clamp(2.9rem, 7.4vw, 6rem);
  max-width: 11ch;
}

.hero .lead {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: #d8dccb;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
}
.hero-actions .note {
  font-size: 0.95rem;
  color: #b9c2ad;
}

/* Le téléphone du héros dépasse du bas de la section */
.phone {
  position: relative;
  width: min(100%, 21rem);
  margin-inline: auto;
  padding: 0.55rem;
  background: #0f1913;
  border-radius: 2.6rem 2.6rem 0 0;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
}
.phone img {
  border-radius: 2.1rem 2.1rem 0 0;
  width: 100%;
}
.hero .phone {
  margin-bottom: 0;
  max-height: 34rem;
  overflow: hidden;
}

/* Feuilles : le seul mouvement décoratif de la page, comme dans la session */
.leaves {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.leaf {
  position: absolute;
  top: -2rem;
  width: var(--s, 1.1rem);
  aspect-ratio: 2 / 1;
  background: var(--c);
  border-radius: 100% 0 100% 0;
  opacity: 0.85;
  animation: fall var(--d, 16s) linear infinite;
  animation-delay: var(--t, 0s);
}
@keyframes fall {
  0% {
    transform: translate3d(0, -2rem, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(var(--x, 3rem), 28rem, 0) rotate(200deg);
  }
  100% {
    transform: translate3d(calc(var(--x, 3rem) * -0.6), 58rem, 0) rotate(420deg);
  }
}

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

section {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.intro {
  max-width: 44rem;
}
.intro h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}
.intro p {
  margin-top: 1.1rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(3.5rem, 8vw, 6.5rem);
}
.feature:nth-of-type(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}
.feature:nth-of-type(even) .feature-shot {
  order: 2;
}

.feature .phone {
  border-radius: 2.6rem;
  background: var(--forest);
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(28 46 35 / 0.45);
}
.feature .phone img {
  border-radius: 2.1rem;
}

.feature-text h3 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}
.feature-text > p {
  margin-top: 0.9rem;
  max-width: 34rem;
  color: var(--ink-soft);
}
.feature-text ul {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 34rem;
}
.feature-text li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.7rem;
  border-top: 1px solid var(--mist-2);
}
.feature-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.75rem;
  aspect-ratio: 2 / 1;
  background: var(--leaf);
  border-radius: 100% 0 100% 0;
}

/* Bande « mes données » */
.privacy {
  background: var(--forest);
  color: #f3efe2;
}
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.privacy h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}
.privacy p {
  color: #cfd6c3;
  max-width: var(--measure);
}
.privacy p + p {
  margin-top: 1rem;
}
.privacy a {
  color: var(--sage);
}

/* FAQ */
.faq-list {
  margin-top: 2.5rem;
  max-width: 48rem;
  border-bottom: 1px solid var(--mist-2);
}
.faq-list details {
  border-top: 1px solid var(--mist-2);
}
.faq-list summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--leaf);
  transition: transform 0.2s;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list details p {
  padding: 0 2.5rem 1.4rem 0;
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* Appel final */
.final {
  background: var(--mist-2);
  text-align: left;
}
.final-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.final h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  max-width: 16ch;
}

/* Pied de page */
.site-footer {
  background: var(--forest);
  color: #b9c2ad;
  font-size: 0.95rem;
  padding-block: 2.25rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* ───────── Page de texte (confidentialité) ───────── */

.doc-hero {
  background: var(--forest);
  color: #f3efe2;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.doc-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  max-width: 18ch;
}
.doc-hero p {
  margin-top: 1rem;
  color: #b9c2ad;
}
.doc {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.doc .wrap > * {
  max-width: var(--measure);
}
.doc h2 {
  font-size: 1.7rem;
  margin-top: 2.5rem;
}
.doc p,
.doc ul {
  margin-top: 0.9rem;
  color: var(--ink-soft);
}
.doc ul {
  padding-left: 1.2rem;
}
.doc li + li {
  margin-top: 0.4rem;
}

/* ───────── Adaptations ───────── */

@media (max-width: 52rem) {
  .hero-grid,
  .feature,
  .feature:nth-of-type(even),
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature:nth-of-type(even) .feature-shot {
    order: 0;
  }
  .hero-copy {
    padding-bottom: 2rem;
  }
  .hero .phone {
    max-height: 26rem;
    width: min(100%, 17rem);
  }
  .feature .phone {
    width: min(100%, 17rem);
    margin-inline: 0;
  }
  .header-nav a:not(.lang) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .leaf {
    animation: none;
    top: var(--y, 20%);
  }
  .faq-list summary::after {
    transition: none;
  }
}
