/* ==========================================================================
   MindFlow shared site styles
   "Dusk feed": pale-sky light mode / deep-indigo dark mode.
   Two semantic accents: --calm (iris, MindFlow) and --pull (coral, the feed).
   Theme follows the browser's prefers-color-scheme; there is no toggle.
   ========================================================================== */

:root {
  --bg: #f6f5fb;
  --bg-2: #edebf6;
  --card: #ffffff;
  --ink: #211f3d;
  --ink-2: #5c5980;
  --ink-3: #8f8cad;
  --line: #dedbee;
  --line-soft: #e8e6f3;
  --calm: #5049e0;
  --calm-hi: #423bd1;
  --calm-ink: #ffffff;
  --calm-wash: rgba(80, 73, 224, 0.08);
  --pull: #e04f3a;
  --pull-wash: rgba(224, 79, 58, 0.09);
  --nav-bg: rgba(246, 245, 251, 0.82);
  --shadow: 0 24px 60px -24px rgba(33, 31, 61, 0.25);
  --display: "Bricolage Grotesque", "Avenir Next", Futura, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(22px, 6vw, 84px);
  --r: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131226;
    --bg-2: #191833;
    --card: #1c1b38;
    --ink: #eeedfa;
    --ink-2: #a4a1c6;
    --ink-3: #6f6c93;
    --line: #2d2b4e;
    --line-soft: #232145;
    --calm: #8983ff;
    --calm-hi: #9c97ff;
    --calm-ink: #14132a;
    --calm-wash: rgba(137, 131, 255, 0.12);
    --pull: #ff7b64;
    --pull-wash: rgba(255, 123, 100, 0.12);
    --nav-bg: rgba(19, 18, 38, 0.8);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

::selection { background: var(--calm); color: var(--calm-ink); }

a { color: inherit; text-decoration: none; }

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

code, .mono { font-family: var(--mono); font-size: 0.87em; }

/* soft film over everything, keeps flat fills from feeling clinical */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* nav --------------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--gutter);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.35s ease;
}
nav.solid { border-bottom-color: var(--line); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 640;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .mark { width: 26px; height: 16px; display: block; flex: none; color: var(--calm); }

.nav-right { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 24px); }
.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }
@media (max-width: 900px) { .hide-sm { display: none !important; } }

/* buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--calm); color: var(--calm-ink); }
.btn-primary:hover { background: var(--calm-hi); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn-sm { font-size: 13.5px; padding: 9px 17px; }

/* layout ------------------------------------------------------------------ */
section { padding: clamp(70px, 10vh, 122px) var(--gutter); position: relative; }
.wrap { max-width: 1140px; margin: 0 auto; }
.narrow { max-width: 860px; }

/* small mono section eyebrow with a self-drawing rule */
.label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--calm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h2.head {
  font-family: var(--display);
  font-weight: 620;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 22px 0 20px;
}
.lede {
  color: var(--ink-2);
  font-size: clamp(15.5px, 1.4vw, 17.5px);
  line-height: 1.7;
  max-width: 58ch;
}

/* lists ------------------------------------------------------------------- */
.list { list-style: none; display: flex; flex-direction: column; }
.list li {
  display: flex;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.list li:first-child { border-top: 1px solid var(--line-soft); }
.list li .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--calm);
  padding-top: 4px;
  min-width: 20px;
  flex: none;
}
.list li strong { color: var(--ink); font-weight: 600; }

/* footer ------------------------------------------------------------------ */
footer {
  border-top: 1px solid var(--line);
  padding: 38px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}
footer .brand { font-size: 17px; color: var(--ink-2); }
footer .credits { text-align: right; line-height: 1.8; }
footer .credits a { color: var(--ink-2); border-bottom: 1px solid var(--line); }
footer .credits a:hover { color: var(--calm); border-color: var(--calm); }
@media (max-width: 620px) { footer .credits { text-align: left; } }

/* motion ------------------------------------------------------------------
   Elements start hidden only while the motion layer is running (html.js-anim,
   added inline in <head>), so a JS failure leaves a fully readable page.
   -------------------------------------------------------------------------- */
html.js-anim [data-anim]:not([data-anim-children]),
html.js-anim [data-anim-children] > *,
html.js-anim [data-hero] { opacity: 0; }

/* masked word reveal for display headlines */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.word { display: inline-block; will-change: transform; }
html.js-anim .word { transform: translateY(110%); }

/* the hairline after a section eyebrow draws itself in */
@property --rule-scale {
  syntax: "<number>";
  initial-value: 1;
  inherits: false;
}
html.js-anim .label { --rule-scale: 0; }
.label::after { transform: scaleX(var(--rule-scale, 1)); transform-origin: left center; }

/* scroll progress under the nav */
.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--calm);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js-anim [data-anim]:not([data-anim-children]),
  html.js-anim [data-anim-children] > *,
  html.js-anim [data-hero] { opacity: 1; }
  html.js-anim .word { transform: none; }
  html.js-anim .label { --rule-scale: 1; }
}
