/* ==========================================================================
   Rahul Vemparala — 2026
   Design source: Figma "Untitled" (Q6gyMdyVM2CmjGw8wYzQuA)
   Frames: Desktop 1:5 (1920) · Tablet 1:15 (834) · Mobile 1:25 (402) · 404 1:37
   ========================================================================== */

:root {
  /* Colour */
  --bg: #ffffff;
  --ink: #000000;
  --ink-muted: #4d4d4d;
  --cta-bg: #000000;
  --cta-bg-hover: #3c3c3c;
  --cta-ink: #ffffff;

  /* Type */
  --font-ui: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Rhythm — from Figma auto-layout */
  --stack-gap: 60px;
  --headline-gap: 12px;
  --page-pad: 100px;

  /* CTA */
  --cta-radius: 12px;
  --cta-pad-y: 12px;
  --cta-pad-x: 24px;
  --cta-gap: 6px;
  --cta-size: 24px;
  --cta-icon: 21px;

  /* Headline */
  --display-size: 60px;
  --display-leading: 1.0667; /* 64 / 60 */
  --display-tracking: -0.1em;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--page-pad);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Centred stack (Figma "Frame 2609509") ------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-gap);
  width: fit-content;
  max-width: 100%;
}

/* --- Eyebrow ------------------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --- Display headline ---------------------------------------------------- */

.display {
  display: flex;
  flex-direction: column;
  gap: var(--headline-gap);
  margin: 0;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic; /* Helvetica Bold Oblique */
  font-size: var(--display-size);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-align: center;
}

.display span {
  display: block;
  white-space: nowrap;
}

.display--404 {
  font-size: var(--display-404-size, 200px);
  line-height: 1.1; /* 220 / 200 */
}

/* --- CTA ----------------------------------------------------------------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cta-gap);
  padding: var(--cta-pad-y) var(--cta-pad-x);
  border-radius: var(--cta-radius);
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--cta-size);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms ease, transform 200ms ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--cta-bg-hover);
}

.cta:focus-visible {
  outline: 2px solid var(--cta-bg-hover);
  outline-offset: 3px;
}

.cta:active { transform: scale(0.98); }

.cta__icon {
  display: block;
  flex: none;
  width: var(--cta-icon);
  height: var(--cta-icon);
}

/* --- Entrance ------------------------------------------------------------ */

.stack > * {
  animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.stack > *:nth-child(1) { animation-delay: 40ms; }
.stack > *:nth-child(2) { animation-delay: 120ms; }
.stack > *:nth-child(3) { animation-delay: 220ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* --- Tablet (Figma frame 834px) ------------------------------------------ */

@media (max-width: 1023px) {
  :root { --page-pad: 60px; }
}

/* --- Mobile (Figma frame 402px) ------------------------------------------ */

@media (max-width: 767px) {
  :root {
    --page-pad: 24px 16px;
    /* 34px at the 402px design frame, scaling down on narrower phones */
    --display-size: min(34px, 8.4vw);
    --display-leading: 1.0588; /* 36 / 34 */
    --display-404-size: min(110px, 27vw);
    --cta-size: 16px;
    --cta-icon: 14px;
  }

  .stack {
    width: 100%;
    max-width: 370px;
  }
}

/* --- Motion & print ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cta:active { transform: none; }
}
