@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #faf7f2;
  --ink: #242424;
  --muted: #454951;
  --gutter: clamp(2.5rem, 6.5vw, 8rem);
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/*
 * The portrait is decorative on desktop and becomes a normal-flow image on
 * mobile. Keeping the copy in document flow also accommodates short screens
 * and browser text enlargement without clipping the Telegram action.
 */
.landing {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
}

.site-header {
  padding: 3.3rem var(--gutter) 1.5rem;
}

.wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.75rem, 4.4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.portrait {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 77% center;
}

.hero {
  display: flex;
  align-items: center;
  padding: 3rem var(--gutter) 4rem;
}

.hero-copy {
  width: 49%;
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 1.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4rem, 8.4vw, 8.7rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.description {
  max-width: 29rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  text-wrap: balance;
}

.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 3.4rem;
  margin-top: 2rem;
  padding: 0.9rem 1.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.telegram-button svg {
  flex: 0 0 auto;
}

.telegram-button:hover {
  border-color: #444;
  background: #444;
}

.telegram-button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 5px;
}

.site-footer {
  padding: 1.5rem var(--gutter) 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.035em;
  line-height: 1.5;
}

.error-page {
  min-height: 100svh;
  padding: clamp(2rem, 8vw, 8rem);
}

.error-page main {
  max-width: 42rem;
  margin-top: 6rem;
}

.error-page h1 {
  font-size: clamp(3rem, 7vw, 6rem);
}

@media (min-width: 768px) and (min-aspect-ratio: 2/1) {
  .portrait img {
    object-fit: contain;
    object-position: right bottom;
  }
}

/*
 * A landscape photo would be enlarged and heavily cropped on a portrait tablet.
 * Fit the complete image beside the copy and fade its horizontal edges instead.
 */
@media (min-width: 768px) and (max-aspect-ratio: 1/1) {
  .portrait {
    mask-image: linear-gradient(transparent 28%, #000 35%, #000 60%, transparent 74%);
  }

  .portrait img {
    object-fit: contain;
    object-position: right center;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 1.5rem;
  }

  .landing {
    grid-template-rows: auto auto 1fr auto;
  }

  .site-header {
    padding: 1.65rem var(--gutter) 1rem;
  }

  .wordmark {
    font-size: clamp(2.25rem, 10.5vw, 2.75rem);
  }

  .portrait {
    position: relative;
    z-index: 0;
    height: clamp(14rem, 40svh, 23rem);
    mask-image: linear-gradient(transparent, #000 5%, #000 72%, transparent);
  }

  .portrait img {
    object-position: center top;
  }

  .hero {
    align-items: flex-start;
    padding: 0.8rem var(--gutter) 0;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
  }

  .eyebrow {
    margin-bottom: 1.15rem;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 6rem);
    letter-spacing: -0.05em;
    line-height: 1.04;
  }

  .description {
    max-width: 26rem;
    margin-top: 1.25rem;
    font-size: 1rem;
    line-height: 1.55;
  }

  .telegram-button {
    width: 100%;
    margin-top: 1.5rem;
    padding-inline: 1rem;
  }

  .site-footer {
    padding: 2.1rem var(--gutter) 1.5rem;
    font-size: 0.8rem;
  }
}
