/* ============================================================
   Xapper LLC company landing page
   Stylesheet — dark mode only, fully responsive
   ----
   Animations are pure CSS keyframes, autoplaying on page load.
   No JavaScript, no canvas. The letters drop in, then text
   fades in below.
   ============================================================ */

/* --- Self-hosted font (no Google CDN, GDPR-safe) ------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-variable.woff2") format("woff2");
}

/* --- Design tokens ------------------------------------------- */
:root {
  --color-bg: #0a0a0c;
  --color-fg: #fafafa;
  --color-fg-muted: #d4d4d8;
  --color-fg-dim: #71717a;
  --color-accent: #fbbf24;
  --color-border: rgba(255, 255, 255, 0.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;

  --space-xs: 0.75rem;
  --space-sm: 1.5rem;
  --space-md: 3rem;
  --space-lg: 4rem;

  /* Animation timing — single source of truth.
     Letters 1-6 drop starting at 0.1s, 0.2s ... 0.6s.
     The dot drops starting at 0.7s and lands at 1.1s.
     Text below the wordmark fades in after that. */
  --drop-duration: 0.4s;
  --drop-stagger: 0.1s;
  --drop-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* --- Layout --------------------------------------------------
   Vertical flex column. The ::before spacer pushes the wordmark
   down into the upper third. The footer's margin-top: auto pushes
   it to the bottom of the viewport. */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
}

.hero::before {
  content: "";
  flex: 0 0 8vh;
}

/* --- Wordmark ------------------------------------------------ */
.wordmark {
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 var(--space-sm);
  display: inline-block;
}

.wordmark__letter {
  display: inline-block;
  /* Animation autoplays on page load — letters start above and
     drop into place. No JS trigger needed. */
  animation: wordmark-drop var(--drop-duration) var(--drop-easing) both;
}

.wordmark__letter:nth-child(1) { animation-delay: calc(var(--drop-stagger) * 1); }
.wordmark__letter:nth-child(2) { animation-delay: calc(var(--drop-stagger) * 2); }
.wordmark__letter:nth-child(3) { animation-delay: calc(var(--drop-stagger) * 3); }
.wordmark__letter:nth-child(4) { animation-delay: calc(var(--drop-stagger) * 4); }
.wordmark__letter:nth-child(5) { animation-delay: calc(var(--drop-stagger) * 5); }
.wordmark__letter:nth-child(6) { animation-delay: calc(var(--drop-stagger) * 6); }
.wordmark__letter:nth-child(7) { animation-delay: calc(var(--drop-stagger) * 7); }

.wordmark__dot {
  color: var(--color-accent);
}

/* --- Tagline ------------------------------------------------- */
.tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--color-fg-muted);
  margin: 0 0 var(--space-lg);
  max-width: 32em;
  animation: fade-in 0.6s ease 1.3s both;
}

/* --- Apps list ----------------------------------------------- */
.apps { animation: fade-in 0.6s ease 1.5s both; }

.apps__heading {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-dim);
  margin: 0 0 var(--space-xs);
}

.apps__list { list-style: none; padding: 0; margin: 0; }
.apps__item { border-top: 1px solid var(--color-border); }
.apps__item:last-child { border-bottom: 1px solid var(--color-border); }

.apps__link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.875rem 0;
  font-size: 1.125rem;
  color: var(--color-fg);
  text-decoration: none;
  transition: color 0.15s ease;
}

.apps__link:hover, .apps__link:focus-visible { color: var(--color-accent); }
.apps__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.apps__name { font-weight: 500; }
.apps__description {
  font-size: 0.875rem;
  color: var(--color-fg-dim);
  text-align: right;
}

@media (max-width: 480px) {
  .apps__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .apps__description { text-align: left; }
}

/* --- Footer -------------------------------------------------- */
.footer {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-fg-dim);
  animation: fade-in 0.6s ease 1.7s both;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes wordmark-drop {
  from {
    transform: translateY(-120px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Accessibility: respect reduced-motion preference -------- */
@media (prefers-reduced-motion: reduce) {
  .wordmark__letter, .tagline, .apps, .footer {
    animation: none;
  }
}