/* Noir Union. Colour and type come from brand/README.md. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --noir: #1a1918;
  --graphite: #2b2927;
  --burgundy: #5a1524;
  --ivory: #f2ece1;
  --bone: #c9bfae;
  --ivory-soft: #d9d0c0;
  --muted: #b5ada1;
  --rule: #4a4641;
  --serif: "Bodoni Moda", Didot, "Bodoni MT", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(24px, 4vw, 56px);
}

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

html {
  background: var(--noir);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--noir);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p,
h1 {
  margin: 0;
}

a {
  color: var(--ivory);
}
a:hover {
  color: var(--ivory-soft);
}
a:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 4px;
}

::selection {
  background: var(--burgundy);
  color: var(--ivory);
}

/* Layout: one screen. Text panel on the left, two staggered images on the right. */

.page {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden; /* the entrance offsets must not add scroll height */
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "top gallery"
    "hero gallery"
    "base gallery";
}

.top {
  grid-area: top;
  padding: 44px var(--pad) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}

.logo {
  display: block;
  line-height: 0;
}
.logo svg {
  display: block;
  height: 23px;
  width: auto;
  fill: currentColor;
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  grid-area: hero;
  align-self: center;
  padding: 72px var(--pad);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.3vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
h1,
.promise {
  text-wrap: balance;
}
h1 span,
h1 em {
  display: block;
}

.lede {
  max-width: 26em;
  font-size: 19px;
  color: var(--ivory-soft);
}

.base {
  grid-area: base;
  padding: 0 var(--pad) 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.base-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.base-row > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promise {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.fine {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.gallery {
  grid-area: gallery;
  padding: 56px var(--pad) 56px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.gallery figure {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  background: var(--graphite);
}
.gallery figure:first-child {
  margin-bottom: 96px;
}
.gallery figure:last-child {
  margin-top: 96px;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Narrow screens: text, then images, then contact. */

@media (max-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "top"
      "hero"
      "gallery"
      "base";
  }
  .top {
    padding-top: 28px;
  }
  .hero {
    padding-top: 64px;
    padding-bottom: 48px;
  }
  .gallery {
    padding: 0 var(--pad) 56px;
    gap: 16px;
  }
  .gallery figure:first-child {
    margin-bottom: 48px;
  }
  .gallery figure:last-child {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .label {
    font-size: 11px;
    letter-spacing: 0.18em;
  }
  .promise {
    font-size: 20px;
  }
}

/* Entrance. The opening animation itself is inlined in index.html (source:
   scripts/intro.css) so it can paint before this file arrives. It sets --intro,
   the moment the page content should start to appear; without it, content
   appears straight away. */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* index.html hides the page until this stylesheet has loaded. */
.page {
  visibility: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .top,
  .hero,
  .base,
  .gallery figure {
    animation: rise 1000ms var(--ease-out) var(--intro, 0ms) both;
  }
  .hero {
    animation-delay: calc(var(--intro, 0ms) + 120ms);
  }
  .gallery figure:first-child {
    animation-delay: calc(var(--intro, 0ms) + 240ms);
  }
  .gallery figure:last-child {
    animation-delay: calc(var(--intro, 0ms) + 360ms);
  }
  .base {
    animation-delay: calc(var(--intro, 0ms) + 480ms);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 404 */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  padding: 44px var(--pad) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 72px;
}
.lost .hero {
  padding: 0;
  align-self: flex-start;
}
