/* Mild Solt — top page
 * One 3D model sits on the paper and travels the page (see top.js).
 * Section titles are small labels; the size goes to the model and the work. */

:root {
  --ms-maxw: 1360px;
  --ms-dark: #121214;
  --ms-dark-2: #171719;
}

/* ---------- backdrop: the faint circuit board, behind everything ---------- */

.ms-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}
html.ms-bg-ready .ms-bg { opacity: 1; }
html.lt-motion-off .ms-bg { display: none; }
@media (prefers-reduced-motion: reduce) { .ms-bg { display: none; } }
.lucid-top main, .lucid-top .lt-footer { position: relative; z-index: 1; }

/* ---------- stage (fixed canvas behind nothing, above the paper) ---------- */

.ms-stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}
html.ms-scene-ready .ms-stage { opacity: 1; }
html.lt-motion-off .ms-stage { display: none; }
@media (prefers-reduced-motion: reduce) { .ms-stage { display: none; } }

.ms-poster {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(80%, 64vh);
  height: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.7s ease;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55));
}
html.ms-scene-ready:not(.lt-motion-off) .ms-poster { opacity: 0; }
@media (prefers-reduced-motion: reduce) { html.ms-scene-ready .ms-poster { opacity: 1; } }

/* ---------- veil: closes over the page before a link opens ---------- */

.ms-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--paper);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: clip-path 0.42s var(--ease);
}
.ms-veil.is-in { clip-path: inset(0); }

/* ---------- cursor (fine pointers only) ---------- */

.ms-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  pointer-events: none;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.3s;
}
.ms-cursor.is-on { opacity: 1; }
.ms-cursor i {
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform 0.35s var(--ease), border-color 0.3s;
}
.ms-cursor i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: currentColor;
}
.ms-cursor span {
  position: absolute;
  left: 22px;
  top: -7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.ms-cursor.has-label i { transform: scale(1.7); }
.ms-cursor.has-label span { opacity: 1; }

/* ---------- section index (left rail) ---------- */

.ms-index {
  position: fixed;
  left: 22px;
  top: 50%;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}
.ms-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(242, 241, 238, 0.4);
  text-decoration: none;
  transition: color 0.3s;
}
.ms-index a::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease);
}
.ms-index a span { font-size: 10px; }
.ms-index a em { display: none; font-style: normal; }
.ms-index a:hover em { display: inline; }
.ms-index a:hover, .ms-index a.is-current { color: var(--ink); }
.ms-index a.is-current::before { width: 26px; }
@media (min-width: 1280px) { .ms-index { display: flex; } }

/* ---------- shared ---------- */

.ms-wrap {
  max-width: var(--ms-maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.ms-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.ms-section { position: relative; padding-block: clamp(72px, 9vw, 128px); }

.ms-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 40px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.ms-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ms-label span {
  margin-right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--clay);
}
.ms-note { margin: 0; max-width: 42em; font-size: 14px; color: var(--muted); }

.ms-marks { position: absolute; inset: 96px var(--gutter) 28px; pointer-events: none; }
.ms-marks i { position: absolute; width: 16px; height: 16px; border: 0 solid var(--line-strong); }
.ms-marks i:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.ms-marks i:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.ms-marks i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.ms-marks i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.ms-marks-light i { border-color: rgba(242, 241, 238, 0.35); }

/* ---------- hero ---------- */

.ms-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 112px 0 72px;
}
.ms-hero-grid { width: 100%; align-items: center; }
.ms-hero-copy { grid-column: 1 / span 6; grid-row: 1; position: relative; z-index: 2; }
.ms-hero-stage {
  grid-column: 7 / -1;
  grid-row: 1;
  position: relative;
  align-self: stretch;
  min-height: 70vh;
  touch-action: pan-y;
}
.ms-hero-fig {
  grid-column: 7 / -1;
  grid-row: 1;
  align-self: end;
  justify-self: start;
  position: relative;
  z-index: 2;
  margin: 0;
  pointer-events: none;
}
.ms-hero-fig figcaption {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.ms-fig-no { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--clay); }
.ms-fig-spec { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }

.ms-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--clay);
}
.ms-for { margin: 0; font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.ms-title {
  margin: 20px 0 0;
  font-size: clamp(21px, 2.1vw, 28px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.01em;
}
.ms-l { display: block; overflow: hidden; padding-bottom: 0.06em; }
.ms-l i { display: block; font-style: normal; }
html.js .ms-hero:not(.is-in) .ms-l i { opacity: 0; transform: translateY(105%); }
html.js .ms-hero.is-in .ms-l i { animation: msRise 0.9s var(--ease) both; }
.ms-l:nth-child(2) i { animation-delay: 0.08s !important; }
.ms-l:nth-child(3) i { animation-delay: 0.16s !important; }
@keyframes msRise {
  from { opacity: 0; transform: translateY(105%); }
  to { opacity: 1; transform: none; }
}
.ms-lead { max-width: 34em; margin: 22px 0 0; font-size: 15.5px; color: var(--ink); }
.ms-for, .ms-lead, .ms-row-body p, .ms-step p, .ms-step-get, .ms-contact-lead, .ms-play-lead, .ms-note { word-break: auto-phrase; }
.ms-hero .lt-cta-row { margin-top: 30px; }

.ms-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.ms-scroll-hint i { width: 1px; height: 34px; background: var(--line-strong); overflow: hidden; position: relative; }
.ms-scroll-hint i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--ink);
  animation: msDrip 1.8s var(--ease) infinite;
}
@keyframes msDrip { to { top: 100%; } }

/* magnet buttons move with the pointer; the shift is set by top.js */
[data-magnet] { will-change: transform; transition: transform 0.25s var(--ease), background-color 0.2s; }

@media (prefers-reduced-motion: reduce) { .ms-scroll-hint i::after { animation: none; } }

/* ---------- 01 services: three rows, the model changes stage beside them ---------- */

.ms-rows {
  width: 72%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.ms-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1.15fr) auto;
  gap: 4px 28px;
  padding: 40px 0 40px 6px;
  border-bottom: 1px solid var(--line);
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.ms-row.is-active, .ms-row:hover { transform: translateX(8px); }
.ms-row-no { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); padding-top: 6px; transition: color 0.3s; }
.ms-row.is-active .ms-row-no, .ms-row:hover .ms-row-no { color: var(--clay); }
.ms-row h3 { margin: 0; font-size: 20px; line-height: 1.4; }
.ms-row-q { margin: 8px 0 0; max-width: 20em; font-size: 14px; line-height: 1.8; color: var(--muted); }
.ms-row-body p { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.ms-row-tags { margin: 10px 0 0 !important; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); word-break: keep-all; }
.ms-row-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s;
}
.ms-row-link:hover { border-color: var(--ink); }
.ms-row-link span { transition: transform 0.25s var(--ease); }
.ms-row-link:hover span { transform: translateX(4px); }
.ms-after { width: 72%; margin: 26px 0 0; font-size: 14px; color: var(--muted); }
.ms-after .lt-text-link { margin-left: 14px; }

/* ---------- 02 works: a strip of big crops ---------- */

.ms-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.ms-work { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; }
.ms-work-shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.ms-work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease);
}
.ms-work:hover .ms-work-shot img { transform: scale(1.04); }
.ms-work-cap { display: grid; gap: 4px; padding: 18px 20px 20px; }
.ms-work-cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--clay); }
.ms-work-cap h3 { margin: 2px 0 0; font-size: 19px; line-height: 1.4; }
.ms-work-cap p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.ms-work-status { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.ms-work-status.is-live { color: var(--live); }
.ms-works-more { margin: 28px 0 0; }

/* ---------- 03 3DCG: the dark desk ---------- */

.ms-play {
  padding-block: clamp(72px, 9vw, 120px);
  background: var(--ms-dark);
  color: var(--ink);
  background-image: radial-gradient(rgba(242, 241, 238, 0.09) 1px, transparent 1.2px);
  background-size: 28px 28px;
}
.ms-play .ms-label { color: var(--ink); }
.ms-play .ms-label span { color: var(--apricot); }
.ms-play-grid { align-items: center; }
.ms-play-copy { grid-column: 1 / span 5; }
.ms-play-lead { margin: 0; max-width: 28em; font-size: 15.5px; line-height: 1.9; color: var(--ink); }
.ms-specs { display: grid; gap: 14px; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.ms-specs > div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.ms-specs dt { font-size: 12px; color: var(--muted); }
.ms-specs dd { margin: 0; font-family: var(--font-mono); font-size: 22px; font-variant-numeric: tabular-nums; }
.ms-specs dd small { margin-left: 8px; font-family: var(--font-jp); font-size: 12px; color: var(--muted); }
.ms-specs dd.ms-specs-text { font-family: var(--font-jp); font-size: 14px; }
.ms-stages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ms-models { margin: 26px 0 4px; }
.ms-models + .ms-specs { margin-top: 18px; }
.ms-stages button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(242, 241, 238, 0.28);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.ms-stages button span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; font-weight: 500; color: var(--apricot); }
.ms-stages button:hover { border-color: var(--ink); }
.ms-stages button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ms-stages button[aria-pressed="true"] span { color: #2f7a52; }
.ms-play-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.ms-play-more { margin: 26px 0 0; }
.ms-play .lt-text-link { border-color: rgba(242, 241, 238, 0.4); }
.ms-play .lt-text-link:hover { border-color: var(--ink); }
.ms-play-stage {
  grid-column: 6 / -1;
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 68vh;
  margin-left: auto;
  width: 100%;
}
.ms-play-stage .ms-poster { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5)); }
.ms-contact-stage { position: relative; }
.ms-contact-stage .ms-poster { width: min(62%, 48vh); }
.ms-play-stage .ms-marks { inset: 0; }
.ms-hit { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
.ms-hit:active { cursor: grabbing; }
.ms-play-ui {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.ms-turns { display: flex; gap: 6px; }
.ms-turns button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(242, 241, 238, 0.28);
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.6);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.ms-turns button:hover { border-color: var(--ink); }

/* ---------- 04 process: one line drawn across four steps ---------- */

.ms-steps-wrap { position: relative; }
.ms-steps-line { position: absolute; left: 0; top: -12px; width: 100%; height: 24px; }
.ms-steps-line path { fill: none; stroke: var(--apricot); stroke-width: 2; stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.ms-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 36px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.ms-step { position: relative; opacity: 0.42; transition: opacity 0.6s ease; }
.ms-step.is-on { opacity: 1; }
.ms-step::before {
  content: "";
  position: absolute;
  top: -41px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--apricot);
  background: var(--paper);
  transition: background-color 0.4s;
}
.ms-step.is-on::before { background: var(--apricot); }
.ms-step-no { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--clay); }
.ms-step-now { display: inline-block; margin-left: 10px; padding: 1px 9px; border-radius: 999px; background: var(--live-bg); color: var(--live); font-size: 11px; font-weight: 700; }
.ms-step h3 { margin: 10px 0 0; font-size: 18px; line-height: 1.5; }
.ms-step-get { display: block; margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.ms-step p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
html.lt-motion-off .ms-step { opacity: 1; }
html.lt-motion-off .ms-steps-line path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .ms-step { opacity: 1; } .ms-steps-line path { stroke-dashoffset: 0; } }

/* ---------- 05 faq ---------- */

.ms-faq-list { max-width: 860px; }

/* ---------- 06 contact ---------- */

.ms-contact { display: flex; align-items: center; min-height: 82svh; padding-bottom: clamp(100px, 12vw, 160px); }
.ms-contact > .ms-grid { width: 100%; align-items: center; }
.ms-contact-stage { grid-column: 1 / span 5; min-height: 56vh; }
.ms-contact-copy { grid-column: 6 / -1; }
.ms-contact-lead { max-width: 26em; margin: 20px 0 0; font-size: clamp(16px, 1.5vw, 19px); font-weight: 500; line-height: 1.9; }
.ms-contact .lt-cta-row { margin-top: 32px; }

/* ---------- responsive ---------- */

@media (max-width: 1079px) {
  .ms-hero-copy { grid-column: 1 / span 7; }
  .ms-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-hero-stage, .ms-hero-fig { grid-column: 8 / -1; }
  .ms-rows, .ms-after { width: 76%; }
  .ms-row { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 20px; }
  .ms-row-body { grid-column: 2; }
  .ms-row-link { grid-column: 2; justify-self: start; margin-top: 6px; }
  .ms-play-copy { grid-column: 1 / span 6; }
  .ms-play-stage { grid-column: 7 / -1; }
  .ms-contact-copy { grid-column: 4 / -1; }
}

@media (max-width: 767px) {
  .ms-hero { display: block; min-height: 0; padding: 84px 0 56px; }
  .ms-hero-grid { display: flex; flex-direction: column; }
  .ms-hero-stage { order: -1; min-height: 40svh; margin: 0 calc(var(--gutter) * -1); }
  .ms-hero-fig { margin: 6px 0 0; }
  .ms-hero-copy { margin-top: 18px; }
  .ms-title { font-size: clamp(27px, 7.2vw, 34px); }
  .ms-marks { inset: 80px var(--gutter) 20px; }
  .ms-scroll-hint { display: none; }
  .ms-rows, .ms-after { width: 100%; }
  .ms-row { grid-template-columns: 32px minmax(0, 1fr); padding-right: 0; }
  .ms-row.is-active, .ms-row:hover { transform: none; }
  .ms-work-grid { grid-template-columns: 1fr; }
  .ms-play-grid { display: flex; flex-direction: column; }
  .ms-play-stage { order: -1; max-height: none; margin: 0 0 64px; }
  .ms-play-ui { inset: auto 0 -52px 0; }
  .ms-play-copy .ms-head { margin-bottom: 20px; }
  .ms-steps { grid-template-columns: 1fr; gap: 26px; padding-top: 0; border-top: 0; }
  .ms-steps-line { display: none; }
  .ms-step { padding-left: 22px; opacity: 1; }
  .ms-step::before { top: 6px; }
  .ms-contact { min-height: 0; }
  .ms-contact > .ms-grid { display: block; }
  .ms-contact-stage { min-height: 42svh; }
}

@media (max-width: 480px) {
  .ms-row { padding-right: 18%; }
  .ms-specs > div { grid-template-columns: 1fr; gap: 2px; }
}
