/* ============================================================
   MESES MANAGEMENT - landing v3
   One quiet scene. A person made of light walks through it;
   the words keep their distance.
   ============================================================ */

:root {
  --ms-bg:    #0a0c11;
  --ms-fg:    #e9edf3;
  --ms-muted: #8d95a5;
  --ms-dim:   #454c5b;
  --ms-line:  rgba(233,237,243,.08);
  --ms-ease:  cubic-bezier(.22,1,.36,1);
  --ms-nav-h: 76px;
  --ms-pad:   clamp(24px, 5vw, 80px);
  --ms-maxw:  1280px;
  --ms-mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html { scroll-behavior: smooth; }
#wrap { background: var(--ms-bg) !important; }

body.ms-page {
  background: var(--ms-bg);
  color: var(--ms-fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.ms-root { position: relative; background: var(--ms-bg); color: var(--ms-fg); }
.ms-root *, .ms-root *::before, .ms-root *::after { box-sizing: border-box; }
.ms-root h1, .ms-root h2, .ms-root p { margin: 0; }
.ms-root a { color: inherit; text-decoration: none; }
.ms-root ::selection { background: var(--ms-fg); color: var(--ms-bg); }
.ms-root :focus-visible { outline: 1px solid var(--ms-fg); outline-offset: 4px; }

/* ---------- the scene ---------- */

.ms-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.2s ease;
}
.ms-scene.is-live { opacity: 1; }

/* loader: the dashes rearrange themselves until the person arrives */
.ms-loader {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: var(--ms-bg);
  font-family: var(--ms-mono);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ms-muted);
  transition: opacity 1.1s ease;
}
.ms-loader.is-done { opacity: 0; pointer-events: none; }

.ms-root main, .ms-root .ms-nav, .ms-root .ms-footer { position: relative; z-index: 1; }

/* ---------- nav ---------- */

.ms-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ms-nav-h);
  z-index: 3;
  display: flex;
  align-items: center;
}
.ms-nav__in {
  width: 100%;
  padding: 0 var(--ms-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ms-logo { display: inline-flex; align-items: baseline; gap: 10px; }
.ms-logo b { font-size: 14px; font-weight: 600; letter-spacing: .24em; }
.ms-logo span { font-size: 9px; font-weight: 500; letter-spacing: .3em; color: var(--ms-dim); }

.ms-ticks { display: flex; gap: 6px; align-items: center; }
.ms-ticks i {
  display: block; width: 9px; height: 1px;
  background: #3a4150;
}
.ms-ticks i.is-past { background: var(--ms-muted); }
.ms-ticks i.is-now {
  background: var(--ms-fg);
  height: 2px;
  animation: ms-now 3.2s ease-in-out infinite;
}
@keyframes ms-now { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- sections ---------- */

.ms-sec {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: calc(var(--ms-nav-h) + 24px) var(--ms-pad) 120px;
}
.ms-sec__in { width: 100%; max-width: var(--ms-maxw); margin: 0 auto; }
.ms-sec__body { max-width: min(520px, 42vw); }
.ms-sec--right .ms-sec__body { margin-left: auto; }
.ms-sec--close .ms-sec__body { max-width: min(600px, 46vw); }

.ms-sec__n {
  display: block;
  font-family: var(--ms-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ms-dim);
  margin-bottom: 30px;
}
.ms-sec__title {
  font-size: clamp(28px, 3.7vw, 56px);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 500;
  text-wrap: balance;
}
.ms-sec__title em { font-style: normal; color: var(--ms-muted); }

/* headline characters: they arrive as bits and settle into words */
.ms-w { display: inline-block; white-space: nowrap; }
.ms-ch {
  display: inline-block;
  opacity: 0;
  text-align: center;
  will-change: transform, opacity, filter;
  transition: opacity 1.1s ease, transform 1.6s cubic-bezier(.22,1,.36,1), filter 1.2s ease;
}
.ms-ch.no-t { transition: none !important; }
.ms-ch.is-on { opacity: 1; transform: none; filter: blur(0); }
.ms-ch.is-bit {
  font-family: var(--ms-mono);
  font-weight: 500;
  font-size: .8em;
  color: var(--ms-muted);
  opacity: .75;
}
.ms-sec__title em .ms-ch.is-bit { color: var(--ms-dim); }

/* the words come into focus, then step aside */
[data-reveal] {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(14px);
  transition: opacity 1.6s var(--ms-ease), filter 1.6s var(--ms-ease), transform 1.6s var(--ms-ease);
}
[data-reveal].is-in { opacity: 1; filter: blur(0); transform: none; }
[data-reveal="2"] { transition-delay: .2s; }

/* scroll hint */
.ms-hint {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 1;
  font-family: var(--ms-mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--ms-dim);
  transform: translateX(-50%);
  transition: opacity .8s ease;
  animation: ms-hint 4s ease-in-out infinite;
}
.ms-hint.is-gone { opacity: 0 !important; animation: none; }
@keyframes ms-hint { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- footer ---------- */

.ms-footer { padding: 40px var(--ms-pad) 44px; }
.ms-footer__in {
  max-width: var(--ms-maxw); margin: 0 auto;
  font-family: var(--ms-mono); font-size: 11px; letter-spacing: .08em; color: var(--ms-dim);
}

@media (max-width: 720px) {
  :root { --ms-nav-h: 60px; }
  .ms-sec { align-content: end; padding-bottom: 96px; }
  .ms-sec__body { max-width: none; }
  .ms-sec--right .ms-sec__body { margin-left: 0; }
  .ms-sec__title { font-size: clamp(26px, 7.6vw, 38px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ms-hint, .ms-ticks i.is-now { animation: none; }
  [data-reveal] { opacity: 1; filter: none; transform: none; transition: none; }
}
