/* ============================================================
   Erwan Savy — Portfolio 3D
   Design tokens + base styles
   ============================================================ */

:root {
  /* Surfaces — cool near-black */
  --bg:            #06080b;
  --bg-1:          #090c11;
  --bg-2:          #0d1219;
  --bg-3:          #121823;
  --surface:       #0e141d;
  --surface-hi:    #141c28;

  /* Lines */
  --line:          rgba(255,255,255,0.07);
  --line-2:        rgba(255,255,255,0.12);

  /* Text */
  --fg:            #e9eef4;
  --fg-soft:       #aeb9c6;
  --fg-dim:        #6c7886;
  --fg-faint:      #44505d;

  /* Accent — cyan clair (set by JS tweak, these are defaults) */
  --accent:        #5fe0f0;
  --accent-2:      #9af2ff;
  --accent-deep:   #1d8fa3;
  --accent-glow:   rgba(95,224,240,0.45);
  --accent-soft:   rgba(95,224,240,0.12);
  --accent-line:   rgba(95,224,240,0.30);

  /* Type */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body:    "Manrope", system-ui, sans-serif;
  --f-mono:    "Space Mono", ui-monospace, monospace;

  /* Rhythm */
  --maxw: 1320px;
  --gut: clamp(20px, 5vw, 64px);

  /* Motion */
  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: auto;
}

/* Hide native cursor only when the halo cursor is active */
body.halo-on,
body.halo-on a,
body.halo-on button { cursor: none; }

::selection { background: var(--accent-soft); color: var(--accent-2); }

h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 500; margin: 0; line-height: 1.05; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* Mono micro-label used everywhere (aerukart-style tracked uppercase) */
.kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---- Grain + scanline overlays (toggled via body classes) ---- */
.fx-grain::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Container */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

/* Reusable scroll-reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Striped placeholder (for missing media) */
.ph-stripes {
  background-color: var(--bg-2);
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px, rgba(255,255,255,0.025) 11px 22px);
}

/* Buttons */
.btn {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  color: var(--bg);
  background: var(--accent);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px -8px var(--accent-glow); }
.btn--ghost {
  background: transparent; color: var(--fg);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 30px -10px var(--accent-glow); }

@media (max-width: 720px){
  body { font-size: 16px; }
}
