/* ==========================================================================
   Luce a Due
   Plain CSS, no frameworks. Sections follow the order of the pages.
   ========================================================================== */

/* Fonts (self-hosted, no third-party requests) ----------------------------- */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Tokens ------------------------------------------------------------------- */
:root {
  --black: #000;
  --ink: #111;
  --text: #2a2a2a;
  --muted: #8c8c8c;
  --white: #fff;
  --beige: #efe9e2;
  --footer-text: #d9d9d9;

  --container: 1228px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(96px, 12vw, 230px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Base --------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
p,
blockquote,
figure,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 600;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Header ------------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(20px, 3.4vw, 64px) clamp(20px, 8.6vw, 166px);
  color: var(--ink);
}

.site-header__link {
  justify-self: start;
  font-size: clamp(15px, 1.05vw, 20px);
  font-weight: 600;
  text-decoration: none;
  padding-block: 6px;
}

.site-header__link:hover,
.site-header__link[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.logo {
  display: block;
  color: inherit;
}

.logo svg {
  width: clamp(170px, 21vw, 402px);
  height: auto;
  fill: currentColor;
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #bfbfbf;
}

.hero img {
  width: 100%;
  aspect-ratio: 3840 / 1680;
  object-fit: cover;
}

/* Moments (quote + gallery) ------------------------------------------------ */
.moments {
  overflow: hidden;
  padding-block: clamp(96px, 12.2vw, 234px) clamp(96px, 11.2vw, 216px);
  background: var(--black);
  color: var(--white);
}

.moments__quote {
  max-width: 22em;
  margin-inline: auto;
  padding-inline: var(--gutter);
  font-size: clamp(24px, 2.1vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.gallery {
  margin-top: clamp(64px, 6.9vw, 132px);
}

.gallery__row {
  display: flex;
  justify-content: center;
}

.gallery__row + .gallery__row {
  margin-top: clamp(16px, 2.1vw, 40px);
}

.gallery__row--two {
  gap: 1.6vw;
}

/* Three images, wider than the screen: the outer two bleed off the edges. */
.gallery__row--three {
  gap: 3.4vw;
}

.gallery__item {
  flex: 0 0 34.95vw;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 1478 / 1016;
}

/* Introduction ------------------------------------------------------------- */
.intro {
  padding-block: var(--section-y) clamp(96px, 12.5vw, 240px);
}

.section-title {
  margin-bottom: clamp(48px, 5.5vw, 100px);
  font-size: clamp(32px, 2.6vw, 50px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: center;
}

.intro__layout {
  display: grid;
  grid-template-columns: minmax(0, 694fr) minmax(0, 465fr);
  gap: clamp(40px, 3.5vw, 68px);
  align-items: start;
}

.intro__text {
  font-size: 16px;
  font-weight: 300;
  line-height: 2.25;
  color: var(--text);
  text-align: justify;
  hyphens: auto;
}

.intro__text p + p {
  margin-top: 0.75em;
}

.intro__portrait img {
  width: 100%;
  aspect-ratio: 970 / 1035;
}

/* Full-width banner -------------------------------------------------------- */
.banner {
  overflow: hidden;
}

.banner img {
  width: 100%;
  aspect-ratio: 3840 / 1680;
  object-fit: cover;
}

/* Investment --------------------------------------------------------------- */
.investment {
  padding-block: var(--section-y) clamp(96px, 12.5vw, 240px);
  background: var(--beige);
  text-align: center;
}

.investment__text {
  max-width: 50em;
  margin-inline: auto;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.25;
  color: var(--text);
}

.button {
  display: inline-block;
  margin-top: clamp(48px, 4.3vw, 84px);
  padding: 18px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.button:hover {
  background: var(--ink);
  color: var(--beige);
}

/* FAQ page ----------------------------------------------------------------- */
.faq {
  padding-block: var(--section-y) clamp(96px, 12.5vw, 240px);
}

.faq__list {
  display: grid;
  gap: 24px;
}

.faq__item dt {
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
}

.faq__item dd {
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
}

.faq__item dd + dd {
  margin-top: 0;
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  padding-block: clamp(80px, 12vw, 230px) clamp(80px, 12.5vw, 240px);
  background: var(--black);
  color: var(--white);
  font-size: 15px;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.site-footer .logo svg {
  width: clamp(180px, 12vw, 229px);
}

.site-footer__copy {
  margin-top: 18px;
}

.site-footer__legal {
  margin-top: 12px;
  color: var(--muted);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  transition: opacity 0.3s var(--ease);
}

.socials a:hover,
.site-footer__email:hover {
  opacity: 0.65;
}

.socials svg {
  width: 28px;
  height: 28px;
}

.site-footer__email {
  font-size: clamp(18px, 1.15vw, 22px);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.3s var(--ease);
}

.languages {
  margin-top: clamp(56px, 4vw, 72px);
}

.languages__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Two rows of four, as in the design. */
.languages__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 24px;
  max-width: 830px;
  margin-top: 20px;
  color: var(--footer-text);
}

/* Darker at rest; light (and bold) for the language you're on,
   light on hover. */
.languages__list a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.3s var(--ease);
}

.languages__list a:hover,
.languages__list [aria-current="true"] {
  opacity: 1;
}

.languages__list [aria-current="true"] {
  font-weight: 600;
}

/* 404 ---------------------------------------------------------------------- */
/* The "404" artwork overlaps the bottom of the photo, as in the design:
   its top sits 20.4% of its own width above the photo's edge. */
.not-found {
  --art-width: min(1028px, 94vw);
  position: relative;
  padding-bottom: clamp(96px, 12.5vw, 245px);
  text-align: center;
}

.not-found__art {
  position: relative;
  z-index: 1;
  width: var(--art-width);
  height: auto;
  margin: calc(var(--art-width) * -0.2043) auto 0;
}

.not-found__title {
  margin-top: clamp(24px, 2.5vw, 48px);
  font-size: clamp(24px, 2.5vw, 48px);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.not-found__back {
  margin-top: clamp(56px, 7vw, 140px);
  font-size: clamp(20px, 1.6vw, 30px);
  font-weight: 300;
}

.not-found__back a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.5s var(--ease);
}

.not-found__back a:hover {
  background-size: 100% 1px;
}

/* Animations ---------------------------------------------------------------
   Only active when JavaScript runs (the .js class). Without it, everything
   is simply visible. Reduced-motion users get no movement at all.            */
.js .hero img,
.js .banner img {
  transform: scale(1.05);
  transition: transform 2.4s var(--ease);
}

.js.is-loaded .hero img,
.js .banner.is-visible img {
  transform: none;
}

.js .site-header {
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.3s;
}

.js.is-loaded .site-header {
  opacity: 1;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Gallery photos "develop": they start faded and warm up into full colour. */
.js .gallery__item img {
  filter: saturate(0.3) brightness(1.15);
  transition: filter 1.8s var(--ease) 0.2s;
}

.js .gallery__item.is-visible img {
  filter: none;
}

.js .delay-1 { transition-delay: 0.12s; }
.js .delay-2 { transition-delay: 0.24s; }
.js .delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .js .reveal,
  .js .site-header {
    opacity: 1;
    transform: none;
  }

  .js .hero img,
  .js .banner img,
  .js .gallery__item img {
    transform: none;
    filter: none;
  }
}

/* Tablet ------------------------------------------------------------------- */
@media (max-width: 960px) {
  .intro__layout {
    grid-template-columns: 1fr;
  }

  .intro__portrait {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .intro__text {
    max-width: 42em;
    margin-inline: auto;
    line-height: 1.9;
  }
}

/* Phone -------------------------------------------------------------------- */
@media (max-width: 700px) {
  .site-header {
    padding: 18px 20px;
  }

  /* Keep the hero tall enough to feel like a photo on a narrow screen. */
  .hero img {
    aspect-ratio: auto;
    height: 72vh;
    height: 72svh;
    min-height: 420px;
  }

  .banner img {
    aspect-ratio: 4 / 3;
  }

  .gallery__row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .gallery__row + .gallery__row {
    margin-top: 12px;
  }

  .gallery__item {
    flex: none;
    width: 92vw;
  }

  .intro__text,
  .investment__text {
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
    hyphens: manual;
  }

  .investment__text {
    text-align: center;
  }

  .site-footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__contact {
    align-items: flex-start;
  }

  .languages__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
