/* joeeyre.co.uk welcome page. System fonts only, no outside requests. */
:root {
  --bg: #140d12;
  --cream: #f8ecdc;
  --sand: #ecc9a2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}

/* Warm dusk light laid over the moving threads (and shown on its own when JavaScript is off). */
.warmth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(90vmax 70vmax at 12% 108%, rgba(255, 122, 77, .40), transparent 62%),
    radial-gradient(80vmax 60vmax at 96% -8%, rgba(240, 82, 122, .28), transparent 60%),
    radial-gradient(60vmax 50vmax at 70% 90%, rgba(255, 176, 84, .15), transparent 65%);
}

.air {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: crosshair;
}

.words {
  position: relative;
  z-index: 1;
  padding: 0 6vw;
  text-align: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Soft shade behind the words so they stay readable over the moving light. */
.words::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(150vw, 1100px);
  height: min(90vh, 560px);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(20, 13, 18, .78), rgba(20, 13, 18, .45) 55%, transparent);
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 9.5rem);
  line-height: .95;
  letter-spacing: -.025em;
  text-shadow: 0 2px 40px rgba(20, 13, 18, .6);
}

.name span { display: inline-block; }

.line {
  margin: clamp(1rem, 3vw, 1.75rem) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 3.6vw, 1.9rem);
  color: var(--sand);
  letter-spacing: .01em;
  text-shadow: 0 1px 24px rgba(20, 13, 18, .8);
}

.note {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px));
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  color: rgba(248, 236, 220, .72);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (prefers-reduced-motion: no-preference) {
  .name span, .line, .note {
    opacity: 0;
    animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .name span:nth-child(1) { animation-delay: .15s; }
  .name span:nth-child(2) { animation-delay: .35s; }
  .line { animation-delay: .75s; }
  .note { animation-delay: 1.3s; animation-name: fade; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(.35em); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
  @keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}
