/* AnimAI — restrained, technical, dark. */

:root {
  --bg: #07080b;
  --bg-vignette: #000000;
  --fg: #f1f2f4;
  --fg-muted: rgba(241, 242, 244, 0.56);
  --fg-faint: rgba(241, 242, 244, 0.34);
  --rule: rgba(241, 242, 244, 0.12);
  --accent: #c9d4e2;

  --font-sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --maxw: 720px;
  --pad-x: clamp(20px, 5vw, 48px);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 30%,
      rgba(255, 255, 255, 0.025) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 50% 90%,
      rgba(0, 0, 0, 0.55) 0%,
      transparent 60%
    ),
    var(--bg);
}

::selection {
  background: rgba(201, 212, 226, 0.22);
  color: var(--fg);
}

/* Canvas background --------------------------------------------------- */

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Layout -------------------------------------------------------------- */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 96px var(--pad-x) 128px;
}

.hero {
  width: 100%;
  max-width: var(--maxw);
  text-align: center;
  margin: 0 auto;
}

/* Typography ---------------------------------------------------------- */

.wordmark {
  margin: 0;
  font-weight: 500;
  font-size: clamp(56px, 11vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--fg);
}

.tagline {
  margin: clamp(24px, 3.6vh, 36px) auto 0;
  max-width: 22ch;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 350;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--fg);
}

.body {
  margin: clamp(32px, 4.6vh, 48px) auto 0;
  max-width: 46ch;
  font-size: clamp(14px, 1.05vw, 15.5px);
  line-height: 1.6;
  color: var(--fg-muted);
  font-weight: 400;
}

.contact {
  margin: clamp(40px, 6vh, 64px) auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.contact a {
  position: relative;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 4px 2px;
  transition: color 0.5s var(--ease-out);
}

.contact a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s var(--ease-out);
}

.contact a:hover,
.contact a:focus-visible {
  color: var(--accent);
  outline: none;
}

.contact a:hover::after,
.contact a:focus-visible::after {
  transform: scaleX(1);
}

/* Footer -------------------------------------------------------------- */

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 20px var(--pad-x) calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  pointer-events: none;
}

.footer span {
  pointer-events: auto;
}

/* Initial reveal ------------------------------------------------------ */

.wordmark,
.tagline,
.body,
.contact,
.footer {
  opacity: 0;
  transform: translateY(6px);
  animation: rise 1100ms var(--ease-out) forwards;
}

.wordmark { animation-delay: 80ms; }
.tagline  { animation-delay: 260ms; }
.body     { animation-delay: 420ms; }
.contact  { animation-delay: 580ms; }
.footer   { animation-delay: 740ms; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive tightening ---------------------------------------------- */

@media (max-width: 480px) {
  .stage {
    padding: 72px var(--pad-x) 112px;
  }
  .tagline {
    max-width: 20ch;
  }
  .contact {
    letter-spacing: 0.24em;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .wordmark,
  .tagline,
  .body,
  .contact,
  .footer {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .contact a,
  .contact a::after {
    transition: none;
  }

  /* Canvas script also bails out; body keeps a static vignette only. */
  #bg {
    display: none;
  }
}
