/* naorio.com coming-soon page. Concept: the moment before sunrise — night sky, a sun rising over the horizon. */

@font-face {
  font-family: Fraunces;
  src: url('/fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0e1027;
  --dusk: #2a1f4d;
  --plum: #6b2f63;
  --ember: #ff7a59;
  --sun: #ffc46b;
  --cream: #fff4e6;
  --mist: rgb(255 244 230 / 72%);
  --line: rgb(255 244 230 / 18%);

  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 24px 16px;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% 100%, rgb(255 122 89 / 45%) 0%, rgb(255 122 89 / 0%) 100%),
    linear-gradient(180deg, var(--night) 0%, var(--dusk) 55%, var(--plum) 82%, #b4486a 100%);
  color: var(--cream);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ---------- sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
  animation: twinkle 6s ease-in-out infinite alternate;
}

.stars-a {
  box-shadow:
    8vw 12vh var(--cream),
    17vw 31vh var(--cream),
    26vw 7vh var(--cream),
    34vw 22vh var(--cream),
    44vw 4vh var(--cream),
    57vw 17vh var(--cream),
    66vw 9vh var(--cream),
    74vw 28vh var(--cream),
    83vw 6vh var(--cream),
    91vw 19vh var(--cream),
    5vw 44vh var(--cream),
    95vw 41vh var(--cream);
}

.stars-b {
  width: 1px;
  height: 1px;
  opacity: 0.7;
  animation-delay: -3s;
  box-shadow:
    3vw 24vh var(--cream),
    12vw 3vh var(--cream),
    21vw 18vh var(--cream),
    30vw 38vh var(--cream),
    39vw 13vh var(--cream),
    50vw 27vh var(--cream),
    61vw 5vh var(--cream),
    70vw 36vh var(--cream),
    79vw 15vh var(--cream),
    88vw 31vh var(--cream),
    97vw 9vh var(--cream),
    47vw 46vh var(--cream);
}

.sun {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(78vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, 70%);
  background: radial-gradient(circle at 50% 35%, #ffe2a8 0%, var(--sun) 38%, var(--ember) 100%);
  animation:
    rise 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) both,
    glow 9s ease-in-out 3.2s infinite alternate;
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22vh;
  background: linear-gradient(180deg, rgb(42 31 77 / 0%) 0%, rgb(42 31 77 / 70%) 100%);
}

/* ---------- content ---------- */

.card {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  text-align: center;
  animation: fade-up 1.4s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(14 16 39 / 35%);
  backdrop-filter: blur(6px);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 0 rgb(255 196 107 / 60%);
  animation: pulse 2.4s ease-out infinite;
}

.wordmark {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(4.25rem, 17vw, 9.5rem);
  font-weight: 600;
  font-variation-settings: 'opsz' 144;
  line-height: 0.9;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, var(--cream) 30%, var(--sun) 100%);
  background-clip: text;
  /* stylelint-disable-next-line property-no-vendor-prefix -- older Safari needs the prefix for text clipping */
  -webkit-background-clip: text;
  color: transparent;
}

.lead {
  margin: 18px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.5rem, 4.5vw, 2.125rem);
  font-weight: 400;
  line-height: 1.25;
}

.lead em {
  font-style: italic;
  color: var(--sun);
}

.text {
  max-width: 34ch;
  margin: 18px auto 0;
  color: var(--mist);
}

a {
  color: var(--cream);
  font-weight: 700;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--sun);
}

a:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
  border-radius: 4px;
}

.foot {
  position: relative;
  z-index: 1;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 1px 6px rgb(14 16 39 / 70%);
}

/* ---------- motion ---------- */

@keyframes rise {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 70%);
    opacity: 1;
  }
}

@keyframes glow {
  to {
    transform: translate(-50%, 68%) scale(1.03);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  to {
    opacity: 0.35;
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgb(255 196 107 / 0%);
  }

  100% {
    box-shadow: 0 0 0 0 rgb(255 196 107 / 0%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars,
  .sun,
  .card,
  .dot {
    animation: none;
  }
}
