@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sora";
  src: url("fonts/Sora-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --trp-red: #e43954;
  --violet: #b69aff;
  --white: #f9f5ff;
  font-family: "Sora", sans-serif;
  background: #07060a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #07060a;
  overscroll-behavior-y: none;
}

body { overflow-x: hidden; overflow-y: auto; }

button, a { font: inherit; }

.hero {
  position: relative;
  isolation: isolate;
  contain: paint;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  color: var(--white);
  background: #07060a;
}

.hero__art,
.hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__art {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translate(var(--art-shift-x, 0), var(--art-shift-y, 0)) scale(1.002);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 2, 8, .2) 0%, transparent 25%, transparent 57%, rgba(4, 2, 8, .18) 100%),
    radial-gradient(ellipse 38% 28% at 50% 67%, rgba(8, 5, 14, .24), rgba(8, 5, 14, .03) 74%);
}

.hero__atmosphere {
  z-index: -1;
  opacity: .42;
  background: radial-gradient(ellipse 30% 14% at 50% 66%, rgba(135, 82, 255, .19), transparent 72%);
  animation: breathe 7s ease-in-out infinite alternate;
}

.language {
  position: absolute;
  z-index: 3;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(24px + env(safe-area-inset-right));
  display: flex;
  align-items: center;
  width: 94px;
  height: 44px;
  padding: 3px;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(190, 168, 231, .2);
  color: rgba(255,255,255,.6);
  background: linear-gradient(180deg, rgba(31, 27, 37, .78), rgba(8, 7, 12, .82));
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  box-shadow: inset 0 1px rgba(255,255,255,.08), inset 0 -1px rgba(112,75,171,.24), 0 2px 5px rgba(0,0,0,.2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
}

.language::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 44px;
  border: 1px solid rgba(215, 199, 246, .16);
  background:
    linear-gradient(90deg, transparent, rgba(137, 91, 221, .14), transparent),
    linear-gradient(180deg, rgba(52, 44, 63, .84), rgba(16, 13, 21, .9));
  clip-path: polygon(7px 0, calc(100% - 5px) 0, 100% 6px, calc(100% - 5px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  box-shadow: inset 0 1px rgba(255,255,255,.1), inset 0 -1px rgba(125,82,190,.3);
  transition: transform .22s ease;
}

.language::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 11px;
  bottom: 11px;
  width: 1px;
  background: linear-gradient(transparent, rgba(210,196,232,.2), transparent);
}

.language[data-active-language="en"]::before { transform: translateX(44px); }

.language__option {
  position: relative;
  width: 50%;
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  color: rgba(255,255,255,.5);
  background: transparent;
  z-index: 1;
  cursor: pointer;
  transition: color .2s ease, text-shadow .2s ease;
}

.language__option:hover { color: #fff; }
.language__option[aria-pressed="true"] { color: #fff; }
.language__option[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 8px;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(228,57,84,.8);
}

.language__option:focus-visible {
  outline: 2px solid #d8caff;
  outline-offset: 4px;
}

.hero__content {
  position: absolute;
  z-index: 1;
  left: var(--content-left, 50%);
  top: var(--content-top, 50%);
  width: min(940px, calc(100% - 48px));
  margin: 0;
  text-align: center;
  transform: translate(var(--art-shift-x, 0), var(--art-shift-y, 0));
}

.localizing .hero__content,
.localizing .language {
  visibility: hidden;
}

.wordmark {
  width: clamp(220px, 17vw, 340px);
  margin: 0 auto clamp(8px, 1vh, 13px);
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(46px, 4.25vw, 72px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.025em;
  text-shadow: 0 2px 15px rgba(0,0,0,.95), 0 0 42px rgba(18,8,30,.95);
  isolation: isolate;
}

.headline__line {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  white-space: nowrap;
}
.headline__emphasis {
  position: relative;
  z-index: 1;
  color: var(--trp-red);
  text-shadow: 0 2px 15px rgba(0,0,0,.95), 0 0 18px rgba(228,57,84,.12);
}

.support {
  margin: 15px 0 0;
  color: rgba(249,245,255,.78);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 300;
  letter-spacing: .025em;
  text-shadow: 0 2px 10px #000;
}

.cta {
  --cta-natural-width: 190px;
  position: absolute;
  z-index: 2;
  left: var(--altar-left, 50%);
  top: var(--altar-top, 72%);
  display: block;
  width: var(--altar-width, 160px);
  aspect-ratio: 40 / 13;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  text-decoration: none;
  transform: translate(var(--art-shift-x, 0), var(--art-shift-y, 0));
  transition: none;
}

.cta::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 8% 7% 9%;
  pointer-events: none;
  opacity: 0;
  clip-path: polygon(8% 0, 92% 0, 100% 20%, 96% 84%, 90% 100%, 10% 100%, 4% 84%, 0 20%);
  box-shadow: inset 0 0 0 1px rgba(205,184,255,.82), inset 0 -2px rgba(229,52,82,.55), inset 0 0 12px rgba(128,76,220,.38);
}

.cta__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: filter 120ms ease;
}

.cta__image--idle { opacity: 1; }
.cta__image--pressed { opacity: 0; }
.cta:hover .cta__image { filter: brightness(1.025); }
.cta.is-pressed .cta__image--idle { opacity: 0; }
.cta.is-pressed .cta__image--pressed { opacity: 1; }
.cta:focus-visible {
  outline: none;
}
.cta:focus-visible::after { opacity: 1; }

@keyframes breathe {
  from { opacity: .28; transform: scale(.99); }
  to { opacity: .52; transform: scale(1.01); }
}

@media (max-width: 900px) and (min-height: 700px) {
  .hero__content {
    width: min(700px, calc(100% - 44px));
  }
  .wordmark { width: clamp(215px, 31vw, 270px); }
  h1 { font-size: clamp(45px, 7vw, 56px); }
}

@media (max-width: 600px) {
  .hero__art { object-position: center center; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(3,2,8,.15), transparent 24%, transparent 53%, rgba(4,2,8,.26) 100%),
      radial-gradient(ellipse 72% 27% at 50% 64%, rgba(8,5,14,.26), transparent 78%);
  }
  .language {
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    font-size: 12px;
  }
  .hero__content {
    width: calc(100% - 34px);
  }
  .wordmark { width: clamp(200px, 55vw, 226px); margin-bottom: 8px; }
  h1 { font-size: clamp(37px, 10.2vw, 44px); line-height: .98; }
  .support { width: min(350px, 100%); margin: 12px auto 0; font-size: 13px; line-height: 1.4; }
}

@media (max-width: 400px) and (max-height: 870px) {
  h1 { font-size: 38px; }
}

@media (max-width: 360px) {
  .hero__content { width: calc(100% - 28px); }
  .wordmark { width: clamp(180px, 55vw, 200px); }
  h1 { font-size: clamp(32px, 9.4vw, 34px); }
}

@media (max-width: 360px) and (max-height: 640px) {
  .wordmark { width: 180px; margin-bottom: 6px; }
  .support { margin-top: 8px; font-size: 12px; line-height: 1.3; }
}

@media (min-width: 600px) and (max-height: 560px) {
  .language {
    top: calc(6px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
    font-size: 12px;
  }
  .hero__content {
    width: min(620px, calc(100% - 80px));
  }
  .wordmark { width: clamp(142px, 19vw, 165px); margin-bottom: 3px; }
  h1 { font-size: clamp(27px, 4.2vw, 34px); line-height: .92; }
  .support { margin-top: 5px; font-size: 12.5px; line-height: 1.15; }
}

@media (min-width: 2200px) and (min-height: 1200px) {
  .language { font-size: 12px; }
  .hero__content { width: min(1100px, calc(100% - 64px)); }
  .wordmark { width: clamp(390px, 16vw, 410px); }
  h1 { font-size: clamp(82px, 3.4vw, 87px); }
  .support { font-size: 17px; }
}

@media (min-width: 601px) {
  .cta { --cta-natural-width: 280px; }
}

@media (min-width: 901px) and (min-height: 561px) {
  html { scrollbar-width: none; }
  body::-webkit-scrollbar { display: none; }

  .hero__art {
    inset: auto;
    left: var(--artwork-left);
    top: var(--artwork-top);
    width: var(--artwork-width);
    height: var(--artwork-height);
    object-fit: fill;
    transform: translate(var(--art-shift-x, 0), var(--art-shift-y, 0));
  }

  .hero::before,
  .hero__atmosphere {
    bottom: auto;
    height: var(--viewport-scene-height);
  }
}

@media (min-width: 600px) and (max-height: 560px) {
  .cta { --cta-natural-width: 190px; }
}

@media (min-width: 2200px) and (min-height: 1200px) {
  .cta { --cta-natural-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
