/* ATeam — landing « Hors champ »
   Monochrome, une seule famille (Outfit), le flou comme matière. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/outfit-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;
}

:root {
  --bg: #060606;
  --fg: #f1f1ef;
  --muted: #a3a3a0;
  --dim: #8c8c89;
  --line: rgb(255 255 255 / 0.14);
  --font: "Outfit", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);

  /* Les deux réglages de l'effet de mise au point */
  --blur: clamp(8px, 1.55vw, 22px);      /* flou du logo hors de la zone nette */
  --lens: clamp(360px, 54vw, 760px);     /* diamètre de la fenêtre qui suit le curseur */

  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

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

html {
  background-color: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background-color: var(--bg);
  /* grain photographique, atténué par un voile de la couleur de fond */
  background-image: linear-gradient(rgb(6 6 6 / 0.5), rgb(6 6 6 / 0.5)), url("assets/grain.png");
  background-size: auto, 220px 220px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: currentColor;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

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

.wrap {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite {
  position: absolute;
  overflow: hidden;
}

.skip {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

/* ------------------------------------------------------------- boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding-inline: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn--solid {
  background-color: var(--fg);
  color: var(--bg);
}

.btn--solid:hover {
  background-color: #fff;
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* -------------------------------------------------------------- en-tête */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
}

.header__logo {
  display: flex;
  align-items: center;
  height: 44px;
}

.header__logo svg {
  width: 104px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
}

.nav__link {
  padding-block: 12px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: #fff;
}

/* ----------------------------------------------------------------- hero */

/* Les fenêtres de mise au point sont plus larges que le logo et se déplacent :
   on coupe ici ce qui dépasse sur les côtés, pour ne jamais élargir la page. */
.hero {
  --logo-gap: clamp(64px, 8vw, 120px);
  padding-block: var(--logo-gap) clamp(64px, 7.2vw, 104px);
  overflow-x: hidden;
  overflow-x: clip;
}

/* La scène. Le logo flou reste en place ; par-dessus, deux « fenêtres » rondes
   montrent une copie à peine floue, puis une copie nette. script.js déplace les
   fenêtres avec --tx / --ty (pixels depuis le centre) et la copie qu'elles
   contiennent part en sens inverse : elle reste donc exactement sur le logo flou.
   D'une image à l'autre, seuls des transform changent : rien n'est redessiné. */
.stage {
  --af: clamp(64px, 11vw, 132px);
  position: relative;
  touch-action: pan-y;
}

.stage__logo {
  width: 100%;
  height: auto;
}

.stage__logo--far {
  opacity: 0.88;
  filter: blur(var(--blur));
}

.lens {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  will-change: transform;
}

/* Ni position ni transform sur la fenêtre : la copie du logo doit se caler sur
   .lens, qui a la taille de la scène, tout en étant découpée par le masque. */
.lens__window {
  flex: none;
  width: var(--lens);
  height: var(--lens);
}

.lens__window .stage__logo {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(calc(var(--tx, 0px) * -1), calc(var(--ty, 0px) * -1), 0);
  will-change: transform;
}

.lens--mid .lens__window {
  -webkit-mask-image: radial-gradient(circle closest-side, #000 0%, #000 44%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 0%, #000 44%, transparent 100%);
}

.lens--mid .stage__logo {
  filter: blur(calc(var(--blur) * 0.23));
}

.lens--near .lens__window {
  -webkit-mask-image: radial-gradient(circle closest-side, #000 0%, #000 28%, transparent 68%);
  mask-image: radial-gradient(circle closest-side, #000 0%, #000 28%, transparent 68%);
}

/* collimateur, au centre de la zone nette */
.stage__af {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--af);
  height: var(--af);
  margin: calc(var(--af) / -2) 0 0 calc(var(--af) / -2);
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  mix-blend-mode: difference;
  pointer-events: none;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  will-change: transform;
}

.stage__af path {
  vector-effect: non-scaling-stroke;
}

/* Grain par-dessus le logo flou. Il déborde dans les marges (jamais au-delà de
   l'écran) et s'y éteint en fondu, pour ne pas dessiner de cadre. */
.stage::after {
  content: "";
  position: absolute;
  inset: -70px calc(var(--gutter) * -1);
  background-image: url("assets/grain.png");
  background-size: 220px 220px;
  mix-blend-mode: difference;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent), linear-gradient(to bottom, transparent, #000 70px, #000 calc(100% - 70px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent), linear-gradient(to bottom, transparent, #000 70px, #000 calc(100% - 70px), transparent);
  mask-composite: intersect;
}

.hero__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px 64px;
  margin-top: var(--logo-gap);
}

.hero__lead {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero__aside {
  flex: 0 1 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  font-size: clamp(42px, 6.1vw, 88px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* Mots flous : nets au survol, ou chacun leur tour avec .soft--rack.
   Le flou est une ombre du texte, le texte lui-même étant transparent. Pas de
   filter sur ces mots : il laissait voir un rectangle autour du mot dans
   certains navigateurs. */
.soft {
  color: transparent;
  text-shadow: 0 0 0.13em var(--fg);
  white-space: nowrap;
  cursor: default;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.soft--rack {
  animation: rack 10.5s ease-in-out infinite both;
}

.soft--rack:nth-of-type(2) {
  animation-delay: 3.5s;
}

.soft--rack:nth-of-type(3) {
  animation-delay: 7s;
}

.soft:hover {
  color: inherit;
  text-shadow: 0 0 0 transparent;
  animation: none;
}

@keyframes rack {
  0%,
  8% {
    color: transparent;
    text-shadow: 0 0 0.15em var(--fg);
  }
  17%,
  30% {
    color: var(--fg);
    text-shadow: 0 0 0 transparent;
  }
  40%,
  100% {
    color: transparent;
    text-shadow: 0 0 0.15em var(--fg);
  }
}

/* ------------------------------------------------------------- sections */

.section__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  padding-block: clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--line);
}

.section__label {
  flex: 0 0 180px;
  padding-top: 14px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__body {
  flex: 1 1 560px;
  min-width: 0;
}

.statement {
  font-size: clamp(30px, 4.2vw, 60px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.statement__sub {
  margin-top: 28px;
  font-size: 20px;
  color: var(--muted);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  margin-top: 72px;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pillar h3 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.pillar p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* Visuels de références : cinq images déjà brouillées et floutées, aucun effet
   ajouté ici. Pour changer leur nombre, adapter aussi les colonnes (ici et en bas
   du fichier). */
.refs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 56px;
}

.refs__item {
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 4px;
}

.refs__item img {
  width: 100%;
  height: auto;
  opacity: 0.9;
}

.refs__note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--dim);
}

/* ---------------------------------------------------------------- accès */

.access {
  overflow: hidden;
}

.access .wrap {
  position: relative;
}

/* monogramme flou, à moitié sorti du cadre sur la droite */
.access__mark {
  position: absolute;
  top: 50%;
  right: max(-240px, -17vw);
  width: min(760px, 60%);
  height: auto;
  opacity: 0.14;
  filter: blur(30px);
  transform: translateY(-50%);
  pointer-events: none;
}

.access .section__inner {
  position: relative;
  align-content: center;
  min-height: clamp(560px, 54vw, 780px);
}

.access .section__label {
  padding-top: 18px;
}

.access__title {
  font-size: clamp(36px, 5.4vw, 78px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.access .lede {
  max-width: 520px;
  margin-top: 32px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 600px;
  margin-top: 32px;
}

.form__label {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form__input {
  flex: 1 1 260px;
  min-width: 0;
  height: 56px;
  padding-inline: 22px;
  border: 1px solid rgb(241 241 239 / 0.36);
  border-radius: 999px;
  background-color: rgb(6 6 6 / 0.6);
  color: var(--fg);
  font: inherit;
  font-size: 17px;
  transition: border-color 0.2s ease;
}

.form__input::placeholder {
  color: var(--dim);
}

.form__input:focus {
  border-color: var(--fg);
}

.form__row .btn {
  height: 56px;
  padding-inline: 30px;
}

.form__note {
  font-size: 14px;
  color: var(--dim);
}

.form__note.is-error {
  color: var(--fg);
}

.form__done {
  max-width: 600px;
  margin-top: 32px;
  padding: 22px 26px;
  border: 1px solid rgb(241 241 239 / 0.36);
  border-radius: 20px;
  font-size: 18px;
}

/* -------------------------------------------------------- pied de page */

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer__logo {
  width: 76px;
  height: auto;
  color: var(--fg);
}

/* ------------------------------------------------------------ contextes */

@media (max-width: 760px) {
  .nav__link {
    display: none;
  }

  .pillars {
    grid-template-columns: minmax(0, 1fr);
  }

  /* cinq logos : trois en haut, deux centrés dessous */
  .refs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .refs__item {
    grid-column: span 2;
  }

  .refs__item:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 520px) {
  .form__row .btn {
    width: 100%;
  }
}

/* La dérive du logo est gérée par script.js, qui lit la même préférence. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .soft--rack {
    animation: none;
  }

  .btn,
  .soft {
    transition: none;
  }
}
