/* Kizuna — site de téléchargement. Mêmes règles que l'app : encre, papier, un seul fil rouge,
   coins vifs, filets. Une section = un message. */

@font-face {
  font-family: "Dela Gothic One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dela-gothic-one-latin-400-normal.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: "Dela Gothic One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dela-gothic-one-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/onest-latin-wght-normal.woff2) format("woff2-variations");
  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: "Onest Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/onest-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  color-scheme: dark;
  --thread: #e5484d;
  --thread-hover: #f05a5f;
  --on-thread: #ffffff;
  --ink: #0d0d0f;
  --case: #151517;
  --well: #18181a;
  --paper: #f3f0e8;
  --muted: rgba(243, 240, 232, 0.66);
  --faint: rgba(243, 240, 232, 0.4);
  --line: rgba(243, 240, 232, 0.12);
  --line-strong: rgba(243, 240, 232, 0.3);
  --display: "Dela Gothic One", "Onest Variable", system-ui, sans-serif;
  --body: "Onest Variable", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--thread); color: var(--on-thread); }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 2px; }

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2rem); }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Boutons ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font: 800 0.85rem/1 var(--body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn-sm { height: 2.4rem; padding: 0 1rem; font-size: 0.78rem; }
.btn-lg { height: 3.25rem; padding: 0 1.6rem; }
.btn-primary { background: var(--thread); color: var(--on-thread); }
.btn-primary:hover { background: var(--thread-hover); }
.btn-primary:focus-visible { outline-color: var(--paper); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(243, 240, 232, 0.06); }
.btn.is-off { color: var(--muted); cursor: default; }
.btn.is-off:hover { border-color: var(--line-strong); background: transparent; }

/* --- Barre de navigation ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 15, 0.94);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 4rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  text-decoration: none;
}

.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms;
}
.nav-links a:hover { color: var(--paper); }

/* --- Section 1 : hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4.5rem, 11vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
}

/* Mur d'affiches : quatre rangées inclinées qui défilent en sens alternés. La bande
   posters.webp mesure 3528 × 206 px ; --tile est sa largeur à la hauteur de rangée choisie. */
.hero-wall {
  --row: 190px;
  --tile: calc(var(--row) * 3528 / 206);
  position: absolute;
  z-index: -2;
  top: -3rem;
  left: 50%;
  display: grid;
  gap: 12px;
  width: max(140vw, 1600px);
  transform: translateX(-50%) rotate(-7deg);
  opacity: 0.9;
}
.wall-row {
  width: calc(var(--tile) * 2);
  height: var(--row);
  background: url(/img/posters.webp) repeat-x 0 0 / auto 100%;
  animation: wall 160s linear infinite;
}
.wall-row:nth-child(2) { background-position-x: -900px; animation-direction: reverse; animation-duration: 190s; }
.wall-row:nth-child(3) { background-position-x: -1700px; animation-duration: 140s; }
.wall-row:nth-child(4) { background-position-x: -2500px; animation-direction: reverse; animation-duration: 175s; }

@keyframes wall {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--tile) * -1)); }
}

/* Encre posée sur le mur : le centre reste lisible, le bas se fond dans la page, et la trame
   de points donne le grain manga. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  background:
    radial-gradient(ellipse 52% 48% at 50% 34%, rgba(13, 13, 15, 0.86) 0%, rgba(13, 13, 15, 0.55) 60%, rgba(13, 13, 15, 0.1) 100%),
    linear-gradient(180deg, rgba(13, 13, 15, 0.35) 0%, rgba(13, 13, 15, 0) 25%, rgba(13, 13, 15, 0.7) 64%, var(--ink) 80%);
}
.hero::after {
  background: radial-gradient(circle, rgba(13, 13, 15, 0.4) 0.9px, transparent 1.3px) 0 0 / 4px 4px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 75%);
}

.mark {
  display: inline-block;
  padding: 0 0.18em 0.04em;
  background: var(--thread);
  color: var(--on-thread);
  transform: rotate(-1.5deg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise 700ms var(--ease-out) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pill, .meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pill { padding: 0.45rem 0.9rem; border: 1px solid var(--line-strong); }
.pill i, .meta i { width: 4px; height: 4px; background: var(--thread); }

h1 {
  margin-top: 1.6rem;
  text-shadow: 0 2px 18px rgba(13, 13, 15, 0.9);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 36rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2.2rem; }
.hero .meta { margin-top: 1.1rem; }
.hero .lede, .hero .meta { text-shadow: 0 1px 10px rgba(13, 13, 15, 1); }
.hero .pill { background: rgba(13, 13, 15, 0.7); }

.phone-note {
  max-width: 30rem;
  margin-top: 1.8rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--thread);
  text-align: left;
}
.phone-note p { margin-bottom: 0.8rem; color: var(--muted); font-size: 0.92rem; }
.phone-note strong { color: var(--paper); }
/* Sur un téléphone, la note prend le premier rôle ; le bouton reste, plus discret. */
.not-windows .hero [data-download] { background: transparent; border-color: var(--line-strong); }
.not-windows .nav .btn { display: none; }

.hero-shot {
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding: clamp(0.4rem, 1vw, 0.75rem);
  background: var(--case);
  border: 2px solid rgba(243, 240, 232, 0.9);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

/* --- Sections communes ------------------------------------------------------------------ */

.section { padding: clamp(4rem, 9vw, 6.5rem) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--case); }

/* Le fil rouge : un seul fil, qui traverse toutes les sections et se dessine au scroll.
   Il passe sous le contenu (.wrap est au-dessus) et par les marges entre les sections.
   Le dessin est calculé dans main.js ; ici, juste le trait. */
.section { position: relative; }
.section .wrap, .final .wrap { position: relative; z-index: 2; }

main { position: relative; }
.thread { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.thread svg { display: block; overflow: visible; }
.thread path { fill: none; stroke-linecap: round; }
.thread-base { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 7; }
.thread-glow { stroke: var(--thread); stroke-width: 9; opacity: 0.16; }
.thread-live { stroke: var(--thread); stroke-width: 2.5; }
.thread-halo { fill: var(--thread); opacity: 0.28; }
.thread-head { fill: var(--thread-hover); }
.thread-knot { fill: var(--ink); stroke: var(--line-strong); stroke-width: 1.5; transition: fill 300ms, stroke 300ms; }
.thread-knot.on { fill: var(--thread); stroke: var(--thread-hover); }
.thread-halo { animation: beat 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes beat { 50% { transform: scale(1.45); opacity: 0.12; } }

/* Les cartes s'allument un peu au survol : le fil rouge passe en haut. */
.features li { position: relative; transition: background-color 200ms; }
.features li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--thread);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}
.features li:hover { background: #121214; }
.features li:hover::after { transform: scaleX(1); }
.steps li { background: rgba(13, 13, 15, 0.6); }

.section-head {
  max-width: 40rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.eyebrow {
  color: var(--thread);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-head h2, .final h2 {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.1;
}
.section-head p:not(.eyebrow) { margin-top: 0.9rem; color: var(--muted); font-size: 1.05rem; }

h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }

/* --- Section 2 : fonctionnalités -------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}
.features li { padding: 2rem 1.75rem; background: var(--ink); }
.features .icon { width: 1.6rem; height: 1.6rem; color: var(--thread); }
.features h3 { margin-top: 1.1rem; }
.features p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

/* --- Section 3 : aperçu ----------------------------------------------------------------- */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}
.showcase + .showcase { margin-top: clamp(3rem, 6vw, 4.5rem); }
.showcase.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.showcase.reverse figure { order: 2; }
.showcase figure { margin: 0; border: 1px solid var(--line-strong); }
.showcase h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.showcase p { margin-top: 0.8rem; color: var(--muted); }

/* --- Section 4 : installation ----------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li { padding: 1.75rem; border: 1px solid var(--line-strong); }
.step-num {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--thread);
  color: var(--on-thread);
  font-family: var(--display);
  font-size: 1.05rem;
}
.steps h3 { margin-top: 1.2rem; }
.steps p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.steps strong { color: var(--paper); }
.steps code { color: var(--paper); overflow-wrap: anywhere; }

.verify { margin-top: 1.25rem; border: 1px solid var(--line-strong); }
.verify summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.verify summary::-webkit-details-marker { display: none; }
.verify summary .icon { color: var(--thread); }
.verify summary span { color: var(--faint); font-size: 0.85rem; font-weight: 600; }
.verify summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.3rem; font-weight: 400; }
.verify[open] summary::after { content: "−"; }
.verify-body { padding: 0 1.4rem 1.4rem; }
.verify-body p { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.92rem; }
.verify-body .small { margin: 0.9rem 0 0; font-size: 0.84rem; }

.hash {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.7rem 0.7rem 1rem;
  background: var(--ink);
  border-left: 3px solid var(--thread);
}
.hash code { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.verify pre { margin: 0; padding: 0.8rem 1rem; background: var(--ink); overflow-x: auto; }

/* --- Section 5 : FAQ -------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--thread); font-size: 1.5rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: #fff; }
.faq p { padding: 0 2rem 1.4rem 0; color: var(--muted); }

/* --- Section 6 : dernier appel ---------------------------------------------------------- */

/* Bande rouge aux lignes de vitesse, comme une case d'action. */
.final {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(13, 13, 15, 0.13) 0deg 1.6deg, transparent 1.6deg 6deg),
    radial-gradient(ellipse at center, var(--thread-hover) 0%, var(--thread) 45%, #b8343a 100%);
  color: var(--on-thread);
}
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; text-align: center; }
.final h2 { margin: 0; font-size: clamp(1.9rem, 4.4vw, 3.2rem); text-shadow: 0 3px 0 rgba(13, 13, 15, 0.35); }
.final .btn-primary { background: var(--ink); color: var(--paper); }
.final .btn-primary:hover { background: #000; }
.final .meta { color: rgba(255, 255, 255, 0.85); }

/* --- Pied de page ----------------------------------------------------------------------- */

.footer { padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.86rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 2rem; }
.footer .brand { font-size: 1rem; color: var(--paper); }
.footer p:first-of-type { margin-left: auto; }
.footer a { color: var(--muted); }

/* --- Page 404 --------------------------------------------------------------------------- */

.lost { padding: clamp(5rem, 14vw, 9rem) 0; }
.lost .hero-inner { gap: 0; }
.lost .actions { margin-top: 2rem; }

/* --- Petits écrans ---------------------------------------------------------------------- */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .showcase, .showcase.reverse { grid-template-columns: 1fr; }
  .showcase.reverse figure { order: 0; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .hero-wall { --row: 130px; gap: 8px; opacity: 0.7; }
  .actions { flex-direction: column; align-self: stretch; }
  .footer p:first-of-type { margin-left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-inner, .wall-row, .thread-halo { animation: none; }
}
