/* Clique — web. Palette + fonts pinned to the CLAUDE.md design system. */
:root {
  --darkroom-black: #17120e;
  --safelight-red: #c7361e;
  --bone: #d9c9b2; /* warm light text on the darkroom surface */
  --ash: #8a7c6b; /* dim / secondary text */
  --ember: #e9743a; /* warm highlight — the date stamp */
  --font-display: 'Fraunces', Georgia, serif; /* headers — warm editorial serif */
  --font-mono: 'Space Mono', ui-monospace, monospace; /* camera-data / utility */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--darkroom-black);
  /* Safelight vignette: center stays lit, edges fall into the dark. */
  background-image: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 42%,
    rgba(0, 0, 0, 0.5) 100%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  width: min(36vmin, 256px);
  height: auto;
}

/* Positioning context so the camera flash can bloom from the logo. */
.logo-wrap {
  position: relative;
  display: inline-flex;
}

.flash {
  position: absolute;
  inset: -20%; /* bloom beyond the logo edges */
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 237, 213, 0.55) 38%,
    rgba(233, 116, 58, 0) 72%
  );
  opacity: 0; /* invisible unless the flash animation runs */
  pointer-events: none;
}

.wordmark {
  margin-top: 2.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem);
  line-height: 1.1;
  color: var(--bone);
}

.tagline {
  margin-top: 0.5rem; /* tight — paired directly under the wordmark */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 3vw, 1.25rem);
  line-height: 1.4;
  white-space: nowrap; /* keep it on one line; size scales down on narrow screens */
  color: var(--bone);
}

.badges {
  display: flex;
  flex-wrap: wrap; /* stack/center on very narrow screens instead of overflowing */
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 1.75rem;
}

.badge {
  display: block;
  width: 165px; /* badges share an aspect ratio, so equal width => equal height (52px) */
  height: auto;
}

.footer {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.6; /* in case it wraps on narrow screens */
  color: var(--ash);
}

.footer a {
  color: var(--ash);
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--bone);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* "Develop in" — elements surface from dark, slightly blurred, then settle into
   focus. Staggered top to bottom. Mirrors the app's develop reveal. */
@keyframes develop {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Single disposable-camera flash: a fast warm-white burst, then falloff. */
@keyframes flash {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  6% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

/* Only animate when the visitor hasn't asked their OS to reduce motion. */
@media (prefers-reduced-motion: no-preference) {
  .logo,
  .wordmark,
  .tagline,
  .badges,
  .footer {
    animation: develop 2s ease-out both;
  }
  .logo {
    animation-delay: 0.05s;
  }
  .wordmark {
    animation-delay: 0.25s;
  }
  .tagline {
    animation-delay: 0.4s;
  }
  .badges {
    animation-delay: 0.6s;
  }
  .footer {
    animation-delay: 0.8s;
  }
  /* Flash fires after the develop-in sequence settles (~2.8s). */
  .flash {
    animation: flash 0.6s ease-out 3s both;
  }
  /* Date stamp burns in just after the flash. */
  .datestamp {
    animation: stamp-in 0.8s ease-out 3.6s both;
  }
}

/* ---- Texture & atmosphere (static; no reduced-motion concerns) ---- */
@font-face {
  font-family: 'DSEG7 Classic';
  src: url('fonts/DSEG7Classic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Film grain: generated noise over everything, blended so it textures without hazing. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Dot-matrix date stamp, burned into the bottom-right like a film-camera databack. */
.datestamp {
  position: fixed;
  right: 1.5rem;
  bottom: 1.25rem;
  z-index: 3;
  font-family: 'DSEG7 Classic', var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ember);
  opacity: 0.8;
  text-shadow: 0 0 6px rgba(233, 116, 58, 0.3);
  pointer-events: none;
}

@keyframes stamp-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.8;
  }
}
