/* Vestra Flock launch page (`hero: flock`) and the `birds` component. Loaded only by pages that use
   them, on top of /static/css/styles.css and news.css. Palette: black sky, soft white birds, and
   the Flock app's mint for the lead bird and anything you can click. */

.news-flock {
  --bg: #000;
  --mint: #35c497;
  --mint-ink: 53, 196, 151;
  --signal: var(--mint);
  background: var(--bg);
}

html:has(> body.news-flock) {
  background: #000;
}

/* ------------------------------------------------------------------ hero */

.flock-hero {
  position: relative;
}

/* --u is one character of the sky. */
.flock-stage {
  --u: clamp(13px, 0.55rem + 0.55vw, 20px);
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: var(--nav-h) var(--gutter) 0;
  overflow: clip;
  background:
    radial-gradient(60% 45% at 50% 30%, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 70%),
    #000;
}

.flock-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  font-family: var(--font-mono);
  line-height: 1;
  white-space: pre;
  pointer-events: none;
  user-select: none;
}

/* --z is depth, 0 (far) to 1 (close): size and brightness follow it. */
.fk-b {
  position: absolute;
  font-size: calc(9px + var(--z) * 17px);
  color: rgba(242, 244, 247, calc(0.18 + var(--z) * 0.72));
  transform: translate(-50%, -50%);
  will-change: transform;
}

.fk-b.is-mint {
  color: var(--mint);
  text-shadow: 0 0 0.8em rgba(var(--mint-ink), 0.45);
}

@media (max-width: 640px) {
  .fk-nm { display: none; }
}

/* With the script: the hero is taller and its stage stays pinned while the birds fly. */
.flock-hero.is-live { height: 210svh; }
.flock-hero.is-live .flock-stage {
  position: sticky;
  top: 0;
  height: 100svh;
}

.flock-lockup {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 52%;
  display: grid;
  justify-items: center;
  gap: clamp(0.6rem, 1.5vh, 1.1rem);
  text-align: center;
}

.flock-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 1rem + 5.6vw, 6.75rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.flock-line {
  max-width: 24em;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 0.95rem + 1.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: no-preference) {
  .flock-title, .flock-line {
    animation: flock-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .flock-line { animation-delay: 0.15s; }
}

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

@media (max-width: 640px) {
  .flock-lockup { top: 48%; }
}

/* ------------------------------------------------------- page chrome */

.news-flock .flock-intro .launch-dek { color: var(--ink); }

.news-flock .launch-nav,
.news-flock .nav.is-scrolled {
  background: rgba(0, 0, 0, 0.9);
}

.news-flock .btn-primary,
.news-flock .launch-nav-cta {
  background: var(--mint);
  border-color: var(--mint);
  color: #04140e;
}

@media (hover: hover) {
  .news-flock .btn-primary:hover,
  .news-flock .launch-nav-cta:hover { background: #fff; border-color: #fff; }
}

.news-flock .launch-nav-list a.is-active { color: var(--mint); }
.news-flock .c-callout { border-color: rgba(var(--mint-ink), 0.3); }

/* ---------------------------------------------------------------- birds */

.fk-birds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

.fk-card {
  padding: 1.4rem 1.25rem 1.25rem;
  border-radius: 16px;
  background: #0d0f12;
}

.fk-art {
  margin: 0 0 1rem;
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.6rem + 0.3vw, 14px);
  line-height: 1.25;
  color: var(--bird);
  overflow: visible;
}

.fk-eye {
  color: #f2f4f7;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .fk-card:hover .fk-eye { animation: fk-blink 0.35s steps(1) 1; }
}

@keyframes fk-blink {
  0%, 100% { opacity: 1; }
  40% { opacity: 0; }
}

.fk-name {
  margin: 0;
  font-weight: 650;
  font-size: 1.05rem;
}

.fk-name span {
  margin-left: 0.4em;
  font-weight: 450;
  color: var(--ink-3, rgba(242, 244, 247, 0.55));
}

.fk-about {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.fk-birds .c-note {
  grid-column: 1 / -1;
}
