:root {
  --color-ink: #1c2420;
  --color-ink-muted: #5c665f;
  --color-bg: #f4f0e8;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Jost", sans-serif;
}

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

html,
body {
  min-height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.background__image {
  position: absolute;
  inset: 0;
  background-color: var(--color-bg);
  background-image: url("assets/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.background__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 75% at 50% 50%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.45) 100%),
    linear-gradient(to bottom, rgba(244, 240, 232, 0.1) 0%, rgba(244, 240, 232, 0.35) 100%);
}

.background__grain {
  display: none;
}


.quote-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 44rem);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0 auto;
  font-size: clamp(0.92rem, 2.5vw, 1.15rem);
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  text-align: center;
  opacity: 0;
  animation: fadeIn 600ms ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-text {
  max-width: min(28ch, 88vw);
  font-family: var(--font-display);
  font-size: 2.55em;
  font-weight: 500;
  font-style: italic;
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.5);
}

.quote-author {
  margin-top: clamp(1.25rem, 4vw, 2rem);
  font-family: var(--font-body);
  font-size: 0.92em;
  font-weight: 300;
  letter-spacing: clamp(0.12em, 0.35vw, 0.22em);
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.quote-author::before {
  content: "\2014\00A0";
}

@media (max-width: 390px) {
  .quote-stage {
    font-size: 0.9rem;
    padding:
      max(0.9rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(0.9rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  .quote-text {
    font-size: 2.35em;
    line-height: 1.28;
  }

  .quote-author {
    margin-top: 1rem;
  }
}

@media (min-width: 768px) {
  .quote-stage {
    width: min(100%, 48rem);
    font-size: 1.2rem;
  }

  .quote-text {
    max-width: min(34ch, 78vw);
    font-size: 2.85em;
  }

  .quote-author {
    font-size: 1em;
  }
}

@media (min-width: 1024px) {
  .quote-stage {
    width: min(100%, 56rem);
    font-size: 1.35rem;
  }

  .quote-text {
    max-width: min(36ch, 72vw);
    font-size: 3.1em;
  }
}

@media (min-width: 1400px) {
  .quote-stage {
    width: min(100%, 64rem);
    font-size: 1.5rem;
  }

  .quote-text {
    max-width: 38ch;
    font-size: 3.35em;
  }

  .quote-author {
    font-size: 1.05em;
  }
}
