@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #030807;
  --panel: #050b09;
  --line: rgba(76, 255, 183, .13);
  --line-strong: rgba(76, 255, 183, .30);
  --green: #35ffb0;
  --green-2: #0dbf83;
  --text: #f0f6f3;
  --muted: #81938d;
  --mono: "DM Mono", monospace;
  --sans: Inter, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--green); color: #03100a; }

.nav {
  height: 72px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 9, 7, .94);
  backdrop-filter: blur(12px);
}
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 28%;
  height: 1px;
  background: var(--green);
  opacity: .65;
  transform-origin: left;
  animation: nav-line 5s ease-in-out infinite;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand strong, .footer-brand strong { display: block; font-size: 20px; letter-spacing: .18em; }
.brand small, .footer-brand small {
  display: block;
  font: 12px 'DM Mono', monospace;
  letter-spacing: .12em;
  color: var(--dim);
  margin-top: 2px;
}

.brand:hover { background: var(--green); color: #04100a; transform: translateY(-1px); }
.nav nav { display: flex; gap: 27px; font: 10px 'DM Mono', monospace; color: var(--muted); }
.nav nav a { position: relative; padding: 6px 0; transition: color .2s ease; font-size: 16px;}
.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width .22s ease;
}
.nav nav a:hover, .nav nav a.active { color: var(--green); }
.nav nav a:hover::after, .nav nav a.active::after { width: 100%; }
.nav-link {
  font: 20px 'DM Mono', monospace;
  color: var(--green);
  border: 1px solid #397a60;
  padding: 9px 12px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-link:hover { background: var(--green); color: #04100a; border-color: var(--green); }
.menu { display: none; background: none; border: 0; color: var(--green); font: 15px 'DM Mono', monospace; }

.methodology {
  position: relative;
  min-height: 900px;
  padding: 86px clamp(24px, 7vw, 110px);
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 45%, rgba(0, 255, 170, .045), transparent 30%),
    linear-gradient(180deg, #030706 0%, #020504 100%);
}

.methodology::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(70,255,180,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,255,180,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.method-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 60px;
}

.eyebrow, .step-label, .index-title {
  font: 500 10px var(--mono);
  letter-spacing: .28em;
  color: var(--green);
}

h1 {
  margin: 14px 0 14px;
  font-size: clamp(44px, 5.3vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
}
h1 span { color: var(--green); }
.method-header p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.method-index {
  width: 245px;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font: 10px var(--mono);
  letter-spacing: .12em;
  color: #566963;
}
.method-index .index-title { margin-bottom: 6px; }
.method-index .active { color: var(--green); }

.method-map {
  position: relative;
  height: 260px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  column-gap: 20px;
}

.flow-lines {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  width: 100%;
  height: 170px;
  overflow: visible;
}
.flow-base {
  fill: none;
  stroke: rgba(70,255,180,.11);
  stroke-width: 1;
}
.flow-active {
  fill: none;
  stroke: url(#flowGradient);
  stroke-width: 1.5;
  stroke-dasharray: 8 14;
  filter: url(#glow);
  animation: dash 2.6s linear infinite;
}

@keyframes dash { to { stroke-dashoffset: -88; } }

.phase {
  position: relative;
  z-index: 3;
  text-align: center;
  cursor: pointer;
  transition: transform .35s ease;
}
.phase:hover, .phase.active { transform: translateY(-5px); }

.node {
  width: 86px;
  height: 86px;
  margin: 0 auto 17px;
  border: 1px solid rgba(53,255,176,.42);
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: rgba(2, 10, 8, .9);
  box-shadow: 0 0 0 8px rgba(53,255,176,.018), 0 0 35px rgba(53,255,176,.08);
}
.node::before, .node::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(53,255,176,.22);
  border-radius: 50%;
  inset: -9px;
}
.node::after { inset: -18px; border-color: rgba(53,255,176,.07); }
.pulse-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--green);
  opacity: 0;
}
.active .pulse-ring {
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.92); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.node-icon {
  color: var(--green);
  font: 500 22px var(--mono);
  text-shadow: 0 0 12px rgba(53,255,176,.65);
}
.phase-no {
  display: block;
  color: var(--green);
  font: 9px var(--mono);
  margin-bottom: 7px;
}
.phase h3 {
  margin: 0 0 7px;
  font-size: 15px;
}
.phase p {
  margin: 0 auto;
  max-width: 150px;
  color: #6f807a;
  font-size: 11px;
  line-height: 1.5;
}

.detail-map {
  position: relative;
  z-index: 2;
  min-height: 350px;
  border: 1px solid var(--line);
  background: rgba(3, 10, 8, .68);
  display: grid;
  grid-template-columns: minmax(280px, .7fr) 1.7fr;
  overflow: hidden;
}
.detail-map::before, .detail-map::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--green);
  border-style: solid;
  opacity: .8;
}
.detail-map::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.detail-map::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

.detail-copy {
  padding: 42px 45px;
  border-right: 1px solid var(--line);
}
.detail-copy h2 {
  margin: 10px 0 12px;
  font-size: 26px;
  letter-spacing: -.035em;
}
.detail-copy p {
  color: #8b9b96;
  line-height: 1.7;
  font-size: 12px;
  max-width: 390px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}
.detail-tags span {
  border: 1px solid rgba(53,255,176,.18);
  padding: 7px 9px;
  color: #80a59a;
  font: 9px var(--mono);
  letter-spacing: .06em;
}

.technical-canvas {
  position: relative;
  min-height: 350px;
  overflow: hidden;
}
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53,255,176,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,255,176,.045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle, black 20%, transparent 82%);
}
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(transparent, var(--green), transparent);
  box-shadow: 0 0 18px var(--green);
  opacity: .35;
  animation: scan 5s linear infinite;
}
@keyframes scan { from { left: 0; } to { left: 100%; } }

.source {
  position: absolute;
  left: 7%;
  width: 105px;
  height: 31px;
  border: 1px solid rgba(53,255,176,.2);
  display: grid;
  place-items: center;
  color: #6e988a;
  font: 9px var(--mono);
  background: rgba(3, 15, 11, .85);
}
.source-a { top: 55px; }
.source-b { top: 118px; }
.source-c { top: 181px; }
.source-d { top: 244px; }

.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-path {
  fill: none;
  stroke: rgba(53,255,176,.45);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  animation: mapDash 1.8s linear infinite;
}
@keyframes mapDash { to { stroke-dashoffset: -48; } }

.core {
  position: absolute;
  left: 47%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 105px;
  height: 105px;
  display: grid;
  place-items: center;
}
.core-globe {
  width: 60px;
  height: 60px;
  border: 1px solid var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 29px;
  box-shadow: 0 0 30px rgba(53,255,176,.15);
}
.core span {
  position: absolute;
  top: 115px;
  white-space: nowrap;
  font: 8px var(--mono);
  color: #55776d;
  letter-spacing: .12em;
}
.core-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(53,255,176,.2);
  border-radius: 50%;
}
.orbit-1 { transform: rotate(28deg) scaleX(1.7); animation: orbit 5s linear infinite; }
.orbit-2 { transform: rotate(-28deg) scaleX(1.7); animation: orbit 7s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(388deg) scaleX(1.7); } }

.target-stack {
  position: absolute;
  left: 68%;
  top: 43%;
  width: 90px;
  height: 70px;
  transform: translate(-50%, -50%);
  text-align: center;
}
.stack-layer {
  position: absolute;
  left: 15px;
  width: 60px;
  height: 24px;
  border: 1px solid rgba(53,255,176,.45);
  transform: skewY(-28deg);
  background: rgba(53,255,176,.035);
}
.stack-layer:nth-child(1) { top: 0; }
.stack-layer:nth-child(2) { top: 14px; }
.stack-layer:nth-child(3) { top: 28px; }
.target-stack span {
  position: absolute;
  top: 73px;
  left: 0;
  right: 0;
  font: 8px var(--mono);
  color: #52786d;
  letter-spacing: .16em;
}

.surface-card {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 165px;
  min-height: 155px;
  padding: 18px 17px;
  border: 1px solid rgba(53,255,176,.3);
  background: rgba(3, 12, 9, .86);
  display: flex;
  flex-direction: column;
  gap: 10px;
  clip-path: polygon(0 0, 88% 0, 100% 14%, 100% 100%, 0 100%);
}
.surface-title {
  color: var(--green);
  font: 9px var(--mono);
  letter-spacing: .14em;
  margin-bottom: 4px;
}
.surface-card span:not(.surface-title) {
  color: #6e8981;
  font: 8px var(--mono);
}

@media (max-width: 850px) {
  .method-header { flex-direction: column; }
  .method-index { width: 100%; }
  .method-map { overflow-x: auto; grid-template-columns: repeat(5, 190px); padding-bottom: 20px; }
  .flow-lines { width: 950px; }
  .detail-map { grid-template-columns: 1fr; }
  .detail-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .technical-canvas { min-height: 340px; }
}

/* =========================================================
   MOBILE-ONLY ADAPTATION
   Desktop styles above remain unchanged.
   ========================================================= */
@media (max-width: 850px) {
  .methodology {
    min-height: auto;
    padding: 58px 18px 64px;
  }

  .method-header {
    gap: 32px;
    margin-bottom: 42px;
  }

  h1 {
    font-size: clamp(39px, 11vw, 58px);
    line-height: .98;
  }

  .method-header p {
    max-width: 100%;
    font-size: 13px;
  }

  .method-index {
    width: 100%;
    padding: 15px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-strong);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 18px;
  }

  .method-index .index-title {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  /* Replace the desktop horizontal timeline with a clean mobile stack. */
  .method-map {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    padding: 0 0 12px;
  }

  .flow-lines {
    display: none;
  }

  .phase {
    min-height: 105px;
    width: 100%;
    padding: 0 0 0 92px;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
  }

  .phase::after {
    content: "";
    position: absolute;
    left: 42px;
    top: 73px;
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, var(--green-2), transparent);
  }

  .phase:last-child::after {
    display: none;
  }

  .node {
    position: absolute;
    left: 0;
    top: 50%;
    width: 70px;
    height: 70px;
    margin: 0;
    transform: translateY(-50%);
  }

  .node::before { inset: -7px; }
  .node::after { inset: -13px; }

  .node-icon {
    font-size: 18px;
  }

  .phase-no {
    margin: 0 0 4px;
    font-size: 8px;
  }

  .phase h3 {
    margin: 0 0 4px;
    font-size: 14px;
  }

  .phase p {
    margin: 0;
    max-width: none;
    font-size: 10px;
  }

  /* Technical map becomes a readable mobile diagram rather than shrinking. */
  .detail-map {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .detail-copy {
    padding: 28px 22px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-copy h2 {
    font-size: 23px;
  }

  .detail-copy p {
    max-width: none;
    font-size: 11px;
  }

  .detail-tags {
    margin-top: 19px;
  }

  .detail-tags span {
    padding: 6px 8px;
    font-size: 8px;
  }

  .technical-canvas {
    min-height: 390px;
    height: 390px;
  }

  /* Keep the map's proportions while giving each element room to breathe. */
  .source {
    left: 5%;
    width: 84px;
    height: 28px;
    font-size: 8px;
  }

  .source-a { top: 54px; }
  .source-b { top: 112px; }
  .source-c { top: 170px; }
  .source-d { top: 228px; }

  .core {
    left: 48%;
    top: 52%;
    width: 88px;
    height: 88px;
  }

  .core-globe {
    width: 52px;
    height: 52px;
    font-size: 23px;
  }

  .core span {
    top: 98px;
    font-size: 7px;
  }

  .target-stack {
    left: 69%;
    top: 45%;
    transform: translate(-50%, -50%) scale(.82);
  }

  .surface-card {
    right: 3%;
    top: auto;
    bottom: 22px;
    transform: none;
    width: 135px;
    min-height: 125px;
    padding: 13px 12px;
    gap: 7px;
  }

  .surface-title {
    font-size: 8px;
  }

  .surface-card span:not(.surface-title) {
    font-size: 7px;
  }
}

@media (max-width: 480px) {
  .methodology {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 39px;
  }

  .method-index {
    font-size: 9px;
  }

  .phase {
    min-height: 96px;
    padding-left: 83px;
  }

  .node {
    width: 62px;
    height: 62px;
  }

  .phase::after {
    left: 37px;
    top: 67px;
    height: 29px;
  }

  .technical-canvas {
    height: 370px;
    min-height: 370px;
  }

  .source {
    left: 4%;
    width: 73px;
    height: 26px;
    font-size: 7px;
  }

  .source-a { top: 45px; }
  .source-b { top: 96px; }
  .source-c { top: 147px; }
  .source-d { top: 198px; }

  .core {
    left: 46%;
    top: 45%;
    transform: translate(-50%, -50%) scale(.82);
  }

  .target-stack {
    left: 66%;
    top: 40%;
    transform: translate(-50%, -50%) scale(.68);
  }

  .surface-card {
    right: 3%;
    bottom: 17px;
    width: 122px;
    min-height: 116px;
    padding: 11px 10px;
  }

  .surface-card span:not(.surface-title) {
    font-size: 6.5px;
  }
}

@media (max-width: 360px) {
  .method-index {
    grid-template-columns: 1fr;
  }

  .technical-canvas {
    height: 355px;
    min-height: 355px;
  }

  .source {
    left: 3%;
    width: 68px;
  }

  .core {
    left: 43%;
    transform: translate(-50%, -50%) scale(.74);
  }

  .target-stack {
    left: 63%;
    transform: translate(-50%, -50%) scale(.6);
  }

  .surface-card {
    width: 108px;
  }
}

@media (max-width: 900px) {
  .nav { padding: 0 5%; }
  .nav nav { display: none; position: absolute; top: 71px; left: 5%; right: 5%; padding: 12px 15px; background: rgba(5,9,7,.98); border: 1px solid var(--line); flex-direction: column; gap: 0; }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .menu { display: block; }
  .nav-link { display: none; }}
  footer { padding: 22px 5%; flex-wrap: wrap; }
  .footer-links { order: 3; width: 100%; margin: 0; }
}

@media (max-width: 600px) {
  .brand small, .footer-brand small { display: none; }
  .hero h1 { font-size: 47px; }
  .lead { font-size: 14px; }
  .footer-links { gap: 14px; }
  .footer-links a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

