:root {
  color-scheme: dark;
  --white: #f7f7f5;
  --soft: rgba(255,255,255,.78);
  --line: rgba(255,255,255,.35);
  --panel: rgba(18,18,18,.56);
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #171717;
  color: var(--white);
}

.end-page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 42px 24px;
}

.backdrop {
  position: absolute;
  inset: -3%;
  z-index: -3;
  background: url('/END/images/background.jpg') center center / cover no-repeat;
  filter: grayscale(.12) saturate(.72) brightness(.54);
  transform: scale(1.04);
}

.curtain {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.46)),
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.05), rgba(0,0,0,0) 42%),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.05) 0 2px,
      rgba(0,0,0,0) 2px 44px,
      rgba(255,255,255,.025) 44px 46px,
      rgba(0,0,0,0) 46px 88px
    ),
    linear-gradient(
      90deg,
      rgba(10,10,10,.82) 0%,
      rgba(34,34,34,.38) 8%,
      rgba(10,10,10,.82) 18%,
      rgba(34,34,34,.34) 28%,
      rgba(10,10,10,.82) 40%,
      rgba(34,34,34,.36) 52%,
      rgba(10,10,10,.82) 66%,
      rgba(34,34,34,.34) 80%,
      rgba(10,10,10,.82) 100%
    );
  opacity: .92;
  backdrop-filter: blur(1.2px);
  -webkit-backdrop-filter: blur(1.2px);
}

.end-card {
  width: min(760px, 100%);
  text-align: center;
  padding: clamp(30px, 5vw, 56px) clamp(24px, 6vw, 64px) 32px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 80px rgba(0,0,0,.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  display: block;
  width: clamp(190px, 38vw, 330px);
  height: auto;
  margin: -18px auto 4px;
}

.eyebrow {
  margin-top: -4px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .42em;
  padding-left: .42em;
  font-weight: 700;
  color: rgba(255,255,255,.80);
}

.rule {
  width: 54px;
  height: 1px;
  background: var(--line);
  margin: 22px auto 25px;
}

h1 {
  margin: 0 auto;
  max-width: 650px;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.17;
  font-weight: 400;
  letter-spacing: -.025em;
}


h1 span {
  display: block;
}

.thanks {
  max-width: 560px;
  margin: 24px auto 0;
  color: var(--soft);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

.follow {
  margin: 22px auto 0;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  font-weight: 700;
}

.social {
  width: fit-content;
  margin: 26px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.56);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.social img { width: 21px; height: 21px; object-fit: contain; }

.social:hover,
.social:focus-visible {
  background: #fff;
  color: #222;
  transform: translateY(-1px);
  outline: none;
}

.social:hover img,
.social:focus-visible img { filter: invert(1); }

.date {
  margin: 28px 0 0;
  font-size: 10px;
  letter-spacing: .25em;
  padding-left: .25em;
  color: rgba(255,255,255,.42);
}

@media (max-width: 600px) {
  .end-page {
    padding: 12px;
    align-items: center;
  }

  .end-card {
    width: min(92vw, 410px);
    padding: 21px 17px 21px;
    background: rgba(18,18,18,.52);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }

  .logo {
    width: min(225px, 68vw);
    margin: -8px auto 3px;
  }

  .eyebrow {
    margin-top: 2px;
    letter-spacing: .24em;
    padding-left: .24em;
    font-size: 9px;
  }

  .rule { margin: 16px auto 18px; }

  h1 {
    max-width: 330px;
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.2;
  }

  h1 span + span {
    margin-top: 4px;
    font-size: .78em;
  }

  .thanks {
    max-width: 320px;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.5;
  }

  .follow {
    margin-top: 17px;
    font-size: 15px;
    line-height: 1.45;
  }

  .social {
    max-width: 100%;
    margin-top: 20px;
    justify-content: center;
    padding: 12px 14px;
    font-size: 9px;
    letter-spacing: .06em;
  }

  .date { margin-top: 21px; }
}

@media (prefers-reduced-motion: no-preference) {
  .backdrop { animation: slowZoom 18s ease-out both; }
  .end-card { animation: appear .8s ease-out both; }
  .curtain { animation: curtainAppear .9s ease-out both; }
  @keyframes slowZoom { from { transform: scale(1.04); } to { transform: scale(1.09); } }
  @keyframes appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes curtainAppear { from { opacity: 0; } to { opacity: .92; } }
}
