/* =========================================================
   MUMAO TECH — Design for Remembering
   V1.2 · Dark-first Visual System
   HUMAN ORDER IN A DIGITAL UNIVERSE
   Precision · System · Structure · Motion · Space · Type
   ========================================================= */

:root {
  /* ---- Dark-first environment ---- */
  --bg: #080808;          /* primary background */
  --bg-raise: #0d0d0d;    /* slightly lifted panel */
  --ink: #F2F2EE;         /* primary text (never pure white) */
  --text: #DADAD5;        /* body paragraphs (soft off-white) */
  --gray: #8A8A86;        /* secondary text */
  --dim: #5A5A56;         /* tertiary / faint labels */

  /* ---- Structure lines (very low contrast) ---- */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* ---- Restrained cool accent (no AI purple-blue, no neon) ---- */
  --accent: #8FB8AC;            /* very low-saturation cool green-cyan */
  --accent-soft: rgba(143, 184, 172, 0.50);
  --accent-faint: rgba(143, 184, 172, 0.14);

  --maxw: 1160px;
  --gutter: clamp(1.5rem, 5vw, 5rem);

  --sans: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --mono: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace,
          "Menlo", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---------- Subtle structural grid (barely perceptible) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 112px 112px;
  -webkit-mask-image: radial-gradient(125% 95% at 50% 28%, #000 0%, rgba(0,0,0,0.55) 58%, transparent 100%);
          mask-image: radial-gradient(125% 95% at 50% 28%, #000 0%, rgba(0,0,0,0.55) 58%, transparent 100%);
}

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

.skip-link {
  position: absolute;
  left: -999px; top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

/* ---------- Nav (minimal, dark, light blur on scroll) ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.95rem, 2vw, 1.5rem) var(--gutter);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  color: var(--ink);
}

.lang-toggle {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lang-toggle:hover { color: var(--ink); border-color: var(--gray); }

/* ---------- Layout primitives ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5.5rem, 13vh, 10rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.statement {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.05rem + 2.2vw, 2.6rem);
  line-height: 1.28;
  letter-spacing: -0.005em;
  max-width: 17em;
  color: var(--ink);
}
.statement--emphasis {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  color: var(--ink);
}
.statement--single { max-width: 15em; }

.body {
  margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
  max-width: 34em;
  color: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.8;
}
.body--lede { color: var(--text); }

/* ---------- 1. HERO — digital space entrance ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(3rem, 1.4rem + 9.5vw, 8.5rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.hero-principle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 0.9rem + 1.7vw, 2.3rem);
  line-height: 1.3;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-top: clamp(1.4rem, 3.4vw, 2.4rem);
}
.hero-sub {
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--gray);
  max-width: 30em;
  letter-spacing: 0.02em;
  margin-top: clamp(1.1rem, 2.4vw, 1.8rem);
}
.scroll-hint {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(1.6rem, 4vh, 2.6rem);
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--line-2), transparent);
  z-index: 2;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  top: 0; left: -1.5px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gray);
  animation: drift 3.4s var(--ease) infinite;
}
@keyframes drift {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(42px); opacity: 0; }
}

/* ---------- Continuous line system ---------- */
.line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.line-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 30s linear infinite;
}
.line-path--faint {
  stroke: rgba(255, 255, 255, 0.06);
  animation-duration: 38s;
  animation-direction: reverse;
}
@keyframes draw {
  0%   { stroke-dashoffset: 2400; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -2400; }
}
.line-node { fill: var(--accent); opacity: 0.9; }
.line-node--halo { fill: var(--accent); opacity: 0.12; }

.line--spirit { z-index: 0; }
.line-path--spirit { stroke: rgba(255, 255, 255, 0.17); stroke-width: 1.4; }

/* ---------- Products as continuous scenes ---------- */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.project-text { max-width: 34em; }
.project-site {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--gray);
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}
.project-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: clamp(1.6rem, 3.6vw, 2.4rem);
}

.cta {
  display: inline-block;
  margin-top: clamp(2rem, 4vw, 2.8rem);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 0.25rem;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cta:hover { color: var(--accent); border-color: var(--accent); }

/* Scene panel */
.project-scene { position: relative; width: 100%; }
.scene-svg { width: 100%; height: auto; display: block; }
.scene-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.scene-path--accent {
  stroke: var(--accent);
  stroke-opacity: 0.55;
  stroke-width: 1.4;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: flow 32s linear infinite;
}
@keyframes flow {
  0%   { stroke-dashoffset: 1400; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1400; }
}
.scene-axis { stroke: rgba(255, 255, 255, 0.10); stroke-width: 1; }
.scene-tick { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
.scene-label {
  fill: rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
}
.scene-node { fill: rgba(255, 255, 255, 0.55); }
.scene-node--accent { fill: var(--accent); }

/* ---------- 6. BRAND SPIRIT — visual climax ---------- */
.spirit {
  position: relative;
  text-align: center;
  min-height: 82svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.spirit-title {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.8rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.spirit-small {
  position: relative;
  z-index: 2;
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--gray);
}

/* ---------- 7. FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(4rem, 9vh, 7rem) var(--gutter) clamp(2.5rem, 5vh, 3.5rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-top { margin-bottom: clamp(3rem, 7vw, 5rem); }
.footer-wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
  letter-spacing: 0.05em;
  color: var(--ink);
}
.footer-principle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  margin-top: 0.5rem;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
}
.footer-corp {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 2rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}
.corp-name { grid-column: 1 / -1; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); }
.corp-address { color: var(--gray); max-width: 30em; }
.corp-zip { color: var(--gray); }
.corp-email, .corp-products { display: flex; flex-direction: column; gap: 0.4rem; }
.corp-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.2rem;
}
.corp-products a, .corp-email a {
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.corp-products a:hover, .corp-email a:hover { color: var(--accent); border-color: var(--accent); }
.corp-zip:empty { display: none; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gray);
}

/* ---------- Restrained scroll reveal (JS-gated) ---------- */
.has-js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.has-js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; gap: clamp(1.8rem, 6vw, 3rem); }
  .project-text { order: 0; }
  .project-scene { order: 1; max-width: 520px; }
  .footer-corp { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav { padding: 0.85rem var(--gutter); }
  .wordmark { font-size: 0.82rem; letter-spacing: 0.2em; }
  .hero { min-height: 92svh; }
  .section { padding: clamp(4.5rem, 12vh, 7rem) var(--gutter); }
  .hero-title { font-size: clamp(2.6rem, 1.6rem + 10vw, 4.4rem); }
  .scroll-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line-path, .scene-path--accent { animation: none; stroke-dashoffset: 0; }
  .scroll-hint::after { animation: none; }
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
}
