/* ============================================================
   Memnoria — liquid metaball one-pager, third act
   One central product window plays a six-act story (files →
   history → invite → draft → review → undo) while the metaball
   cast — squares are what's stored, circles are who acts, coral
   is the agent — performs around it and finally assembles into
   the logomark.
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrainsmono-var.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0A0A;
  --ink: #E9E9E6;
  --ink-dim: #9A9C99;
  --ink-faint: #797B76;
  --accent: #FF4D00;
  --card: #101010;
  --line: rgba(233, 233, 230, 0.09);
  --line-soft: rgba(233, 233, 230, 0.055);
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --container: 1100px;
}

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

html { background: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, pre, form { margin: 0; }
[hidden] { display: none !important; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
strong { font-weight: 600; }

::selection { background: var(--accent); color: #120700; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

main { position: relative; z-index: 1; }
.footer { position: relative; z-index: 1; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font: 600 14px var(--font-body);
  transform: translateY(-64px);
  opacity: 0;
}
.skip:focus-visible { transform: none; opacity: 1; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- Shared bits ---------- */
.eyebrow {
  font: 500 11px var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  padding: 16px 26px;
  font: 600 12.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #120700;
}
.btn-primary:hover { background: #FF6320; }
.btn-primary:active { background: #D64100; }
.btn-ghost {
  border: 1.5px solid rgba(233, 233, 230, 0.22);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(233, 233, 230, 0.5);
  background: rgba(233, 233, 230, 0.04);
}
.btn-sm { padding: 10px 16px; font-size: 11.5px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(233, 233, 230, 0.08);
}
.nav-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { display: block; height: 26px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font: 500 11.5px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Blob layer ---------- */
.blobfield {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100vh;
  height: 100svh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.js-motion .blobfield {
  position: fixed;
  inset: 0;
  height: auto;
}
.blob-svg { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .breathe { animation: breathe 8s ease-in-out infinite alternate; }
  .br-1 { animation-duration: 8.6s; }
  .br-2 { animation-duration: 7.3s; animation-delay: -2.1s; }
  .br-3 { animation-duration: 9.4s; animation-delay: -4.4s; }
  .br-4 { animation-duration: 6.8s; animation-delay: -1.2s; }

  /* blocks barely breathe — files hold still, people move */
  .breathe-b { animation: breathe-soft 9s ease-in-out infinite alternate; }
  .bb-1 { animation-delay: -0.8s; }
  .bb-2 { animation-delay: -2.2s; animation-duration: 8.2s; }
  .bb-3 { animation-delay: -4.1s; }
  .bb-4 { animation-delay: -1.6s; animation-duration: 9.8s; }
  .bb-5 { animation-delay: -3.0s; }
  .bb-6 { animation-delay: -5.4s; animation-duration: 8.6s; }
  .bb-7 { animation-delay: -2.6s; }
  .bb-8 { animation-delay: -0.4s; animation-duration: 9.2s; }
}
@keyframes breathe {
  from { transform: scale(0.955); }
  to   { transform: scale(1.05); }
}
@keyframes breathe-soft {
  from { transform: scale(0.988); }
  to   { transform: scale(1.012); }
}

