﻿/* Accueil : photographie et projets, sans décor animé. */
.home-page {
  --home-space: clamp(56px, 6vw, 88px);
}

.home-page .site-header {
  position: absolute;
  inset: 0 0 auto;
  color: var(--white);
  background: transparent;
}

.hero {
  --hero-fade: linear-gradient(
    to bottom,
    #000 55%,
    rgb(0 0 0 / 88%) 70%,
    rgb(0 0 0 / 40%) 86%,
    transparent 100%
  );
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  grid-template-rows: 0.9fr auto 1.1fr;
  min-height: 100svh;
  gap: clamp(16px, 3svh, 32px);
  margin: 0;
  padding: calc(var(--header-height) + 16px) var(--gutter);
  overflow: hidden;
  color: var(--scene-ink);
  background: transparent;
}

.hero-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 57%;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to bottom, rgb(0 0 0 / 24%) 20%, rgb(0 0 0 / 42%) 50%, rgb(0 0 0 / 24%) 80%);
  pointer-events: none;
}

.hero-photo,
.hero::before {
  -webkit-mask-image: var(--hero-fade);
  -webkit-mask-repeat: no-repeat;
  mask-image: var(--hero-fade);
  mask-repeat: no-repeat;
}

/* La photographie horizontale reste entière dans les fenêtres hautes. */
@media (max-aspect-ratio: 4/3) {
  .hero {
    --hero-fade: linear-gradient(
      to bottom,
      transparent,
      #000 12%,
      #000 55%,
      rgb(0 0 0 / 88%) 70%,
      rgb(0 0 0 / 40%) 86%,
      transparent 100%
    );
  }

  .hero-photo {
    inset: auto 0;
    top: 50%;
    height: auto;
    transform: translateY(-50%);
    object-fit: contain;
    object-position: center;
  }
}

.hero h1 {
  grid-row: 2;
  margin: 0;
  font-family: var(--display-font);
  font-size: 6.8cqw;
  font-weight: 800;
  font-variant-ligatures: none;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-align: center;
  text-transform: uppercase;
}

.hero-title-text {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.2em;
  width: 100%;
}

.hero-title-text > span {
  min-width: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title-text > span {
    animation: hero-title-appear 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-title-text > span:nth-child(2) {
    animation-delay: 80ms;
  }
}

@keyframes hero-title-appear {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-bottom {
  grid-row: 3;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
}

.hero h2 {
  max-width: 24ch;
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.125rem, calc(1.2vw + 0.5625rem), 1.75rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero-location {
  margin: 0 0 4px;
  text-align: right;
  font-family: var(--display-font);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 350;
  line-height: 1.5;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.home-section {
  width: min(100%, var(--width));
  margin-inline: auto;
  padding: var(--home-space) var(--gutter);
}

.home-section h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(24px, 2.7vw, 36px);
  font-weight: 350;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.home-introduction {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.home-introduction h2 {
  margin-bottom: 28px;
}
.home-introduction p {
  max-width: 54ch;
  margin: 0 0 20px;
  color: var(--muted);
}
.home-introduction .intro-lead {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.7;
}
.portrait-frame {
  height: clamp(360px, 44vw, 540px);
}
.portrait-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}
.portrait-image {
  --portrait-fade:
    linear-gradient(
      to bottom,
      #000 68%,
      rgb(0 0 0 / 88%) 82%,
      rgb(0 0 0 / 38%) 93%,
      transparent 100%
    ),
    linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  -webkit-mask-image: var(--portrait-fade);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-image: var(--portrait-fade);
  mask-repeat: no-repeat;
  mask-composite: intersect;
}

.selected-work {
  display: grid;
  gap: 36px;
}
.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.work-project,
.work-copy {
  min-width: 0;
}
.work-project-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.work-visual {
  width: 100%;
  aspect-ratio: 1.44;
  overflow: hidden;
  background: var(--surface);
}
.work-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-copy {
  padding-top: 22px;
}
.work-copy h3 {
  margin: 0 0 14px;
  font-family: var(--display-font);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 1.4;
}
.work-copy p {
  max-width: 48ch;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.work-action {
  color: #090909;
  padding: 0.7em 1.7em;
  font-size: 18px;
  border-radius: 0.5em;
  background: #e8e8e8;
  cursor: pointer;
  border: 1px solid #e8e8e8;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
  box-shadow: 6px 6px 12px rgb(0 0 0 / 28%), -6px -6px 12px rgb(255 255 255 / 8%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  line-height: 1.4;
}

.work-project-link:active .work-action {
  color: #666;
  box-shadow: inset 4px 4px 12px #c5c5c5, inset -4px -4px 12px #ffffff;
}

.work-project-link:is(:hover, :focus-visible) .work-action {
  border-color: #fff;
}
.work-project-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 8px;
}
.work-more {
  justify-self: start;
}
.home-page .site-footer {
  border-top: 1px solid var(--line);
  background: transparent;
}

@media (max-width: 1000px) {
  .hero h1 {
    font-size: 13.2cqw;
  }
  .hero-title-text {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-block: max(24px, env(safe-area-inset-bottom));
  }
  .hero-bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .hero-location {
    text-align: left;
  }
  .home-page .site-header:not(.has-menu) {
    position: relative;
    inset: auto;
    background: var(--ambient-base, var(--scene-night));
  }
  .home-page:has(.site-header:not(.has-menu)) .hero {
    padding-block: 28px;
  }
  .home-introduction {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .portrait-frame {
    height: clamp(340px, 92vw, 500px);
  }
  .work-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-height: 580px) and (min-width: 761px) {
  .hero {
    gap: 16px;
    padding-block: 32px;
  }
  .hero h1 {
    font-size: 6.8cqw;
  }
  .hero-title-text {
    flex-direction: row;
    gap: 0.2em;
  }
}

@media (max-height: 580px) and (max-width: 760px) and (orientation: landscape) {
  .hero {
    gap: 16px;
    padding-block: 32px;
  }
  .hero h1 {
    font-size: 6.8cqw;
  }
  .hero-title-text {
    flex-direction: row;
    gap: 0.2em;
  }
  .hero-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 24px;
  }
  .hero h2 {
    font-size: 1rem;
  }
  .hero-location {
    text-align: right;
  }
}
