/* -------------------------
   FONTS
-------------------------- */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* -------------------------
   VARIABLES
-------------------------- */

:root {
  --bg: #0c0d0e;
  --surface: #121315;

  --text: #f3f3f1;
  --muted: #929398;
  --line: #292a2d;

  --accent-1: #a66cff;
  --accent-2: #f05ea8;
  --accent-3: #ff9c64;

  --max-width: 1380px;
  --padding: clamp(20px, 4vw, 64px);
}


/* -------------------------
   BASE
-------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);
  color: var(--text);

  font-family: "Geist Mono", monospace;
  font-size: 15px;
  line-height: 1.65;

  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(
    calc(100% - (var(--padding) * 2)),
    var(--max-width)
  );

  margin-inline: auto;
}


/* -------------------------
   HEADER
-------------------------- */

.header {
  height: 100px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  font-family: "Geist", sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

.logo span,
.footer strong span {
  color: var(--accent-1);
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  color: var(--muted);
  transition: color .2s ease;
}

.nav a:hover {
  color: var(--text);
}

.availability {
  position: relative;
  justify-self: end;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 16px;

  border: 1px solid var(--line);
  border-radius: 100px;

  color: var(--muted);

  transition:
    color .3s ease,
    border-color .3s ease,
    background-color .3s ease,
    transform .3s cubic-bezier(.22, 1, .36, 1);
}

.status-dot {
  width: 7px;
  height: 7px;

  background: #9cff57;
  border-radius: 50%;

  box-shadow: 0 0 0 0 rgba(156, 255, 87, 0);

  transition:
    transform .3s cubic-bezier(.22, 1, .36, 1),
    box-shadow .3s ease;
}

.availability:hover {
  color: var(--text);
  border-color: #4a4b50;
  background: rgba(255, 255, 255, .025);
  transform: translateY(-2px);
}

.availability:hover .status-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(156, 255, 87, .08);
}

/* -------------------------
   HERO
-------------------------- */

.hero {
  padding-top: clamp(96px, 10vw, 150px);
  padding-bottom: clamp(120px, 16vw, 180px);
}

.eyebrow,
.expertise-label,
.section-number {
  color: var(--muted);

  text-transform: uppercase;
  letter-spacing: .16em;

  font-size: 11px;
}

.hero-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.7fr)
    minmax(260px, .65fr);

  gap: clamp(50px, 8vw, 140px);

  align-items: end;

  margin-top: 30px;
}


/* TITLES */

h1,
h2,
h3 {
  margin: 0;

  font-family: "Geist", sans-serif;

  line-height: .78;
}

h1 {
  max-width: 950px;

  font-size: clamp(58px, 7.6vw, 120px);

  font-weight: 900;

  letter-spacing: -.055em;
}


/* HERO TITLE */

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line > span {
  display: block;
}


/* Première ligne blanche */

.hero-line > span:not(.gradient-text) {
  color: var(--text);

  background: none;

  -webkit-text-fill-color: var(--text);
}


/* Deuxième ligne gradient */

.gradient-text {
  background: linear-gradient(
    90deg,
    var(--accent-1),
    var(--accent-2),
    var(--accent-3)
  );

  color: transparent;

  background-clip: text;
  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;
}


/* HERO INTRO */

.hero-intro {
  padding-left: 30px;

  border-left: 1px solid var(--line);
}

.hero-intro p {
  margin: 0 0 35px;

  color: #c1c1c4;
}

.text-link {
  display: inline-block;

  padding-bottom: 4px;

  border-bottom: 1px solid currentColor;
}


/* -------------------------
   SECTIONS
-------------------------- */

.section {
  padding: 80px 0 140px;

  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;

  grid-template-columns: 90px 1fr;

  align-items: baseline;

  margin-bottom: 70px;
}

.section-heading > span {
  color: var(--muted);
}

.section-heading h2,
.contact h2 {
  font-size: clamp(38px, 4vw, 64px);

  letter-spacing: -.04em;
}


/* -------------------------
   ABOUT
-------------------------- */

.about-grid {
  display: grid;

  grid-template-columns:
    90px
    1.1fr
    .8fr;

  gap: 60px;
}

.about-copy {
  grid-column: 2;

  max-width: 680px;
}

.about-copy p {
  margin-top: 0;
  margin-bottom: 30px;

  font-size: clamp(16px, 1.4vw, 19px);
}

.expertise {
  padding-left: 50px;

  border-left: 1px solid var(--line);
}

.expertise-label {
  display: inline-block;
}

.expertise ul {
  margin: 0;

  padding: 20px 0 0;

  list-style: none;
}

.expertise li {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 15px 0;

  border-bottom: 1px solid var(--line);
}

.expertise small {
  color: var(--muted);
}


/* -------------------------
   PROJECTS
-------------------------- */

.projects-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: clamp(25px, 4vw, 60px);
}

.project-image {
  overflow: hidden;

  aspect-ratio: 16 / 9;

  background: var(--surface);
}

.project-image img {
  height: 100%;

  object-fit: cover;

  transition:
    transform .5s cubic-bezier(.2, .7, .2, 1);
}

.project:hover img {
  transform: scale(1.025);
}

.project-info {
  display: flex;

  justify-content: space-between;

  padding-top: 18px;
}

.project h3 {
  font-size: 20px;

  line-height: 1.2;
}

.project p {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 13px;
}

.project-number {
  color: var(--muted);
}


/* -------------------------
   CONTACT
-------------------------- */

.contact {
  padding-top: 80px;
  padding-bottom: 80px;

  border-top: 1px solid var(--line);
}

.contact-content {
  margin-left: 90px;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
}

.contact-content p {
  margin: 0;
  max-width: 430px;
  color: var(--muted);
}

.button {
  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  white-space: nowrap;

  padding: 14px 25px;

  background: var(--text);
  color: var(--bg);

  border-radius: 100px;

  font-weight: 500;

  transition:
    transform .35s cubic-bezier(.22, 1, .36, 1),
    box-shadow .35s ease;
}

.button::before {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    var(--accent-1),
    var(--accent-2),
    var(--accent-3)
  );

  opacity: 0;

  transition: opacity .35s ease;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(240, 94, 168, .15);
}

.button:hover::before {
  opacity: 1;
}

.button span {
  position: relative;
  z-index: 1;
}

/* -------------------------
   FOOTER
-------------------------- */

.footer {
  min-height: 130px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  border-top: 1px solid var(--line);
}

.footer > div {
  display: flex;
  flex-direction: column;
}

.footer strong {
  font-family: "Geist", sans-serif;

  text-transform: uppercase;
}

.footer small,
.footer p {
  color: var(--muted);
}


/* -------------------------
   INTRO ANIMATIONS
-------------------------- */

/* Header */

.js .header {
  opacity: 0;

  transform: translateY(-16px);

  animation:
    header-in .7s cubic-bezier(.22, 1, .36, 1)
    .05s forwards;
}


/* Hero title */

.js .hero-line > span {
  opacity: 0;

  transform: translateY(110%);
}

.js.loaded .hero-line:nth-child(1) > span {
  animation:
    hero-line-in
    .85s
    cubic-bezier(.22, 1, .36, 1)
    .25s
    forwards;
}

.js.loaded .hero-line:nth-child(2) > span {
  animation:
    hero-line-in
    .85s
    cubic-bezier(.22, 1, .36, 1)
    .40s
    forwards;
}


/* Hero right block */

.js .hero-intro {
  opacity: 0;

  transform: translateY(18px);

  animation:
    hero-intro-in
    .8s
    cubic-bezier(.22, 1, .36, 1)
    .75s
    forwards;
}


/* -------------------------
   SCROLL REVEAL
-------------------------- */

/*
   Important :
   on cache uniquement les reveal-item.
   reveal-section sert uniquement au JS
   pour savoir quelle séquence déclencher.
*/

.js .reveal-item {
  opacity: 0;

  transform: translateY(22px);

  transition:
    opacity .65s ease,
    transform .65s cubic-bezier(.22, 1, .36, 1);
}

.js .reveal-item.is-visible {
  opacity: 1;

  transform: translateY(0);
}


/* -------------------------
   KEYFRAMES
-------------------------- */

@keyframes header-in {
  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes hero-line-in {
  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes hero-intro-in {
  to {
    opacity: 1;

    transform: translateY(0);
  }
}


/* -------------------------
   MOBILE
-------------------------- */

@media (max-width: 800px) {

  .header {
    height: 80px;

    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .availability {
    font-size: 12px;
  }


  /* HERO */

  .hero {
    padding-top: 100px;
    padding-bottom: 120px;
  }

  .hero-grid {
    grid-template-columns: 1fr;

    gap: 50px;
  }

  h1 {
    font-size: clamp(52px, 14vw, 78px);
  }

  .hero-intro {
    max-width: 500px;

    padding-left: 0;

    border-left: 0;
  }


  /* SECTIONS */

  .section {
    padding: 60px 0 100px;
  }

  .section-heading {
    grid-template-columns: 50px 1fr;

    margin-bottom: 50px;
  }


  /* ABOUT */

  .about-grid {
    grid-template-columns: 1fr;

    gap: 50px;
  }

  .about-copy {
    grid-column: auto;
  }

  .expertise {
    padding-left: 0;

    border-left: 0;
  }


  /* PROJECTS */

  .projects-grid {
    grid-template-columns: 1fr;

    gap: 60px;
  }


  /* CONTACT */

  .contact {
    grid-template-columns: 1fr;

    gap: 40px;
  }

  .contact-content {
    align-items: flex-start;

    flex-direction: column;

    gap: 20px;
  }


  /* FOOTER */

  .footer {
    padding: 35px 0;

    align-items: flex-start;

    flex-direction: column;

    gap: 25px;
  }
}


/* -------------------------
   ACCESSIBILITY
-------------------------- */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .js .header,
  .js .hero-line > span,
  .js .hero-intro,
  .js .reveal-item {
    opacity: 1;

    transform: none;

    animation: none;

    transition: none;
  }
}