/* ============ TRAME · Base v2 : reset + typo + layout dark ============ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { -webkit-user-drag: none; user-select: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

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

/* Focus ring */
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

/* ---- Typographies ---- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.03em;
}

h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-3xl); line-height: var(--lh-title); font-weight: 700; }
h3 { font-size: var(--fs-xl); line-height: var(--lh-heading); font-weight: 700; }
h4 { font-size: var(--fs-lg); line-height: var(--lh-heading); font-weight: 600; }

.h-mega { font-size: var(--fs-mega); line-height: var(--lh-tight); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.045em; }

p { margin: 0 0 1em; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--text); font-weight: 600; }
em { font-style: normal; color: var(--lime); }
.accent { color: var(--lime); }

/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-block;
}
.eyebrow .accent { color: var(--lime); }
.eyebrow.big { font-size: var(--fs-sm); }

/* Underline link */
.link {
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-soft);
}
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}
.link:hover { color: var(--lime); }
.link:hover::after { transform: scaleX(1); }

/* ---- Layout ---- */

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

section { padding: var(--sec-y) 0; position: relative; }
section + section { padding-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ Curseur custom (desktop uniquement) ============ */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button,
  body.has-cursor input,
  body.has-cursor textarea,
  body.has-cursor select,
  body.has-cursor [role="button"] { cursor: none; }
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 22px; height: 22px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.18s var(--ease-out), height 0.18s var(--ease-out), border-color 0.18s var(--ease-out), background 0.18s var(--ease-out);
  z-index: 9999;
  mix-blend-mode: normal;
  will-change: transform;
  opacity: 0;
}
.cursor::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), opacity 0.18s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
.cursor.is-hover {
  width: 44px; height: 44px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent);
}
.cursor.is-hover::after { transform: translate(-50%, -50%) scale(0); opacity: 0; }
@media (hover: none) or (pointer: coarse) {
  .cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
  body.has-cursor, body.has-cursor * { cursor: auto !important; }
}
