/* ============================================================
   MATHIS LE HARDY — Réalisateur & Rendus 3D
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;1,6..96,500&family=Work+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root{
  --black: #0A0908;
  --surface: #15130E;
  --surface-2: #1D1A13;
  --line: #2C2820;
  --ivory: #EDE8DF;
  --grey: #8F897A;
  --amber: #460078;
  --amber-dim: #2E004E;
  --rust: #7A2E2E;

  --display: 'Bodoni Moda', 'Times New Roman', serif;
  --sans: 'Work Sans', -apple-system, sans-serif;
  --mono: 'Space Mono', monospace;

  --container: 1180px;
  --edge: 6vw;
}

@media (max-width: 640px){
  :root{ --edge: 5.5vw; }
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
html, body{ overflow-x: hidden; width: 100%; }

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

body{
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle film grain over everything */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a{ color: inherit; text-decoration: none; }

img{ max-width: 100%; display: block; }

h1,h2,h3,h4{
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.01em;
}

p{ margin: 0; }

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* ---------------- Header / nav ---------------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,9,8,0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 1rem;
}

.brand{
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand small{
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--amber);
  letter-spacing: 0.12em;
}

@media (max-width: 480px){
  .site-header .wrap{ height: 66px; }
  .brand{ font-size: 0.98rem; }
  .brand small{ display: none; }
}
@media (max-width: 480px) and (min-width: 0px){
  .nav-links{ top: 66px; }
}

.nav-links{
  display: flex;
  gap: 2.4rem;
  font-size: 0.92rem;
}
.nav-links a{
  position: relative;
  padding: 4px 0;
  color: var(--grey);
  transition: color 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active{ color: var(--ivory); }
.nav-links a.active::after{
  content:"";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--amber);
}

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ivory);
  width: 42px; height: 42px;
  cursor: pointer;
  font-family: var(--mono);
}

@media (max-width: 800px){
  .nav-toggle{ display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .nav-links{
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--black);
    flex-direction: column;
    padding: 3rem var(--edge) calc(3rem + env(safe-area-inset-bottom, 0px));
    gap: 0.4rem;
    font-size: 1.2rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open{
    opacity: 1; transform: none; pointer-events: auto;
  }
  .nav-links a{
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
}



/* ---------------- Buttons ---------------- */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.7em;
  border: 1px solid var(--amber);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover{ background: var(--amber); color: var(--black); }

.btn.ghost{ border-color: var(--line); }
.btn.ghost:hover{ background: var(--surface-2); color: var(--ivory); }

/* ---------------- Slate (clapperboard) component ---------------- */
/* A real production slate: scene / take / role / date — used once
   as a structural device, not decoration. */

.slate{
  border: 1px solid var(--line);
  background: var(--surface);
}

.slate-top{
  height: 34px;
  background: repeating-linear-gradient(
    -45deg,
    var(--ivory) 0 26px,
    var(--black) 26px 52px
  );
  border-bottom: 1px solid var(--line);
}

.slate-body{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
}
.slate-body div{
  padding: 1rem 1.2rem;
  border-right: 1px solid var(--line);
}
.slate-body div:last-child{ border-right: none; }
.slate-body span{
  display: block;
  color: var(--amber);
  font-size: 0.68rem;
  margin-bottom: 0.4rem;
}
.slate-body strong{
  color: var(--ivory);
  font-weight: 400;
  font-size: 0.8rem;
}

@media (max-width: 640px){
  .slate-body{ grid-template-columns: repeat(2, 1fr); }
  .slate-body div:nth-child(2){ border-right: none; }
}

/* ---------------- Footer ---------------- */

.site-footer{
  border-top: 1px solid var(--line);
  margin-top: 8rem;
  padding: 3.2rem 0 2.4rem;
}
@media (max-width: 640px){
  .site-footer{ margin-top: 5rem; }
  .site-footer .wrap{ flex-direction: column; align-items: flex-start; }
}
.site-footer .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-name{
  font-family: var(--display);
  font-size: 1.05rem;
}
.footer-meta{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
  letter-spacing: 0.05em;
}
.footer-social{
  display: flex;
  gap: 1.4rem;
  font-size: 0.85rem;
}
.footer-social a{ color: var(--grey); transition: color 0.2s ease; }
.footer-social a:hover{ color: var(--amber); }

/* ---------------- Countdown leader (home only) ---------------- */

.leader{
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.leader.hide{
  opacity: 0;
  pointer-events: none;
}
.leader-circle{
  width: clamp(110px, 28vw, 160px);
  height: clamp(110px, 28vw, 160px);
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.leader-circle::before,
.leader-circle::after{
  content:"";
  position: absolute;
  background: var(--line);
}
.leader-circle::before{ width: 1px; height: 100%; }
.leader-circle::after{ width: 100%; height: 1px; }
.leader-number{
  font-family: var(--display);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  color: var(--amber);
}
body.no-js .leader{ display: none; }

/* ---------------- Hero ---------------- */

.hero{
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (max-width: 640px){
  .hero{ min-height: auto; padding-top: 3rem; padding-bottom: 2.5rem; }
}

.hero-eyebrow{
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}

.hero h1{
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.98;
  color: var(--ivory);
}
.hero h1 em{
  font-style: italic;
  color: var(--amber);
}

.hero-sub{
  max-width: 34ch;
  margin-top: 1.8rem;
  font-size: 1.15rem;
  color: var(--grey);
  font-weight: 300;
}

.hero-actions{
  margin-top: 2.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 480px){
  .hero-actions{ flex-direction: column; }
  .hero-actions .btn{ width: 100%; justify-content: center; }
}

/* ---------------- Filmstrip (featured work) ---------------- */

.filmstrip-section{ margin-top: 7rem; }
@media (max-width: 640px){ .filmstrip-section{ margin-top: 4.5rem; } }

.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-head h2{
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.section-head p{
  color: var(--grey);
  max-width: 40ch;
  font-size: 0.95rem;
}

.filmstrip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 800px){
  .filmstrip{ grid-template-columns: 1fr; }
}
@media (max-width: 480px){
  .frame{ aspect-ratio: 16/10; }
}

.frame{
  background: var(--surface);
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.6rem;
  border-top: 10px solid var(--black);
  border-bottom: 10px solid var(--black);
}
.frame::before,
.frame::after{
  content:"";
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  background-image: radial-gradient(circle, var(--black) 3px, transparent 3.5px);
  background-size: 20px 10px;
  background-repeat: repeat-x;
}
.frame::before{ top: -10px; }
.frame::after{ bottom: -10px; }

.frame-glow{
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 100%, rgba(70,0,120,0.32), transparent 60%),
              linear-gradient(160deg, var(--surface-2), var(--surface));
  z-index: 0;
}

.frame-content{ position: relative; z-index: 1; }
.frame-num{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  margin-bottom: 0.6rem;
}
.frame h3{
  font-size: 1.4rem;
  color: var(--ivory);
}
.frame-role{
  font-size: 0.82rem;
  color: var(--grey);
  margin-top: 0.4rem;
}

/* ---------------- Intro / about-teaser ---------------- */

.split{
  margin-top: 8rem;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 800px){
  .split{ grid-template-columns: 1fr; gap: 2.4rem; }
}
@media (max-width: 640px){
  .split{ margin-top: 5rem; }
}
.split h2{ font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.08; }
.split .body-text{ color: var(--grey); font-size: 1.02rem; max-width: 56ch; }
.split .body-text + .body-text{ margin-top: 1.2rem; }

.skills-list{
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skills-list span{
  border: 1px solid var(--line);
  padding: 0.5em 1em;
  font-size: 0.82rem;
  color: var(--grey);
}

/* ---------------- CTA band ---------------- */

.cta-band{
  margin-top: 8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0;
  text-align: center;
}
@media (max-width: 640px){
  .cta-band{ margin-top: 5rem; padding: 3.2rem 0; }
}
.cta-band h2{
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 18ch;
  margin: 0 auto 2rem;
}

/* ---------------- Page hero (interior pages) ---------------- */

.page-hero{
  padding: 6rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-eyebrow{ margin-bottom: 1.2rem; }
.page-hero h1{ font-size: clamp(2.6rem, 6vw, 4.6rem); }
.page-hero p{
  margin-top: 1.4rem;
  color: var(--grey);
  max-width: 52ch;
  font-size: 1.05rem;
}

/* ---------------- Portfolio grid ---------------- */

.filters{
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 3rem 0 2.5rem;
}
.filter-btn{
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--grey);
  background: none;
  border: 1px solid var(--line);
  padding: 0.7em 1.2em;
  min-height: 44px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover{ color: var(--ivory); border-color: var(--grey); }
.filter-btn.active{
  color: var(--black);
  background: var(--amber);
  border-color: var(--amber);
}

.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  padding-bottom: 6rem;
}
@media (max-width: 900px){ .grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .grid{ grid-template-columns: 1fr; } }

.card{
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.card:hover{ border-color: var(--amber-dim); }

.card-thumb{
  aspect-ratio: 16/10;
  position: relative;
  background: linear-gradient(150deg, var(--surface-2), var(--black));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-thumb .thumb-label{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber-dim);
  letter-spacing: 0.06em;
}
.play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: rgba(10,9,8,0.35);
}
.card:hover .play{ opacity: 1; }
.play span{
  width: 52px; height: 52px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--amber);
  font-size: 0.8rem;
}

.card-info{ padding: 1.3rem 1.4rem 1.5rem; }
.card-info h3{ font-size: 1.15rem; color: var(--ivory); }
.card-meta{
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--grey);
  font-family: var(--mono);
}

/* ---------------- About page ---------------- */

.about-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  padding: 4rem 0 6rem;
}
@media (max-width: 800px){ .about-grid{ grid-template-columns: 1fr; gap: 2.5rem; } }

.about-portrait{
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--surface-2), var(--black) 70%);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 1.6rem;
  position: relative;
}
.about-portrait span{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--grey);
}

.timeline{ margin-top: 2.5rem; }
.timeline-row{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.4rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child{ border-bottom: 1px solid var(--line); }
.timeline-row .year{
  font-family: var(--mono);
  color: var(--amber);
  font-size: 0.85rem;
}
.timeline-row h4{ font-size: 1.05rem; color: var(--ivory); font-weight: 400; font-family: var(--sans); }
.timeline-row p{ font-size: 0.88rem; color: var(--grey); margin-top: 0.3rem; }

/* ---------------- Contact page ---------------- */

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4.5rem;
  padding: 4rem 0 7rem;
}
@media (max-width: 850px){ .contact-grid{ grid-template-columns: 1fr; gap: 3rem; } }

.contact-info h2{ font-size: 1.6rem; margin-bottom: 1.4rem; }
.contact-line{
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.contact-line:last-child{ border-bottom: 1px solid var(--line); }
.contact-line span{
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--amber);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}
.contact-line a, .contact-line p{ font-size: 1rem; color: var(--ivory); }

.field{ margin-bottom: 1.6rem; }
.field label{
  display: block;
  font-size: 0.82rem;
  color: var(--grey);
  margin-bottom: 0.6rem;
}
.field input,
.field textarea{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  padding: 0.9em 1em;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--amber);
}
.field textarea{ resize: vertical; min-height: 140px; }

.row-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 520px){ .row-2{ grid-template-columns: 1fr; } }

.form-note{
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--grey);
}
.form-status{
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--amber);
  display: none;
}
.form-status.show{ display: block; }

:focus-visible{
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
