/* =========================
   SYSTEME D'ESPACEMENT
========================= */

:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 80px;

  --corner-offset: 24px;
}

/* =========================
   FONT
========================= */

@font-face {
  font-family: 'Karrik';
  src: url('./fonts/Karrik-Regular.woff2') format('woff2');
}

/* =========================
   RESET
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

@media (hover: none) and (pointer: coarse) {
  * {
    cursor: auto !important;
  }
}

body {
  cursor: none;
}

a {
  position: relative;
  display: inline-block;
  padding: 4px 6px;
}

a::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
}

a:hover::after {
  opacity: 1;
}

@media (hover: none) {
  a::after {
    opacity: 0.5;
  }
}



/* =========================
   RESET LIENS
========================= */

a,
a:visited,
a:active {
  color: inherit;
  text-decoration: none;
}

/* =========================
   BASE
========================= */

html, body {
  height: 100%;
}

body {
  background: #ffffff;
  color: #000000;
  font-family: 'Karrik', sans-serif;
  overflow-x: hidden;
}

/* =========================
   LAYOUT
========================= */

main {
  position: relative;
  width: 100%;
  min-height: 100dvh;
}

/* =========================
   TITRE CENTRÉ
========================= */

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* titre centré */
.title {
  animation: titleReveal 0.6s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

@keyframes titleReveal {
  to {
    opacity: 1;
  }
}

/* baseline alignée à gauche du titre */
.baseline {
  align-self: flex-start;

  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;

  opacity: 0;
  transform: translateX(-12px) translateY(6px);

  animation: baselineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 1.8s;
}

@keyframes baselineReveal {
  to {
    opacity: 0.4;
    transform: translateX(0) translateY(0);
  }
}

/* =========================
   SIGNATURE
========================= */
.signature {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);

  font-size: 7px;
  letter-spacing: 2px;
  opacity: 0.2;
}

/* =========================
   NAVIGATION COINS
========================= */

.corner {
  position: fixed;
  font-size: 11px;
  letter-spacing: 2px;
}

.corner a {
  color: black;
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
  /* micro interaction uniquement typo */

  .corner a:hover {
    opacity: 1;
  }

/* positions */

.top-left { top: var(--corner-offset); left: var(--corner-offset); }
.top-right { top: var(--corner-offset); right: var(--corner-offset); }
.bottom-left { bottom: var(--corner-offset); left: var(--corner-offset); }
.bottom-right { bottom: var(--corner-offset); right: var(--corner-offset); }

/* =========================
   GRILLE FOND
========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);

  background-size: 80px 80px;
}

/* =========================
   WORK LIST
========================= */
.work {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}

.work-list {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-list a {
  font-size: 20px;
  opacity: 0.5;
  transition: 0.3s ease;
}

.work-list a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* preview */

.work-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: 0.6s ease;
}

/* =========================
   PAGE PROJET
========================= */

.project {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  overflow: visible;

  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  gap: var(--space-md);
  align-items: start;
}

/* IMAGE */

.project-image {
  position: sticky;
  top: 120px;
  height: auto;
  padding: 10px;
  background: white;
  transform: translateY(-10px);
  transition: opacity 0.2s ease-out;
}

@media (max-width: 768px) {
  .project-image {
    position: relative;
    top: 0;
  }
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
}

/* TEXTE */

.project-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.project-text h1 {
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 1px;
}

.project-text p {
  align-self: start;
  font-size: 12px;
  line-height: 1.6;
  max-width: 320px;
  opacity: 0.7;
}

@media (max-width: 768px) {

  .project {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 100px 24px;
  }

  .project-text {
    max-width: 100%;
  }

}

/* =========================
   CRÉDIT PROJET
========================= */

.project-meta {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.4;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================
   NAVIGATION PROJETS
========================= */

.project-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  gap: 40px;

  font-size: 11px;
  letter-spacing: 2px;
}

.project-nav a {
  text-decoration: none;
  color: inherit;
  opacity: 0.5;
  position: relative;
}

.project-nav a:hover {
  opacity: 1;
}

.project-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background: black;
  transition: width 0.2s ease;
}

.project-nav a:hover::after {
  width: 100%;
}

/* =========================
   ABOUT
========================= */

.about {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  max-width: 460px;
  text-align: left;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 768px) {
  .about {
    position: relative;
    top: auto;
    left: auto;
    transform: none;

    margin: 120px 24px;
  }
}

/* accroche */
.about-main {
  font-size: 18px;
  letter-spacing: 1px;
  max-width: 350px;
}

/* texte */
.about-sub {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.5);
  max-width: 300px;
}

.about-sub:first-of-type {
  color: rgba(0, 0, 0, 0.5);
}

.about-sub:last-of-type {
  color: rgba(0, 0, 0, 0.35);
}

.about-main,
.about-sub {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.4s ease forwards;
}

.about-sub:nth-of-type(2) {
  animation-delay: 0.2s;
}

.about-sub:nth-of-type(3) {
  animation-delay: 0.4s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   CONTACT — ALIGNEMENT FIX
========================= */

.contact {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 24px;
  column-gap: 40px;

  align-items: center;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .contact {
    position: relative;
    top: auto;
    left: auto;
    transform: none;

    grid-template-columns: 1fr;
    margin: 120px 24px;
  }
}

/* chaque bloc devient "transparent" */

.contact-block {
  display: contents;
}

/* labels */

.label {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.4;
  text-align: left;
}

/* contenu */

.contact a,
.contact p {
  font-size: 16px;
  text-decoration: none;
  color: inherit;
  opacity: 0.9;
  text-align: left;
}

.contact a:hover {
  opacity: 1;
}

/* =========================
   MODE INVERSE
========================= */

.archive-page {
  background: #000;
  color: #fff;
}

/* =========================
   TITRE FOND ARCHIVE
========================= */

.archive-page::before {
  content: "ARCHIVE";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  font-family: 'Karrik', sans-serif;
  font-size: 22vw;
  letter-spacing: 12px;

  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.25);

  opacity: 0.4;

  text-shadow:
    0 0 0 rgba(255,255,255,0.15),
    0 0 20px rgba(255,255,255,0.05);

  pointer-events: none;
  z-index: 0;

  background-image:
  linear-gradient(rgba(255,255,255,0.18) 1.2px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,0.22) 1.2px, transparent 1px);

  background-size: 80px 80px;
}

.archive-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    black 0%,
    transparent 10%,
    transparent 90%,
    black 100%
  );
}

.archive-page a::after {
  border: 1px solid rgba(255,255,255,0.3);
}

.archive-page .cursor::before,
.archive-page .cursor::after {
  background: white;
}

/* =========================
   ARCHIVE LAYOUT
========================= */

.archive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;

  max-width: 900px;
  margin: 120px auto;
  padding: 40px;
}

/* items */

.archive-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* date */

.archive-item span {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.4;
}

/* texte */

.archive-item p {
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.9;
}

.archive-item:nth-child(2n) p {
  opacity: 0.8;
  letter-spacing: 1px;
}

.archive-item:nth-child(3n) {
  transform: translateY(10px);
}

/* hover */

.archive-item:hover p {
  opacity: 1;
}

@media (max-width: 768px) {
  .archive {
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 100px auto;
  }
}

/* =========================
   NAV FIXE (TOUTES PAGES)
========================= */

/* override pour archive */

.archive-page .corner a {
  color: white;
}

/* archive */

.archive-page .corner a {
  color: rgba(255,255,255,0.7);
}

.archive-page .corner a:hover {
  color: white;
}

.archive-page {
  background-image:
    linear-gradient(white 1px, transparent 1px),
    linear-gradient(90deg, white 1px, transparent 1px);
}

.corner {
  position: fixed;
}

/* =========================
   TRANSITION GRILLE
========================= */
.transition-shape {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  opacity: 0;
  rotate: 0deg;

  background: black;

  transform: translate(-50%, -50%) scale(0);
  z-index: 9999;
  pointer-events: none;

  transition: 
    transform 0.9s cubic-bezier(0.83, 0, 0.17, 1),
    opacity 0.4s ease;

  will-change: transform;
}

/* variantes */

.shape-circle {
  border-radius: 50%;
}

.shape-square {
  border-radius: 0;
}

.shape-cross {
  background: none;
}

.shape-cross::before,
.shape-cross::after {
  content: "";
  position: absolute;
  background: black;
}

.shape-cross::before {
  width: 100%;
  height: 2px;
  top: 50%;
}

.shape-cross::after {
  height: 100%;
  width: 2px;
  left: 50%;
}

/* état actif */

.transition-shape.active {
  transform: translate(-50%, -50%) scale(140) rotate(8deg);
  opacity: 1;
}

/* animations */

@keyframes screenIn {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gridReveal {
  0% {
    opacity: 0;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
}



/* =========================
   TIMELINE
========================= */

.timeline {
  position: relative;
  max-width: 600px;
  margin: 120px auto;
  padding: 40px 20px;

  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ligne centrale */

.timeline-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 0;
  background: rgba(255,255,255,0.3);
  transition: height 1.2s ease;
}

/* items */

.timeline-item {
  padding-left: 40px;
  position: relative;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* point */

.timeline-dot {
  position: absolute;
  left: -4px;
  top: 6px;

  width: 8px;
  height: 8px;
  background: white;

  opacity: 0;
  transform: scale(0);
  transition: all 0.4s ease;
}

/* date */

.timeline-item span {
  font-size: 11px;
  opacity: 0.4;
  letter-spacing: 2px;
}

/* texte */

.timeline-item p {
  font-size: 16px;
  margin-top: 6px;
  opacity: 0.9;
}

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 9999;

  left: 0;
  top: 0;

  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

@media (hover: none) and (pointer: coarse) {
  .cursor {
    display: none;
  }

  body {
    cursor: auto;
  }
}


/* lignes de la croix */
.cursor::before,
.cursor::after {
  content: "";
  position: absolute;
  background: black;
  transition: all 0.2s ease;
}

a:hover ~ .cursor::before,
a:hover ~ .cursor::after {
  background: red;
}

/* horizontal */
.cursor::before {
  width: 20px;
  height: 1px;
  top: 50%;
  left: 0;
}

/* vertical */
.cursor::after {
  width: 1px;
  height: 20px;
  left: 50%;
  top: 0;
}

/* logo anime */

.hero {
  height: 100dvh; /* important */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px; /* espace logo / titre */
}

#logo * {
  display: block;
  margin-bottom: 20px;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: filter 0.6s ease;
}

#logo:hover {
  filter: blur(0.5px);
}

#logo .logo-circle {
  animation-delay: 0.2s;
}

#logo .logo-line-vertical {
  animation-delay: 0.4s;
}

#logo .logo-line-horizontal {
  animation-delay: 0.6s;
}

#logo .logo-square {
  animation-delay: 0.8s;
}

.project-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
}

/* =========================
   PAGE LOGO ARTISTIQUE
========================= */

.logo-page {
  background: #000;
  color: #fff;
  overflow: hidden;
}

.logo-stage {
  width: 100%;
  height: 100dvh;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
}

.logo-container {
  position: relative;
  transform: none;
}

#logo {
  width: 180px;
  height: 180px;
}

.logo-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 4px;
  opacity: 0.4;
}

.logo-nav {
  position: fixed;
  top: 24px;
  left: 24px;
}

.logo-nav a {
  font-size: 10px;
  letter-spacing: 3px;
  opacity: 0.5;
}

.logo-nav a:hover {
  opacity: 1;
}

/* grain subtil */

.logo-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url('img/noise.png');
  opacity: 0.05;
}

.logo-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* base */
.note {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  opacity: 0.4 !important;
  transition: 0.6s ease;
  pointer-events: auto;
}

/* positions (désorganisé volontaire) */
.n1 { top: 15%; left: 12%; transform: rotate(-8deg); }
.n2 { top: 25%; right: 10%; transform: rotate(6deg); }
.n3 { bottom: 20%; left: 8%; transform: rotate(-4deg); }
.n4 { bottom: 15%; right: 15%; transform: rotate(8deg); }
.n5 { top: 60%; left: 45%; transform: rotate(-2deg); }

/* interaction légère */
.note:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

@media (hover: none) {
  a {
    padding: 10px 12px;
  }

  a::after {
    opacity: 0.3;
  }
}

