/* ============================================================
   Findable — design tokens, plaster wall, type, components
   Palette inspired by quiet red/blue identities: ink blue leads,
   vermilion accents, warm cream plaster.
   ============================================================ */

:root {
  --ink: #002255;
  --ink-deep: #001335;
  --ink-soft: rgba(0, 34, 85, 0.6);
  --ink-faint: rgba(0, 34, 85, 0.38);
  --red: #CB5665;
  --red-deep: #B23E4E;
  --red-light: #DC8B97;
  --grey-blue: #9EAAB9;
  --violet: #CDC6D5;
  --ghost: #F8F9FC;
  --paper: #F8F9FC;
  --surface: #FFFFFF;
  --line: rgba(0, 34, 85, 0.12);
  --line-strong: rgba(0, 34, 85, 0.3);

  /* runtime-tweaked */
  --accent: var(--red);
  --accent-deep: var(--red-deep);
  --tex: 0.55;       /* texture intensity 0–1 */
  --m: 1;            /* motion duration multiplier */
  --wall: var(--ghost);
  --wall-text: var(--ink);
  --wall-text-soft: var(--ink-soft);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

#root { height: 100%; }

/* ---------- The wall ---------- */

.wall {
  position: relative;
  background-color: var(--wall);
  isolation: isolate;
}

/* soft cloud wash — cool grey-blue marbling, very quiet */
.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(110% 80% at 25% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(120% 100% at 88% 105%, rgba(158, 170, 185, 0.28) 0%, rgba(158, 170, 185, 0) 58%),
    radial-gradient(90% 70% at 0% 100%, rgba(205, 198, 213, 0.22) 0%, rgba(205, 198, 213, 0) 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0045' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='900' height='900' filter='url(%23c)'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, 900px 900px;
  mix-blend-mode: soft-light;
  opacity: calc(var(--tex) * 0.9);
}

/* fine paper grain */
.wall::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
  opacity: calc(var(--tex) * 0.07);
}

.wall > * { position: relative; z-index: 1; }

/* dark ink wall variant (login) — Ecometrica blue */
.wall--ink {
  --wall: #002255;
  --wall-text: #F8F9FC;
  --wall-text-soft: rgba(248, 249, 252, 0.62);
}
.wall--ink::before {
  background-image:
    radial-gradient(110% 80% at 25% 0%, rgba(158, 170, 185, 0.5) 0%, rgba(158, 170, 185, 0) 55%),
    radial-gradient(120% 100% at 88% 105%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0045' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='900' height='900' filter='url(%23c)'/%3E%3C/svg%3E");
  background-size: auto, auto, 900px 900px;
  opacity: calc(var(--tex) * 0.8);
}
.wall--ink::after {
  mix-blend-mode: overlay;
  opacity: calc(var(--tex) * 0.18);
}

/* softer wall for app interior */
.wall--soft {
  --wall: var(--paper);
}
.wall--soft::before { opacity: calc(var(--tex) * 0.55); }
.wall--soft::after { opacity: calc(var(--tex) * 0.05); }

/* ---------- Type ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Logo / wordmark ---------- */

.logo {
  display: flex;
  align-items: center;
  color: var(--wall-text, var(--ink));
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.logo-pin {
  width: 0.62em;
  height: 0.82em;
  flex: 0 0 auto;
}

.word {
  position: relative;
  display: inline-block;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--wall-text, var(--ink));
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    transform calc(var(--m) * 160ms) ease,
    background-color calc(var(--m) * 200ms) ease,
    border-color calc(var(--m) * 200ms) ease,
    color calc(var(--m) * 200ms) ease,
    box-shadow calc(var(--m) * 200ms) ease;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn--primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 6px 18px -8px var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--bare {
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 12px;
}
.btn--bare:hover { color: var(--ink); }

/* ---------- Status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill--imported {
  color: var(--ink-soft);
  background: rgba(158, 170, 185, 0.2);
}
.pill--generated {
  color: var(--ink);
  background: rgba(158, 170, 185, 0.42);
}
.pill--published {
  color: var(--accent-deep);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--accent) 45%, transparent);
}
.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill--published .pill__dot {
  background: var(--accent);
  animation: pulse calc(var(--m) * 2.4s) ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

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

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise calc(var(--m) * 640ms) cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--m) * var(--d, 0ms));
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
