/* ============================================================
   Louis Delage-Damon — Portfolio 2026
   Design system & global styles · single neon-green accent
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&f[]=satoshi@400,500,700,900&f[]=clash-display@500,600,700&display=swap');

:root {
  /* Palette — one accent only */
  --bg: #F7F7F5;
  --bg-2: #EDEDE8;
  --ink: #111111;
  --ink-70: rgba(17, 17, 17, 0.70);
  --ink-55: rgba(17, 17, 17, 0.55);
  --ink-40: rgba(17, 17, 17, 0.40);
  --ink-20: rgba(17, 17, 17, 0.16);
  --ink-12: rgba(17, 17, 17, 0.10);
  --ink-06: rgba(17, 17, 17, 0.05);

  --green: #B7F56D;
  --green-2: #CDFF8C;
  --green-deep: #9CE048;
  --green-glow: rgba(183, 245, 109, 0.55);

  --noir: #0C0D0B;
  --noir-2: #141612;
  --paper-on-noir: #F2F4EC;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bd: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 30px 70px -28px rgba(17, 17, 17, 0.22);

  /* Type */
  --font-display: 'Clash Display', 'General Sans', system-ui, sans-serif;
  --font-ui: 'General Sans', system-ui, sans-serif;
  --font-body: 'Satoshi', 'General Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Roboto Mono', monospace;

  /* Layout */
  --maxw: 1320px;
  --pad: clamp(20px, 5vw, 96px);
  --radius: 26px;
  --radius-lg: 40px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Lenis owns the scroll; keep native smooth off to avoid double-easing */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}
body.loading { overflow: hidden; height: 100vh; }

/* film grain for premium depth */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 7500; pointer-events: none;
  opacity: 0.04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor, body.has-custom-cursor * { cursor: none; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--green); color: var(--ink); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

.text-green { color: var(--green-deep); }
.section--dark .text-green,
.outline-on-noir .text-green { color: var(--green); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { position: relative; padding-block: clamp(96px, 14vh, 200px); }
.section-head { max-width: 820px; margin-bottom: clamp(48px, 6vw, 96px); }
.section-head h2 { font-size: clamp(2.7rem, 7vw, 6rem); margin-top: 16px; }

/* Editorial section rule */
.sec-rule { display: flex; align-items: baseline; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--ink-20); margin-bottom: clamp(40px, 5vw, 72px); }
.sec-index { font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-40); white-space: nowrap; }
.sec-rule .eyebrow { margin-left: auto; white-space: nowrap; }

/* Dark section */
.section--dark { background: var(--noir); color: var(--paper-on-noir); border-radius: 46px; margin-inline: clamp(8px, 1.5vw, 22px); overflow: hidden; }
.section--dark .eyebrow { color: rgba(242,244,236,0.55); }
.section--dark .sec-rule { border-color: rgba(242,244,236,0.16); }
.section--dark .sec-index { color: rgba(242,244,236,0.4); }

/* ---------- Halos ---------- */
.halo { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
.halo-green { background: radial-gradient(circle, rgba(183,245,109,0.85), rgba(183,245,109,0) 70%); opacity: 0.55; }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--noir); color: var(--paper-on-noir);
  display: grid; place-items: center;
  overflow: hidden;
}
.loader.done { pointer-events: none; }
.loader-inner { position: relative; text-align: center; z-index: 2; width: min(560px, 84vw); }
.loader .halo-green { width: 70%; height: 60%; top: 10%; left: 15%; opacity: 0.4; }

.loader-logo { display: block; margin: 0 auto 26px; }
.loader-logo path, .loader-logo line { stroke: var(--green); stroke-width: 2; fill: none;
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  animation: drawLogo 1.4s var(--ease) forwards; }
@keyframes drawLogo { to { stroke-dashoffset: 0; } }

.loader-roles { height: 30px; position: relative; overflow: hidden; margin-bottom: 30px; }
.loader-roles span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 500; font-size: 16px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(242,244,236,0.85); opacity: 0; transform: translateY(14px);
}
.loader-roles span.show { animation: roleCycle 0.9s var(--ease) forwards; }
@keyframes roleCycle {
  0% { opacity: 0; transform: translateY(14px); }
  18%, 78% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-14px); }
}

.loader-bar { width: 100%; height: 2px; background: rgba(242,244,236,0.16); border-radius: 4px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--green);
  box-shadow: 0 0 16px var(--green-glow); transition: width 0.3s linear; }
.loader-count { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: rgba(242,244,236,0.5); display: flex; justify-content: space-between; }

/* curtain reveal */
.loader-curtain { position: fixed; inset: 0; z-index: 9999; background: var(--bg); transform: translateY(100%); pointer-events: none; }

/* ============================================================
   Custom cursor
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: 9600;
  transform: translate(-50%, -50%); mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor-ring { width: 40px; height: 40px; border: 1.4px solid #fff;
  transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), opacity .3s; }
.cursor-ring.is-hover { width: 66px; height: 66px; background: rgba(255,255,255,0.1); }
.cursor-ring.is-label { width: 92px; height: 92px; mix-blend-mode: normal; border-color: transparent; background: var(--green); }
.cursor-dot.is-label { opacity: 0; }
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 9600; transform: translate(-50%, -50%) scale(0.8);
  font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--ink);
  pointer-events: none; opacity: 0; transition: opacity .25s ease, transform .25s var(--ease);
}
.cursor-label.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring, .cursor-label { display: none; } }

/* ============================================================
   Scroll progress
   ============================================================ */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%; background: var(--green); z-index: 9000;
  box-shadow: 0 0 12px var(--green-glow); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--pad);
  transition: padding .4s var(--ease), background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { padding-block: 13px; background: rgba(247,247,245,0.7); backdrop-filter: blur(20px) saturate(1.2); border-bottom-color: var(--ink-06); }
.nav .logo { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.nav .logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { font-size: 15px; font-weight: 500; padding: 9px 16px; border-radius: 100px; color: var(--ink-55); transition: color .25s, background .25s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: var(--ink-06); }
.nav-cta { font-weight: 600; font-size: 15px; padding: 11px 22px !important; border-radius: 100px; background: var(--ink) !important; color: var(--bg) !important; white-space: nowrap; }
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 860px) { .nav-links .nav-link { display: none; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-ui); font-weight: 600; font-size: 16px;
  padding: 17px 30px; border-radius: 100px; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .35s; will-change: transform;
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn span.txt { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; }

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 18px 36px -14px rgba(17,17,17,0.5); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-20); }
.btn-ghost:hover { border-color: var(--ink); }

/* liquid magnetic button (contact) */
.btn-liquid { background: var(--ink); color: var(--bg); }
.btn-liquid .blob { position: absolute; z-index: 1; width: 0; height: 0; border-radius: 50%;
  background: var(--green); transform: translate(-50%, -50%); transition: width .55s var(--ease), height .55s var(--ease); pointer-events: none; }
.btn-liquid:hover { color: var(--ink); }
.btn-liquid:hover .blob { width: 360px; height: 360px; }

/* ============================================================
   Reveal base
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

.reveal-lines .line { display: block; overflow: hidden; padding-block: 0.04em; }
.reveal-lines .line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.reveal-lines.in .line > span { transform: none; }
.reveal-lines.in .line:nth-child(2) > span { transition-delay: .08s; }
.reveal-lines.in .line:nth-child(3) > span { transition-delay: .16s; }
.reveal-lines.in .line:nth-child(4) > span { transition-delay: .24s; }

/* split word reveal */
.split .word { display: inline-block; overflow: hidden; vertical-align: top; }
.split .word > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.split.in .word > span { transform: none; }

/* ============================================================
   Pills / status
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 100px;
  background: var(--glass-bg); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(12px); box-shadow: var(--glass-shadow);
}
.status-pill { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--ink-55); }
.status-pill .live { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green-deep); }
.status-pill .live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--green-deep); opacity: .35; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.9); opacity: 0; } }

.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--glass-shadow);
}

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes floaty-sm { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  [data-reveal], .reveal-lines .line > span, .split .word > span { opacity: 1 !important; transform: none !important; }
}
