/* FishLeader landing page (FLN-685).
   Page colors live here. Colors drawn on the canvas (fish, ripples, pellets)
   live in CONFIG.look at the top of pond.js. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* The dashboard's shadcn "neutral" tokens (dashboard/app/globals.css), written as hex
   so an old phone browser without oklch() still gets them. */
:root {
  color-scheme: light dark;
  --background: #ffffff; /* oklch(1 0 0) */
  --foreground: #0a0a0a; /* oklch(0.145 0 0) */
    --muted-foreground: #737373; /* oklch(0.556 0 0) */
  --border: #e5e5e5; /* oklch(0.922 0 0) */
  --ring: #a1a1a1; /* oklch(0.708 0 0) */
  --radius: 0.625rem;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
  --text-glow: 0 0 8px var(--background); /* keeps text clear of a fish passing under it */
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --muted-foreground: #a1a1a1;
    --border: rgba(255, 255, 255, 0.1);
    --ring: #737373;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero: the pond ─────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  /* The page is this one screen. Taps go straight to the pond, without the double-tap-to-zoom delay. */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* First paint, the no-JS fallback, and what shows through the canvas. */
  background: var(--background);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__canvas.is-live {
  opacity: 1;
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  text-shadow: var(--text-glow);
}

.tagline {
  margin: 1.1rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.4vw, 1.375rem);
  letter-spacing: -0.01em;
  text-shadow: var(--text-glow);
}

.hero__hint {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: max(1.4rem, env(safe-area-inset-top));
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  text-shadow: var(--text-glow);
}

/* shadcn's pulsing status dot (Tailwind's animate-ping): a solid dot with a ring that
   swells and fades behind it. */
.pulse {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
}

.pulse::before,
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--foreground);
}

.pulse::before {
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Deliberately quiet: the way in for staff, not something visitors need to notice.
   The padding makes it a full-size tap target without making it look bigger. */
.hero__admin {
  position: absolute;
  z-index: 1;
  left: max(0.35rem, env(safe-area-inset-left));
  bottom: max(0.5rem, env(safe-area-inset-bottom));
  padding: 0.9rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: none;
  text-shadow: var(--text-glow);
}

.hero__admin:hover {
  color: var(--foreground);
}

.hero__admin:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -4px;
  border-radius: calc(var(--radius) - 2px);
}

/* With motion turned off the pond is a still picture, so there is nothing to tap. */
@media (prefers-reduced-motion: reduce) {
  .hero__hint {
    display: none;
  }

  .hero__canvas {
    transition: none;
  }
}

/* ── Debug readout (press D, or add ?debug to the address) ──────── */

.pond-debug {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #e5e5e5;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  pointer-events: none;
}
