:root {
  --sky-fallback: #c9d8dc;
  --text: #f5f5f7;
  /* Cool slate — reads on pale sky, ties to dune shadows (not light-on-light) */
  --text-muted: #3e4a56;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-text: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.2, 0.85, 0.25, 1);
}

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

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-text);
  font-optical-sizing: auto;
  background: var(--sky-fallback);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* —— Photographic background: dunes + sky —— */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
  animation: ambientWake 0.38s var(--ease) forwards;
}

.ambient__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Readability on pale sky: gentle center darkening + soft top shadow */
.ambient__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 20, 28, 0.14) 0%, transparent 42%),
    radial-gradient(ellipse 75% 65% at 50% 45%, rgba(10, 14, 20, 0.14) 0%, transparent 68%);
  pointer-events: none;
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 92% 88% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
}

@keyframes ambientWake {
  from {
    opacity: 0.78;
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5.5vw, 3rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--text);
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  filter: blur(8px);
  animation: titleIn 0.72s var(--ease) 0.22s forwards;
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 26rem;
  font-family: var(--font-text);
  font-size: clamp(0.8125rem, 1.75vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 1.65;
  color: var(--text-muted);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(15, 22, 30, 0.06);
  opacity: 0;
  transform: translateY(6px);
  filter: blur(3px);
  animation: lineIn 0.95s var(--ease-soft) 1.48s forwards;
}

@keyframes titleIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient {
    animation: none;
    opacity: 1;
    filter: none;
  }

  .title,
  .lede {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
