/* ============================================
   MORPHESYS — V2 immersive · fond blanc cassé
   Encre profonde + filet d'or
   Harmonisation des univers par le silence
   ============================================ */

:root{
  /* fonds — blanc cassé chaud, jamais clinique */
  --bg:           #fafaf6;   /* papier */
  --bg-soft:      #f4f1e9;   /* papier vergé */
  --bg-warm:      #f7f4ec;
  --bg-deep:      #ece7da;   /* ombre douce */

  /* encres — contraste fort */
  --ink:          #0f0d0a;   /* encre presque noire */
  --ink-soft:     #2a241d;
  --ink-mute:     #6a5f4f;
  --ink-faint:    #a89d8a;

  /* or — fil discret */
  --gold:         #a07c3f;
  --gold-deep:    #7a5d2c;

  --line:         rgba(15, 13, 10, 0.12);
  --line-soft:    rgba(15, 13, 10, 0.06);
  --line-gold:    rgba(160, 124, 63, 0.4);

  --serif:  'Cormorant Garamond', serif;
  --sans:   'DM Sans', sans-serif;

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

*{margin:0;padding:0;box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* lumière très subtile en haut, sinon papier uniforme */
  background-image:
    radial-gradient(ellipse 90% 50% at 50% 0%, var(--bg-warm) 0%, transparent 60%);
  background-attachment: fixed;
}

::selection{
  background: rgba(160, 124, 63, 0.25);
  color: var(--ink);
}

/* Grain papier — très léger */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0 0.05  0 0 0 0.08 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}

/* Particules d'encre — très discrètes */
#particles{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .6;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2.5rem;
  color: var(--ink);
  transform: translateY(0);
  transition: transform .7s var(--ease), opacity .7s var(--ease), background-color .6s var(--ease), box-shadow .6s var(--ease);
}
/* Voile papier discret pour détacher la nav du contenu quand on scrolle */
.nav.is-scrolled{
  background: rgba(250, 250, 246, 0.85);
  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  box-shadow: 0 1px 0 rgba(15, 13, 10, 0.04);
}
/* Auto-masquage quand on lit (scroll vers le bas) */
.nav.is-hidden{
  transform: translateY(-115%);
  opacity: 0;
  pointer-events: none;
}

.nav-brand{
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: .8;
  transition: opacity .8s var(--ease);
}
.nav-brand:hover{ opacity: 1; }
.nav-brand svg{ animation: breath 9s ease-in-out infinite; }

.nav-list{
  list-style: none;
  display: flex;
  gap: 2.8rem;
  align-items: center;
}
.nav-item{
  position: relative;
}

.nav-list > .nav-item > a{
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: lowercase;
  transition: color .8s var(--ease);
  position: relative;
  display: inline-block;
  padding: .4rem 0;
}
.nav-list > .nav-item > a::after{
  content:'';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease);
}
.nav-list > .nav-item > a:hover{ color: var(--ink); }
.nav-list > .nav-item > a:hover::after{ transform: scaleX(1); }

/* Sous-menu : panneau papier qui se dépose au survol */
.nav-item--has-sub{
  padding-bottom: .9rem;
  margin-bottom: -.9rem;
}
.nav-marker{
  display: inline-block;
  margin-left: .35rem;
  font-size: .9em;
  color: var(--gold);
  opacity: .55;
  transform: translateY(-.05em);
  transition: transform .9s var(--ease), opacity .9s var(--ease);
}
.nav-item--has-sub:hover .nav-marker{
  transform: translateY(-.05em) rotate(45deg);
  opacity: 1;
}
.nav-sub{
  position: absolute;
  top: calc(100% + .2rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  min-width: 170px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  box-shadow: 0 24px 50px -28px rgba(15, 13, 10, 0.18);
  z-index: 100;
}
.nav-sub::before{
  content: '';
  position: absolute;
  top: -.7rem;
  left: 50%;
  width: 1px;
  height: .7rem;
  background: var(--line-gold);
  transform: translateX(-50%);
}
.nav-item--has-sub:hover .nav-sub,
.nav-item--has-sub:focus-within .nav-sub{
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-sub-link{
  font-family: var(--serif) !important;
  font-style: italic;
  font-size: 1rem !important;
  letter-spacing: .015em !important;
  text-transform: none !important;
  color: var(--ink-soft) !important;
  white-space: nowrap;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: baseline;
  gap: .35rem;
  transition: color .8s var(--ease);
}
.nav-sub-link::after{ display: none; }
.nav-sub-link:hover{ color: var(--ink) !important; }
.nav-sub-dot{
  color: var(--gold);
  font-style: normal;
  font-size: 1.1em;
  line-height: 0;
  transform: translateY(-.05em);
}

/* ============================================
   HERO — logo inversé sur papier
   ============================================ */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 3rem;
  z-index: 2;
}

/* Logo Morphesys inversé : sablier d'encre sur fond crème.
   Le fond crème du logo se fond naturellement dans le papier du site grâce à multiply */
.hero-logo{
  width: 380px;
  height: auto;
  margin-bottom: 1.5rem;
  mix-blend-mode: multiply;
  animation: breath 9s ease-in-out infinite;
  transition: transform 1.2s var(--ease);
}
.hero-logo:hover{
  transform: scale(1.02);
}

@keyframes breath{
  0%, 100% { transform: scale(1);     opacity: .94; }
  50%      { transform: scale(1.018); opacity: 1; }
}

.subtitle{
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: .12em;
  text-transform: lowercase;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .55em;
  max-width: 900px;
}
.subtitle .sep{
  color: var(--gold);
  font-style: normal;
  font-size: .65em;
  opacity: .8;
  transform: translateY(-.1em);
}
.subtitle span:not(.sep){
  transition: color 1.2s var(--ease);
}
.subtitle:hover span:not(.sep){
  color: var(--ink);
}

.manifesto{
  margin-top: 1.6rem;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .4em;
  text-transform: lowercase;
}

.manifesto .dot{
  color: var(--gold);
  margin: 0 .8rem;
  font-style: normal;
}

.reveal{
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1.8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise{
  to { opacity: 1; transform: translateY(0); }
}

.scroll-hint{
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--ink-faint));
  overflow: hidden;
}
.scroll-hint span{
  position: absolute;
  top: -20px;
  left: 0;
  width: 1px;
  height: 20px;
  background: var(--ink);
  animation: descend 3.5s ease-in-out infinite;
}
@keyframes descend{
  0%   { transform: translateY(0);    opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(80px); opacity: 0; }
}

/* ============================================
   INTRO RESPIRANTE + bifurcation
   ============================================ */
.intro{
  position: relative;
  padding: 6rem 2rem 3rem;
  text-align: center;
  z-index: 2;
}

.intro-text{
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto 3.5rem;
  letter-spacing: .015em;
}
.intro-text em{
  color: var(--gold-deep);
  font-style: italic;
}

/* Bifurcation visuelle : un trait fin vertical qui descend et se sépare en deux étiquettes */
.branches{
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-top: .5rem;
}
.branch-line{
  width: 1px;
  height: 60px;
  margin: 0 auto;
  background: linear-gradient(to bottom, transparent, var(--gold) 30%, var(--gold) 100%);
  opacity: .55;
}
.branch-fork{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .35em;
  text-transform: lowercase;
  color: var(--ink-mute);
}
.branch-fork::before{
  content: '';
  position: absolute;
  top: -.65rem;
  left: 22%;
  right: 22%;
  height: 1px;
  background: var(--line-gold);
}
.branch-dot{
  color: var(--gold);
  font-size: 1.4em;
  line-height: 0;
  transform: translateY(-.05em);
}

/* ============================================
   BRANCHES — espace expérimental / atelier partagé
   Chaque branche est une section ancrée à la même famille visuelle
   ============================================ */
.branch{
  position: relative;
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 4rem 0 3rem;
  z-index: 2;
}

/* fil d'or vertical qui descend de la bifurcation jusqu'à la section */
.branch::before{
  content: '';
  position: absolute;
  top: -3rem;
  left: 50%;
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--line-gold));
  transform: translateX(-50%);
}

.branch-header{
  text-align: center;
  margin-bottom: 3rem;
}

.branch-desc{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 1.28rem;
  line-height: 1.45;
  letter-spacing: .015em;
  margin-top: -1.4rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag{
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: lowercase;
  color: var(--gold-deep);
  margin-bottom: 2.2rem;
  text-align: center;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 0;
}
.projects-grid--duo{
  grid-template-columns: repeat(2, 1fr);
  max-width: calc((1280px - 1.4rem) * 2/3);
  margin: 0 auto;
}

/* ============================================
   SOUS-BRANCHES — Dispositifs / Œuvres
   ============================================ */
.subbranch{
  position: relative;
  margin-top: 3.5rem;
}
.subbranch:first-of-type{
  margin-top: 1rem;
}
.subbranch::before{
  content: '';
  position: absolute;
  top: -2.5rem;
  left: 50%;
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(to bottom, transparent, var(--line-gold));
  transform: translateX(-50%);
}
.subbranch:first-of-type::before{
  display: none;
}
.subbranch-header{
  text-align: center;
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.subbranch-tag{
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: lowercase;
  color: var(--gold-deep);
}
.subbranch-dot{
  color: var(--gold);
  margin-right: .2em;
  opacity: .85;
}
.subbranch-desc{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 1.28rem;
  letter-spacing: .015em;
  line-height: 1.4;
}

.project{
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  transition: all 1.1s var(--ease);
  isolation: isolate;
}

.project::after{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  transition: box-shadow 1.1s var(--ease), border-color 1.1s var(--ease);
  pointer-events: none;
  z-index: 3;
  border: 1px solid transparent;
}

.project:hover{
  transform: translateY(-6px);
  border-color: var(--ink-faint);
}
.project:hover::after{
  box-shadow: 0 30px 60px -30px rgba(15, 13, 10, 0.2);
}

/* Filet d'or qui apparaît en bas au hover — signature commune */
.project::before{
  content: '';
  position: absolute;
  left: 1.8rem; right: 1.8rem; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease);
  z-index: 4;
}
.project:hover::before{
  transform: scaleX(1);
}

/* Zone visuelle : fond papier nu pour tous, le logo respire */
.project-visual{
  position: relative;
  height: 260px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* Logos uniformément traités avec multiply pour faire disparaître les fonds blancs */
.project-logo{
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 1.4s var(--ease), opacity 1.4s var(--ease);
  opacity: .92;
}
.project:hover .project-logo{
  transform: scale(1.04);
  opacity: 1;
}

/* Différenciation très subtile de la lumière par projet */
.project--sable .project-visual{
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, #f7f1e3 0%, var(--bg-soft) 70%);
}
.project--souffle .project-visual{
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, #f3f0e9 0%, var(--bg-soft) 70%);
}
.project--reseau .project-visual{
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, #f7eee0 0%, var(--bg-soft) 70%);
}

.project-content{
  padding: 2rem 1.8rem 2.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-tag{
  font-size: .65rem;
  letter-spacing: .35em;
  text-transform: lowercase;
  color: var(--gold-deep);
  margin-bottom: 1.2rem;
}

.project h2{
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: .9rem;
  line-height: 1.05;
  letter-spacing: .015em;
}

.project p{
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.8rem;
}

.project-link{
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: lowercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  width: fit-content;
}
.arrow{
  display: inline-block;
  transition: transform 1s var(--ease);
  color: var(--gold-deep);
}
.project:hover .arrow{
  transform: translateX(8px);
}

/* ============================================
   ANKA GIRLS — même carte que les autres projets,
   centrée seule dans l'atelier partagé
   ============================================ */
.projects-grid--solo{
  grid-template-columns: 1fr;
  max-width: calc((1280px - 2 * 1.4rem) / 3);
  margin: 0 auto;
}

/* L'œuvre Exha Vocalis : son logo aqueux a un fond clair argenté.
   On le laisse en multiply pour qu'il fonde naturellement sur le papier */
.project--souffle .project-visual{
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%, #ece8de 0%, var(--bg-soft) 80%);
}

/* tame the cobalt/pink of the anka logo, like before */
.project-logo--anka{
  filter: saturate(0.75);
  transition: filter 1.4s var(--ease), transform 1.4s var(--ease), opacity 1.4s var(--ease);
}
.project--anka:hover .project-logo--anka{
  filter: saturate(1);
}

.project--anka .project-visual{
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, #f5eee2 0%, var(--bg-soft) 70%);
}

/* ============================================
   PARCOURS
   ============================================ */
.artist{
  position: relative;
  width: min(1100px, 92vw);
  margin: 4rem auto 0;
  padding: 4rem 0 2rem;
  z-index: 2;
}
.artist::before{
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--line-gold));
  transform: translateX(-50%);
}

.artist-inner{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  align-items: center;
}

.artist-portrait{
  position: relative;
  width: 240px;
  height: 240px;
}
.artist-portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: contrast(1.02) brightness(1.02);
  transition: filter 1.4s var(--ease), transform 1.4s var(--ease);
  display: block;
  position: relative;
  z-index: 2;
}
.artist-portrait:hover img{
  filter: contrast(1.05) brightness(1.04);
  transform: scale(1.01);
}
.artist-portrait-frame{
  position: absolute;
  inset: -12px;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  pointer-events: none;
  transition: inset 1.4s var(--ease), border-color 1.4s var(--ease);
  z-index: 1;
}
.artist-portrait:hover .artist-portrait-frame{
  inset: -18px;
  border-color: var(--gold);
}

.artist-text{
  padding-right: 1rem;
}

.artist-tag{
  text-align: left;
  margin-bottom: 1.6rem;
}

.artist-name{
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: .025em;
  line-height: 1.05;
  margin-bottom: 1.6rem;
}

.artist-lead{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.28rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin-bottom: 1.8rem;
  letter-spacing: .015em;
  max-width: 32ch;
}

.artist-bio{
  color: var(--ink-soft);
  font-size: .98rem;
  line-height: 1.85;
  margin-bottom: 1.1rem;
  max-width: 56ch;
}
.artist-bio em{
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--ink);
  letter-spacing: .01em;
}

.artist-signature{
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-mute);
  letter-spacing: .04em;
}

/* ============================================
   FOOTER
   ============================================ */
footer{
  position: relative;
  margin-top: 6rem;
  padding: 4rem 2rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  z-index: 2;
}

.footer-symbol{
  width: 28px;
  height: 28px;
  margin: 0 auto 2rem;
  color: var(--ink-mute);
  animation: breath 11s ease-in-out infinite;
}
.footer-symbol svg{ width: 100%; height: 100%; }

.footer-line{
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
  letter-spacing: .04em;
}

.footer-copy{
  font-size: .68rem;
  letter-spacing: .35em;
  text-transform: lowercase;
  color: var(--ink-mute);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media(max-width: 980px){
  .nav{ padding: 1.2rem 1.4rem; }
  .nav-list{ gap: 1.2rem; }
  .nav-list a{ font-size: .65rem; letter-spacing: .2em; }

  .hero-logo{ width: 240px; }

  .projects-grid{
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .intro{ padding: 4rem 1.5rem 2rem; }
  .intro-text br{ display: none; }

  .branch{ padding: 3rem 0 2rem; }
  .branch::before{ top: -2rem; height: 2rem; }
  .branch-header{ margin-bottom: 2rem; }
  .branch-desc br{ display: none; }

  .projects-grid--solo,
  .projects-grid--duo{ max-width: 100%; grid-template-columns: 1fr; }
  .subbranch{ margin-top: 2.5rem; }
  .subbranch::before{ top: -1.8rem; height: 1.6rem; }

  .subtitle{
    font-size: 1.25rem;
    letter-spacing: .08em;
    gap: .4em;
  }

  .artist{ margin-top: 3rem; padding: 3rem 0 1rem; }
  .artist::before{ height: 2rem; }
  .artist-inner{
    grid-template-columns: 1fr;
    gap: 2.5rem;
    justify-items: center;
    text-align: center;
  }
  .artist-portrait{ width: 200px; height: 200px; }
  .artist-tag{ text-align: center; }
  .artist-lead{ margin-left: auto; margin-right: auto; }
  .artist-bio{ margin-left: auto; margin-right: auto; }
}

@media(prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
