/* Mekavix brand refinement: five chapters, one visual language, restrained motion. */

html { background: #050f20; }
body { overflow-x: hidden; }

::selection {
  background: rgba(0, 119, 255, .2);
  color: inherit;
}

h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Navigation */
.site-header {
  padding: 0;
  background: rgba(255, 255, 255, .84);
  border-bottom: 1px solid rgba(13, 27, 61, .07);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.nav-shell,
.site-header.scrolled .nav-shell {
  min-height: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand img { width: 176px; }
.nav-links { gap: 26px; }
.nav-links a {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: -.01em;
  color: rgba(13, 27, 61, .72);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--navy); }
.nav-contact { padding: 0; background: transparent; }

/* Hero */
.hero {
  min-height: 100svh;
  background:
    radial-gradient(circle at 72% 24%, rgba(0, 119, 255, .14), transparent 34%),
    radial-gradient(circle at 46% 86%, rgba(0, 182, 122, .09), transparent 31%),
    linear-gradient(180deg, #051328 0%, #071a36 62%, #08223f 100%);
}

.hero-content {
  max-width: 1120px;
  padding: 152px 0 132px;
  text-align: left;
}

.hero .eyebrow {
  margin-bottom: 28px;
  color: rgba(226, 239, 250, .66);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .14em;
}

.hero h1 {
  max-width: 1080px;
  margin: 0 0 34px;
  font-size: clamp(4rem, 7.1vw, 7rem);
  line-height: 1.03;
  font-weight: 600;
  letter-spacing: -.055em;
}

.hero h1 span {
  background: linear-gradient(90deg, #7cc6ff 0%, #51dfb7 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 780px;
  margin: 0 0 30px;
  color: rgba(222, 233, 244, .72);
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  line-height: 1.58;
}

.hero-text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #79c4ff;
  font-size: 16px;
  font-weight: 560;
  text-decoration: none;
}
.hero-text-link span {
  display: inline-block;
  transition: transform .22s ease;
}
.hero-text-link:hover span,
.hero-text-link:focus-visible span { transform: translateY(3px); }

.hero-visual { opacity: .9; }
.glow { filter: blur(34px); }
.glow-blue {
  width: 45vw;
  height: 45vw;
  right: -16vw;
  top: 8vh;
  opacity: .5;
  animation: heroGlowBlue 18s ease-in-out infinite alternate;
}
.glow-green {
  width: 31vw;
  height: 31vw;
  right: 22vw;
  bottom: -19vw;
  opacity: .48;
  animation: heroGlowGreen 22s ease-in-out infinite alternate;
}
.river-line {
  height: 260px;
  border-top-color: rgba(103, 188, 255, .14);
  filter: none;
  animation: riverDrift 16s ease-in-out infinite alternate;
}
.river-one { bottom: 3%; }
.river-two {
  bottom: -3%;
  border-top-color: rgba(71, 221, 176, .11);
  animation-duration: 21s;
}

@keyframes heroGlowBlue {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 12px, 0) scale(1.04); }
}
@keyframes heroGlowGreen {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, -10px, 0) scale(1.05); }
}
@keyframes riverDrift {
  from { translate: 0 0; }
  to { translate: 18px -5px; }
}

/* Problem chapter */
.problem {
  padding: 150px 0;
  background: #fff;
}

.problem-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 96px;
  align-items: center;
}

.problem-copy { max-width: 620px; }
.problem h2 {
  margin-bottom: 34px;
  font-size: clamp(3rem, 5.2vw, 5.25rem);
  line-height: 1.01;
  font-weight: 600;
  letter-spacing: -.052em;
}
.problem h2 span { color: #667185; }
.problem-copy > p {
  max-width: 570px;
  color: #667185;
  font-size: clamp(1.06rem, 1.35vw, 1.2rem);
  line-height: 1.67;
}
.problem-thesis {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(13, 27, 61, .1);
  color: #26374f !important;
}
.problem-thesis strong { color: var(--navy); font-weight: 620; }

/* Signature visual: water → signal → understanding */
.signal-scene {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 182, 122, .11), transparent 26%),
    radial-gradient(circle at 82% 74%, rgba(0, 119, 255, .12), transparent 29%),
    linear-gradient(155deg, #eef8f4 0%, #edf4f8 52%, #e9f1f8 100%);
  isolation: isolate;
}
.signal-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 27, 61, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 27, 61, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 80%, transparent);
  opacity: .55;
}

.signal-water,
.signal-sensors,
.signal-data { position: absolute; inset: 0; }

.wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 180px;
  border: 1px solid transparent;
  border-top-color: rgba(0, 119, 255, .16);
  border-radius: 50%;
}
.wave-a { top: 23%; transform: rotate(-3deg); animation: signalWave 13s ease-in-out infinite alternate; }
.wave-b { top: 34%; transform: rotate(2deg); border-top-color: rgba(0, 182, 122, .16); animation: signalWave 17s ease-in-out infinite alternate-reverse; }
.wave-c { top: 45%; transform: rotate(-1deg); border-top-color: rgba(13, 27, 61, .08); animation: signalWave 21s ease-in-out infinite alternate; }

@keyframes signalWave {
  from { translate: -8px 0; scale: 1; }
  to { translate: 16px -4px; scale: 1.015; }
}

.sensor {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--emerald);
  box-shadow: 0 0 0 7px rgba(0, 182, 122, .06), 0 10px 26px rgba(13, 27, 61, .08);
  animation: sensorPulse 4.5s ease-in-out infinite;
}
.s1 { left: 22%; top: 30%; }
.s2 { left: 43%; top: 41%; animation-delay: .7s; border-color: var(--ocean); }
.s3 { left: 65%; top: 27%; animation-delay: 1.3s; }
.s4 { left: 75%; top: 54%; animation-delay: 2s; border-color: var(--ocean); }

@keyframes sensorPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.trace {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(0, 119, 255, .5), rgba(0, 182, 122, .45), transparent);
  opacity: .55;
}
.trace-a { left: 18%; right: 14%; top: 68%; transform: rotate(-7deg); }
.trace-b { left: 26%; right: 22%; top: 73%; transform: rotate(5deg); opacity: .38; }
.trace-c { left: 34%; right: 18%; top: 79%; transform: rotate(-2deg); opacity: .28; }

.signal-labels {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(13, 27, 61, .42);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Approach chapter */
.approach {
  padding: 148px 0 140px;
  color: #f5f9fd;
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 119, 255, .11), transparent 25%),
    radial-gradient(circle at 14% 88%, rgba(0, 182, 122, .08), transparent 28%),
    #07152f;
}

.approach-heading {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}
.approach-heading h2 {
  margin-bottom: 28px;
  font-size: clamp(3rem, 5.2vw, 5.2rem);
  line-height: 1.01;
  font-weight: 600;
}
.approach-heading h2 span {
  background: linear-gradient(90deg, #74c2ff, #4ce1b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.approach-heading > p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(224, 235, 246, .64);
  font-size: 1.08rem;
  line-height: 1.65;
}

.approach-words {
  list-style: none;
  max-width: 1120px;
  margin: 88px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.approach-words li {
  min-height: 190px;
  padding: 26px 28px 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,.1);
}
.approach-words li:not(:first-child) { padding-left: 28px; }
.approach-words li:last-child { border-right: 0; }
.approach-words strong {
  color: #f7fbff;
  font-size: clamp(2rem, 2.7vw, 2.8rem);
  line-height: 1;
  font-weight: 580;
  letter-spacing: -.045em;
}
.approach-words span {
  max-width: 190px;
  color: rgba(216, 229, 241, .5);
  font-size: .94rem;
  line-height: 1.5;
}

/* Current chapter */
.now {
  padding: 145px 0;
  background: #f5f5f7;
}
.now-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 90px;
  align-items: end;
  padding: 58px;
  border-radius: 36px;
  background: #fff;
}
.now-copy { max-width: 760px; }
.now-copy h2 {
  margin-bottom: 30px;
  font-size: clamp(3rem, 4.9vw, 5rem);
  line-height: 1.01;
  font-weight: 600;
}
.now-copy h2 span { color: #006fd8; }
.now-copy > p {
  max-width: 700px;
  color: #667185;
  font-size: 1.08rem;
  line-height: 1.66;
}
.now-copy > p:first-of-type {
  color: #26374f;
  font-size: clamp(1.18rem, 1.55vw, 1.4rem);
}

.now-mark {
  min-height: 280px;
  padding: 26px 0 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid rgba(13, 27, 61, .1);
}
.now-index {
  color: #9aa6b5;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .16em;
}
.now-mark div { display: flex; flex-direction: column; gap: 8px; }
.now-mark small {
  color: #008d65;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.now-mark strong {
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.25;
}
.now-mark div > span:last-child { color: #7b8798; font-size: .92rem; }

/* Mekong brand moment + contact */
.origin {
  position: relative;
  overflow: hidden;
  padding: 160px 0 132px;
  color: #f5f9fd;
  background:
    radial-gradient(circle at 15% 100%, rgba(0, 182, 122, .14), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(0, 119, 255, .14), transparent 28%),
    linear-gradient(160deg, #041020, #07152f 58%, #08233f);
}
.origin-ambient { position: absolute; inset: 0; pointer-events: none; }
.origin-ambient span {
  position: absolute;
  left: -8%;
  width: 116%;
  height: 210px;
  border-radius: 50%;
  border-top: 1px solid rgba(116, 194, 255, .12);
  animation: originDrift 18s ease-in-out infinite alternate;
}
.origin-ambient span:first-child { bottom: 12%; transform: rotate(-3deg); }
.origin-ambient span:last-child {
  bottom: 3%;
  transform: rotate(3deg);
  border-top-color: rgba(76, 225, 178, .1);
  animation-duration: 23s;
}
@keyframes originDrift {
  from { translate: -8px 0; }
  to { translate: 18px -5px; }
}

.origin-inner {
  position: relative;
  z-index: 1;
  max-width: 1020px;
}
.origin h2 {
  max-width: 960px;
  margin-bottom: 32px;
  font-size: clamp(3.2rem, 5.7vw, 5.8rem);
  line-height: 1.01;
  font-weight: 600;
}
.origin h2 span {
  background: linear-gradient(90deg, #76c4ff, #4ce1b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.origin-inner > p:not(.eyebrow):not(.origin-closing) {
  max-width: 760px;
  color: rgba(220, 232, 244, .68);
  font-size: 1.13rem;
  line-height: 1.68;
}
.origin-closing {
  margin-top: 48px;
  color: #f6f9fd !important;
  font-size: clamp(1.45rem, 2.1vw, 2rem) !important;
  line-height: 1.35 !important;
  font-weight: 580;
  letter-spacing: -.025em;
}
.contact-line {
  margin-top: 76px;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.contact-line > span {
  color: rgba(220, 232, 244, .58);
  font-size: .95rem;
}
.contact-line a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #79c4ff;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 560;
  text-decoration: none;
}
.contact-line a span { transition: transform .2s ease; }
.contact-line a:hover span,
.contact-line a:focus-visible span { transform: translate(2px, -2px); }

.site-footer {
  padding: 28px 0;
  background: #041020;
}

.reveal {
  transform: translateY(14px);
  transition-duration: .68s;
}

@media (max-width: 980px) {
  :root { --shell: min(100% - 36px, 1180px); }
  .brand img { width: 164px; }

  .hero-content { padding-top: 138px; padding-bottom: 112px; }
  .problem { padding: 112px 0; }
  .problem-layout { grid-template-columns: 1fr; gap: 60px; }
  .problem-copy { max-width: 760px; }
  .signal-scene { min-height: 500px; }

  .approach { padding: 112px 0; }
  .approach-words { grid-template-columns: repeat(2, 1fr); }
  .approach-words li:nth-child(2) { border-right: 0; }
  .approach-words li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.1); }
  .approach-words li:nth-child(3) { padding-left: 0; }

  .now { padding: 112px 0; }
  .now-layout { grid-template-columns: 1fr; gap: 54px; padding: 46px; }
  .now-mark {
    min-height: 0;
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(13, 27, 61, .1);
    flex-direction: row;
    align-items: flex-end;
    gap: 28px;
  }

  .origin { padding: 122px 0 108px; }
}

@media (max-width: 640px) {
  :root { --shell: calc(100vw - 28px); }

  .nav-shell { min-height: 50px; }
  .brand img { width: 154px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(:last-child) { display: none; }

  .hero { min-height: 94svh; }
  .hero-content { padding-top: 116px; padding-bottom: 94px; }
  .hero .eyebrow { margin-bottom: 22px; font-size: 10px; }
  .hero h1 {
    font-size: clamp(3.05rem, 14vw, 4.35rem);
    line-height: 1.045;
    letter-spacing: -.05em;
  }
  .hero-lead { font-size: 1.02rem; line-height: 1.58; }
  .hero-text-link { font-size: 15px; }

  .problem { padding: 90px 0; }
  .problem h2 {
    font-size: clamp(2.55rem, 11vw, 3.7rem);
    line-height: 1.03;
  }
  .problem-copy > p { font-size: 1rem; }
  .signal-scene { min-height: 390px; border-radius: 26px; }
  .signal-labels { left: 22px; right: 22px; bottom: 20px; font-size: 8px; }

  .approach { padding: 94px 0 90px; }
  .approach-heading h2 {
    font-size: clamp(2.55rem, 11vw, 3.75rem);
    line-height: 1.03;
  }
  .approach-heading > p:last-child { font-size: 1rem; }
  .approach-words {
    margin-top: 54px;
    grid-template-columns: 1fr;
    border-top: 0;
  }
  .approach-words li,
  .approach-words li:not(:first-child),
  .approach-words li:nth-child(3) {
    min-height: 126px;
    padding: 22px 0;
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .approach-words li:first-child { border-top: 0; }
  .approach-words strong { font-size: 2.15rem; }
  .approach-words span { max-width: none; }

  .now { padding: 90px 0; }
  .now-layout { padding: 28px; border-radius: 26px; gap: 44px; }
  .now-copy h2 {
    font-size: clamp(2.5rem, 10.6vw, 3.65rem);
    line-height: 1.03;
  }
  .now-copy > p { font-size: 1rem; }
  .now-copy > p:first-of-type { font-size: 1.1rem; }
  .now-mark { align-items: flex-start; flex-direction: column; }

  .origin { padding: 96px 0 84px; }
  .origin h2 {
    font-size: clamp(2.75rem, 11.5vw, 4rem);
    line-height: 1.03;
  }
  .origin-inner > p:not(.eyebrow):not(.origin-closing) { font-size: 1rem; }
  .origin-closing { margin-top: 38px; font-size: 1.35rem !important; }
  .contact-line {
    margin-top: 56px;
    align-items: flex-start;
    flex-direction: column;
  }
  .contact-line a { font-size: 1.18rem; word-break: break-word; }

  .footer-layout,
  .footer-brand { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-blue,
  .glow-green,
  .river-line,
  .wave,
  .sensor,
  .origin-ambient span { animation: none !important; }
  .hero-text-link span,
  .contact-line a span { transition: none; }
}