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

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/fonts/cormorant-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/fonts/cormorant-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/fonts/cormorant-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/fonts/cormorant-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
  overflow-x: clip;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  background-color: #080808;
  color: #c9c9c9;
  font-family: "Cormorant Garamond", serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.flame-filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vh, 4.5rem);
  width: 100%;
  max-width: 100%;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
}

.story {
  max-width: min(38rem, 100%);
  width: 100%;
}

.story p {
  margin: 0 0 1.6em;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.01em;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: break-word;
}

.story p:last-child {
  margin-bottom: 0;
}

.story-closing {
  font-style: italic;
  color: #a8a8a8;
}

.flames-stage {
  --stage-gap: clamp(1.25rem, 4vh, 2.5rem);
  --flame-size: clamp(40px, 7.5vw, 72px);
  --flame-gap: clamp(0.65rem, 3vw, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stage-gap);
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.flames,
.reveal-zone {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
  gap: var(--flame-gap);
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.reveal-zone {
  align-items: center;
  min-height: clamp(48px, 8vh, 72px);
}

.reveal-slot {
  position: relative;
  width: var(--flame-size);
  min-height: clamp(48px, 8vh, 72px);
  flex: 0 0 auto;
  overflow: visible;
}

.reveal-spacer {
  width: var(--flame-size);
  flex: 0 0 auto;
}

.flame-slot {
  position: relative;
  width: var(--flame-size);
  height: clamp(72px, 12vw, 130px);
  flex: 0 0 auto;
}

.flame-slot--reveal {
  overflow: visible;
}

.flame-traveler {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition:
    transform 1.6s cubic-bezier(0.45, 0, 0.2, 1),
    opacity 0.45s ease;
}

.flame-slot--reveal.is-descending .flame-traveler {
  transform: translateY(var(--flame-travel, 8rem));
}

.flame-slot--reveal.is-extinguished .flame-traveler {
  opacity: 0;
  pointer-events: none;
}

.flame-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: url("#flame");
}

.logo-reveal {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 150px;
  max-width: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  text-decoration: none;
  line-height: 0;
  z-index: 1;
}

.logo-reveal img {
  display: block;
  width: 100%;
  height: auto;
}

.reveal-zone.is-revealed .logo-reveal {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
}

@media (max-width: 768px) {
  .landing {
    gap: clamp(1.75rem, 5vh, 3rem);
    padding-inline: max(1rem, env(safe-area-inset-left))
      max(1rem, env(safe-area-inset-right));
  }

  .story p {
    font-size: 1.25rem;
    line-height: 1.68;
  }

  .logo-reveal {
    width: 140px;
  }

  .reveal-slot,
  .reveal-spacer {
    min-height: clamp(44px, 7vh, 64px);
  }
}

@media (max-width: 540px) {
  .flames-stage {
    --flame-size: clamp(36px, 9vw, 48px);
    --flame-gap: clamp(0.5rem, 2.5vw, 0.85rem);
  }

  .story p {
    font-size: 1.125rem;
    line-height: 1.65;
    text-align: left;
    hyphens: manual;
  }

  .flame-slot,
  .flame-slot--reveal {
    height: clamp(64px, 16vw, 88px);
  }

  .logo-reveal {
    width: min(52vw, 175px);
  }

  .reveal-slot,
  .reveal-spacer {
    min-height: clamp(48px, 8vh, 68px);
  }
}

@media (max-width: 360px) {
  .flames-stage {
    --flame-size: 34px;
    --flame-gap: 0.4rem;
  }

  .story p {
    font-size: 1.05rem;
  }

  .flame-slot,
  .flame-slot--reveal {
    height: 60px;
  }

  .logo-reveal {
    width: min(58vw, 165px);
  }

  .reveal-slot,
  .reveal-spacer {
    min-height: 52px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .flames-stage {
    --flame-size: 40px;
  }

  .landing {
    justify-content: flex-start;
    gap: 1.25rem;
    padding-block: 1rem;
  }

  .story p {
    font-size: 1.05rem;
    margin-bottom: 1em;
  }

  .flame-slot,
  .flame-slot--reveal {
    height: 68px;
  }

  .logo-reveal {
    width: min(42vw, 150px);
  }
}
