@font-face {
  font-family: "Lilita One";
  src: url("./assets/LilitaOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #060c3b;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body { margin: 0; }

.entrance {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: 32px 20px;
}

.entrance__background,
.plaza-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.plaza-background { opacity: 0; }

.entrance.is-warping .entrance__background,
.entrance.is-warping .plaza-background,
.entrance.is-warping .welcome {
  will-change: transform, opacity, filter;
}

.welcome { position: relative; z-index: 1; }

.warp-streaks,
.warp-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.warp-streaks { z-index: 2; }
.warp-light {
  z-index: 3;
  background: radial-gradient(ellipse at var(--warp-x, 50%) var(--warp-y, 60%),
    #efffff 0%, rgb(158 236 255 / 85%) 12%, rgb(49 109 255 / 32%) 42%, transparent 72%);
}

.destination {
  position: absolute;
  inset: 0;
  z-index: 1;
  outline: none;
}

[hidden] { display: none !important; }


.direct-workspace .welcome { display: none; }
.direct-workspace .entrance__background { opacity: 0; }
.direct-workspace .plaza-background { opacity: 1; }
.direct-workspace .destination[hidden] { display: block !important; }

.back-button {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 15px 9px 11px;
  border: 1px solid #70d6ff;
  border-radius: 8px;
  background: rgb(5 11 45 / 85%);
  color: #eefbff;
  font: 20px "Lilita One", sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
}

.back-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-button:hover { background: #14265b; }
.back-button:focus-visible { outline: 3px solid #fff9b7; outline-offset: 4px; }
.start-button:disabled { cursor: wait; }

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 710px);
  padding-bottom: 12px;
  text-align: center;
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  font-weight: 700;
}

.title__logo {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  filter: drop-shadow(0 5px 15px rgb(0 0 30 / 45%));
}

.title__calculator {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -25px;
  filter: drop-shadow(0 6px 5px rgb(20 165 255 / 42%));
}

.byline {
  width: min(70vw, 300px);
  margin: 5px 0 0;
  filter: drop-shadow(0 2px 4px rgb(65 121 251 / 45%));
}

.byline img {
  display: block;
  width: 100%;
  height: auto;
}

.start-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 196px;
  height: 98px;
  margin-top: 35px;
  padding: 0 12px 3px;
  border: 3px solid #ffe71c;
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 50% 66%, rgb(104 71 0 / 45%), transparent 77%),
    linear-gradient(180deg, #f9d42c 0%, #d4a90e 49%, #b88a03 100%);
  box-shadow:
    inset 0 0 0 2px rgb(255 247 118 / 60%),
    inset 0 3px 6px rgb(255 252 179 / 38%),
    inset 0 -5px 8px rgb(100 62 0 / 48%),
    0 4px 0 #624500,
    0 0 8px #ffe918,
    0 0 23px rgb(255 209 0 / 42%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.start-button span {
  color: #fff9d9;
  font-family: "Lilita One", "Arial Rounded MT Bold", sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1.2px;
  -webkit-text-stroke: 5px #211700;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #5d3c00;
}

.start-button:hover {
  transform: translateY(-3px) scale(1.025);
  filter: brightness(1.12);
}

.start-button:active {
  transform: translateY(3px) scale(.98);
  filter: brightness(.98);
}

.start-button:focus-visible {
  outline: 3px solid #d1fbff;
  outline-offset: 7px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .entrance { padding: 28px 16px; }
  .title__calculator { margin-top: -10px; }
  .byline { width: min(70vw, 240px); margin-top: 8px; }
  .start-button { width: 180px; height: 90px; margin-top: 33px; }
  .start-button span { font-size: 44px; }
}

@media (max-height: 600px) and (min-width: 601px) {
  .welcome { width: min(62vw, 530px); }
  .title__calculator { margin-top: -20px; }
  .byline { width: 260px; margin-top: 5px; }
  .start-button { width: 160px; height: 80px; margin-top: 22px; }
  .start-button span { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .start-button { transition: none; }
}

.title__calculator { width:72%; }

.title__calculator { width:36%; }
.welcome { transform:translateY(-20px); }
.byline { margin-top:0; }
.start-button { margin-top:24px; }
