:root {
  --harbour-night: #081a21;
  --deep-tide: #102b32;
  --deep-tide-soft: #17383f;
  --porcelain: #f3efe6;
  --mist: #a7b5b4;
  --pearl-jade: #1e736c;
  --jade-light: #57a89e;
  --aged-brass: #c4a164;
  --signal-clay: #b96545;
  --ink: #102027;
  --paper: #eee9df;
  --line-dark: rgba(243, 239, 230, 0.16);
  --line-light: rgba(16, 32, 39, 0.16);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: Inter, Arial, sans-serif;
  --shell: min(1240px, calc(100vw - 96px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--harbour-night);
  color: var(--porcelain);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

body.form-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  padding: 0 48px;
  border-bottom: 1px solid transparent;
  transition: background-color 240ms ease, border-color 240ms ease, height 240ms ease;
}

.site-header.is-scrolled {
  height: 70px;
  background: rgba(8, 26, 33, 0.92);
  border-bottom-color: var(--line-dark);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.19em;
  line-height: 1;
}

.wordmark-spark-o {
  display: inline-flex;
  width: 1.22em;
  height: 1.22em;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: -0.02em 0.12em 0 0.025em;
}

.wordmark-spark-o svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spark-trail {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: spark-write 1.1s cubic-bezier(0.3, 0.7, 0.25, 1) 180ms forwards;
}

.spark-trail-glow {
  stroke: rgba(196, 161, 100, 0.44);
  stroke-width: 9;
  filter: blur(4px);
}

.spark-trail-core {
  stroke: #f4d99e;
  stroke-width: 3.4;
  filter: drop-shadow(0 0 3px rgba(255, 222, 157, 0.9));
}

.spark-burst {
  fill: #f7d68e;
  stroke: #f7d68e;
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0;
  transform-origin: 77px 18px;
  animation: spark-finish 480ms ease-out 1.12s forwards;
}

.wordmark:hover .spark-burst {
  animation: spark-twinkle 650ms ease-in-out infinite alternate;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: rgba(243, 239, 230, 0.78);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--porcelain);
}

.nav-cta {
  padding: 10px 16px;
  border: 1px solid rgba(243, 239, 230, 0.38);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  margin: 6px auto;
  background: var(--porcelain);
  transition: transform 200ms ease;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-scrim,
.hero-grid {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -3;
  background-image: url("assets/atomode-harbour-hero.png");
  background-position: center center;
  background-size: cover;
  transform: scale(1.025);
  animation: hero-image-settle 1.8s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 20, 26, 0.98) 0%, rgba(6, 20, 26, 0.91) 27%, rgba(6, 20, 26, 0.5) 55%, rgba(6, 20, 26, 0.12) 78%),
    linear-gradient(0deg, rgba(6, 20, 26, 0.63), transparent 42%);
}

.hero-grid {
  z-index: -1;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(243, 239, 230, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 230, 0.08) 1px, transparent 1px);
  background-position: center;
  background-size: 12.5vw 12.5vw;
  mask-image: linear-gradient(90deg, black, transparent 65%);
}

.hero-content {
  align-self: center;
  width: min(760px, calc(100vw - 96px));
  margin-left: max(48px, calc((100vw - 1240px) / 2));
  padding: 108px 0 72px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--aged-brass);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.3;
}

.hero-brand {
  margin: 0;
  color: var(--porcelain);
  font-size: clamp(76px, 10vw, 164px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.78;
}

.hero-thesis {
  max-width: 650px;
  margin: 52px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 68px);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 1.04;
}

.typewriter-wrap {
  display: inline-flex;
  align-items: baseline;
  max-width: 100vw;
  vertical-align: bottom;
  white-space: nowrap;
}

.typewriter-text {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  vertical-align: bottom;
  white-space: nowrap;
  animation: typewriter-reveal 2.35s steps(33, end) 760ms forwards;
}

.typewriter-cursor {
  display: inline-block;
  width: 0.36em;
  height: 0.055em;
  margin-left: 0.1em;
  background: var(--aged-brass);
  color: transparent;
  font-size: 1em;
  line-height: 0;
  opacity: 0;
  transform: translateY(0.28em);
  animation: terminal-cursor 880ms steps(1, end) 3.15s infinite;
}

.typewriter-text--mobile {
  display: none;
}

.hero-thesis em {
  color: var(--aged-brass);
  font-style: normal;
}

.hero-copy {
  max-width: 590px;
  margin: 32px 0 0;
  color: rgba(243, 239, 230, 0.78);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--porcelain);
  color: var(--harbour-night);
}

.button-primary:hover {
  background: white;
}

.text-link {
  color: rgba(243, 239, 230, 0.76);
  font-size: 12px;
  font-weight: 500;
}

.text-link span {
  display: inline-block;
  margin-left: 8px;
  color: var(--aged-brass);
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateY(4px);
}

.hero-index {
  position: absolute;
  right: 48px;
  bottom: 30px;
  left: 48px;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(243, 239, 230, 0.2);
  color: rgba(243, 239, 230, 0.54);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.hero-reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-copy-reveal 800ms cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.hero-brand.hero-reveal { animation-delay: 120ms; }
.hero-thesis.hero-reveal { animation-delay: 260ms; }
.hero-copy.hero-reveal { animation-delay: 380ms; }
.hero-actions.hero-reveal { animation-delay: 500ms; }

.section-shell {
  width: var(--shell);
  margin: 0 auto;
}

.thesis-section {
  position: relative;
  padding: 160px 0 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.thesis-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 11vw;
  align-items: start;
}

.thesis-heading h2,
.section-intro h2,
.field-copy h2,
.engagement-title h2,
.contact-content h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 6.7vw, 94px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.thesis-body {
  padding-top: 38px;
}

.thesis-body p,
.section-intro > p:last-child,
.field-copy > p,
.engagement-title > p:last-child,
.contact-content > p {
  margin: 0;
  color: rgba(16, 32, 39, 0.7);
}

.thesis-body .lead {
  margin-bottom: 30px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.mode-shift {
  width: var(--shell);
  margin: 150px auto 0;
  padding: 38px 0 46px;
  border-top: 1px solid var(--line-light);
}

.mode-track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}

.mode-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.mode-label-left {
  color: rgba(16, 32, 39, 0.38);
}

.mode-label-right {
  color: var(--pearl-jade);
}

.mode-line {
  position: relative;
  display: block;
  height: 1px;
  overflow: visible;
  background: rgba(16, 32, 39, 0.18);
}

.mode-line i {
  position: absolute;
  top: -4px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--aged-brass);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(196, 161, 100, 0.14);
  transform: translateX(0);
  transition: transform 1.5s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.mode-shift.is-active .mode-line i {
  transform: translateX(calc(var(--mode-line-width, 700px) - 9px));
}

.mode-shift p {
  margin: 22px 0 0;
  color: rgba(16, 32, 39, 0.5);
  font-family: var(--serif);
  font-size: 18px;
}

.approach-section {
  padding: 160px 0;
  background: var(--harbour-night);
}

.section-intro {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  column-gap: 9vw;
  align-items: end;
  margin-bottom: 100px;
}

.section-intro .eyebrow {
  grid-column: 1 / -1;
}

.section-intro h2 {
  color: var(--porcelain);
}

.section-intro > p:last-child {
  max-width: 450px;
  padding-bottom: 7px;
  color: rgba(243, 239, 230, 0.62);
}

.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.process-list li {
  display: grid;
  grid-template-columns: 80px 0.85fr 1.2fr;
  gap: 24px;
  align-items: baseline;
  padding: 38px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: padding 220ms ease, color 220ms ease;
}

.process-list li:hover {
  padding-right: 22px;
  padding-left: 22px;
  color: white;
}

.process-number,
.output-label {
  color: var(--aged-brass);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.process-list h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 3vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.process-list p {
  max-width: 530px;
  margin: 0;
  color: rgba(243, 239, 230, 0.56);
}

.field-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 720px;
  background: var(--deep-tide);
}

.field-visual {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-right: 1px solid var(--line-dark);
  background:
    radial-gradient(circle at 43% 52%, rgba(30, 115, 108, 0.34), transparent 28%),
    linear-gradient(rgba(243, 239, 230, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 230, 0.04) 1px, transparent 1px),
    var(--harbour-night);
  background-size: auto, 64px 64px, 64px 64px, auto;
}

.field-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(196, 161, 100, 0.34);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.field-ring-one {
  width: 360px;
  height: 360px;
  animation: orbit-pulse 5s ease-in-out infinite;
}

.field-ring-two {
  width: 560px;
  height: 560px;
  border-color: rgba(243, 239, 230, 0.11);
}

.field-node {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 86px;
  height: 38px;
  padding: 0 14px;
  place-items: center;
  background: var(--paper);
  border-radius: 999px;
  color: var(--harbour-night);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 8px rgba(243, 239, 230, 0.06);
}

.node-hk { top: 58%; left: 24%; background: var(--aged-brass);color: var(--harbour-night);}
.node-macau { top: 72%; left: 31%; }
.node-zhuhai { top: 69%; left: 44%; background: rgba(243, 239, 230, 0.82); }
.node-zhongshan { top: 56%; left: 48%; background: rgba(243, 239, 230, 0.82); }
.node-jiangmen { top: 77%; left: 56%; background: rgba(243, 239, 230, 0.82); }
.node-foshan { top: 42%; left: 34%; background: rgba(243, 239, 230, 0.82); }
.node-guangzhou { top: 27%; left: 45%; background: var(--aged-brass); }
.node-zhaoqing { top: 31%; left: 17%; background: rgba(243, 239, 230, 0.82); }
.node-huizhou { top: 41%; left: 69%; background: rgba(243, 239, 230, 0.82); }
.node-dongguan { top: 50%; left: 63%; background: var(--pearl-jade); color: white; }
.node-shenzhen { top: 61%; left: 69%; background: var(--aged-brass); }

.field-route {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--aged-brass), var(--pearl-jade));
  transform-origin: left center;
}

.route-one { top: 58%; left: 32%; width: 260px; transform: rotate(-26deg); }
.route-two { top: 42%; left: 59%; width: 180px; transform: rotate(57deg); }

.field-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px max(48px, calc((100vw - 1240px) / 2));
}

.field-copy h2 {
  max-width: 620px;
  color: var(--porcelain);
  font-size: clamp(48px, 5.4vw, 78px);
}

.field-copy > p {
  max-width: 570px;
  margin-top: 32px;
  color: rgba(243, 239, 230, 0.62);
}

.geography-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  color: rgba(243, 239, 230, 0.42);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.engagement-section {
  padding: 160px 0 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.engagement-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 11vw;
}

.engagement-title h2 {
  max-width: 600px;
}

.engagement-title > p:last-child {
  max-width: 530px;
  margin-top: 30px;
}

.engagement-output {
  padding-top: 15px;
}

.engagement-output ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-light);
}

.engagement-output li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 10px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--serif);
  font-size: 21px;
}

.engagement-output li span {
  color: var(--pearl-jade);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.sector-strip {
  display: flex;
  width: max-content;
  gap: 70px;
  margin-top: 130px;
  padding: 24px 0;
  border-top: 1px solid var(--line-light);
  color: rgba(16, 32, 39, 0.45);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  white-space: nowrap;
  animation: sector-drift 24s linear infinite alternate;
}

.sector-strip span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 18px 2px 0;
  background: var(--aged-brass);
  border-radius: 50%;
}

.contact-section {
  position: relative;
  display: grid;
  min-height: 720px;
  place-items: center;
  overflow: hidden;
  padding: 120px 48px;
  background: var(--pearl-jade);
  text-align: center;
}

.contact-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.contact-content .eyebrow {
  color: rgba(243, 239, 230, 0.64);
}

.contact-content h2 {
  color: white;
  font-size: clamp(56px, 7.5vw, 108px);
}

.contact-content > p {
  max-width: 650px;
  margin: 34px auto 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
}

.button-light {
  margin-top: 42px;
  background: var(--porcelain);
  color: var(--harbour-night);
}

.contact-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  border: 1px solid rgba(243, 239, 230, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbit-turn 22s linear infinite;
}

.contact-orbit::before,
.contact-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(243, 239, 230, 0.12);
  border-radius: 50%;
}

.contact-orbit::after {
  inset: 30%;
}

.contact-orbit span {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  background: var(--aged-brass);
  border-radius: 50%;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 32px;
  padding: 54px 48px;
  background: #06151b;
  color: rgba(243, 239, 230, 0.56);
  font-size: 11px;
}

.footer-wordmark {
  color: var(--porcelain);
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.sourcing-modal[hidden] {
  display: none;
}

.sourcing-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
}

.sourcing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 14, 18, 0.76);
  backdrop-filter: blur(16px);
}

.sourcing-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(860px, calc(100svh - 56px));
  overflow: auto;
  padding: 42px;
  background:
    linear-gradient(145deg, rgba(16, 43, 50, 0.98), rgba(6, 21, 27, 0.98)),
    var(--harbour-night);
  border: 1px solid rgba(243, 239, 230, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.sourcing-panel-content {
  display: contents;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(243, 239, 230, 0.24);
  color: var(--porcelain);
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 8px;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.sourcing-panel h2 {
  max-width: 430px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.sourcing-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.sourcing-form label {
  display: grid;
  gap: 8px;
}

.sourcing-form span,
.form-note {
  color: rgba(243, 239, 230, 0.58);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sourcing-form input,
.sourcing-form select,
.sourcing-form textarea {
  width: 100%;
  border: 1px solid rgba(243, 239, 230, 0.18);
  background: rgba(243, 239, 230, 0.06);
  color: var(--porcelain);
  font: inherit;
  line-height: 1.45;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.sourcing-form input,
.sourcing-form select {
  height: 48px;
  padding: 0 14px;
}

.sourcing-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--aged-brass) 50%),
    linear-gradient(135deg, var(--aged-brass) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: rgba(243, 239, 230, 0.9);
}

.sourcing-form select:invalid {
  color: rgba(243, 239, 230, 0.42);
}

.sourcing-form option {
  background: var(--harbour-night);
  color: var(--porcelain);
}

.sourcing-form textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
}

.sourcing-form input:focus,
.sourcing-form select:focus,
.sourcing-form textarea:focus {
  border-color: rgba(196, 161, 100, 0.78);
  background: rgba(243, 239, 230, 0.09);
}

.form-note {
  margin: 2px 0 0;
  color: rgba(243, 239, 230, 0.48);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: none;
}

.form-status {
  min-height: 1.5em;
  margin: -6px 0 0;
  color: var(--aged-brass);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.form-status.is-error {
  color: #f0a083;
}

.form-submit {
  width: 100%;
  margin-top: 4px;
  border: 0;
  cursor: pointer;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-image-settle {
  to { transform: scale(1); }
}

@keyframes spark-write {
  to { stroke-dashoffset: 0; }
}

@keyframes spark-finish {
  0% { opacity: 0; transform: scale(0.35) rotate(-9deg); }
  55% { opacity: 1; transform: scale(1.22) rotate(4deg); }
  100% { opacity: 0.82; transform: scale(1) rotate(0); }
}

@keyframes spark-twinkle {
  from { opacity: 0.62; transform: scale(0.92) rotate(-2deg); }
  to { opacity: 1; transform: scale(1.12) rotate(3deg); }
}

@keyframes hero-copy-reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typewriter-reveal {
  to { max-width: 16.7em; }
}

@keyframes typewriter-reveal-mobile {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes terminal-cursor {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes orbit-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.97); opacity: 0.55; }
  50% { transform: translate(-50%, -50%) scale(1.03); opacity: 1; }
}

@keyframes orbit-turn {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes sector-drift {
  from { transform: translateX(-2vw); }
  to { transform: translateX(calc(-100% + 100vw)); }
}

@keyframes mobile-grid-drift {
  from { background-position: 50% 50%; }
  to { background-position: calc(50% + 28px) calc(50% + 18px); }
}

@keyframes mobile-orbit-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95) rotate(0deg); opacity: 0.46; }
  50% { transform: translate(-50%, -50%) scale(1.03) rotate(16deg); opacity: 0.82; }
}

@keyframes mobile-node-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes mobile-route-draw {
  from { transform: rotate(var(--route-angle)) scaleX(0); opacity: 0; }
  to { transform: rotate(var(--route-angle)) scaleX(1); opacity: 1; }
}

@keyframes mobile-sheet-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  :root {
    --shell: min(100vw - 40px, 680px);
  }

  .site-header {
    height: 66px;
    padding: 0 20px;
  }

  .site-header > .wordmark {
    position: relative;
    z-index: 22;
    font-size: 13px;
  }

  body.menu-open .site-header,
  body.menu-open .site-header.is-scrolled {
    background: var(--harbour-night);
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 22;
    display: block;
    margin-right: -9px;
    border-radius: 50%;
    touch-action: manipulation;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 21;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 112px 24px max(42px, env(safe-area-inset-bottom));
    background: var(--harbour-night);
    background-image: radial-gradient(circle at 74% 24%, rgba(30, 115, 108, 0.25), transparent 34%);
    font-family: var(--serif);
    font-size: clamp(32px, 8.8vw, 48px);
    letter-spacing: -0.025em;
    visibility: hidden;
    pointer-events: none;
  }

  .site-nav a {
    flex-shrink: 0;
    min-height: 48px;
  }

  .site-nav.is-open {
    visibility: visible;
    pointer-events: auto;
  }

  .nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    margin-top: 10px;
    padding: 0 18px;
    border: 1px solid rgba(196, 161, 100, 0.55);
    color: var(--aged-brass);
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.045em;
  }

  .hero-content {
    width: var(--shell);
    margin: 0 auto;
    padding-top: 96px;
  }

  .hero-brand {
    font-size: clamp(62px, 17vw, 112px);
  }

  .hero-thesis {
    max-width: 620px;
    margin-top: 34px;
  }

  .hero-index {
    right: 20px;
    left: 20px;
  }

  .thesis-layout,
  .engagement-layout {
    grid-template-columns: 1fr;
    gap: 58px;
  }

  .thesis-body {
    max-width: 620px;
    padding-top: 0;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .process-list li {
    grid-template-columns: 50px 0.7fr 1.3fr;
  }

  .field-section {
    grid-template-columns: 1fr;
  }

  .field-visual {
    min-height: 560px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .field-copy {
    padding: 96px 20px;
  }

  .engagement-output {
    padding-top: 20px;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer p {
    display: none;
  }
}

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

  body {
    font-size: 15px;
  }

  .site-header.is-scrolled {
    height: 62px;
  }

  .hero-media {
    background-position: 68% center;
    transform: scale(1.04);
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(6, 20, 26, 0.96), rgba(6, 20, 26, 0.62)),
      linear-gradient(0deg, rgba(6, 20, 26, 0.84), transparent 58%);
  }

  .hero-grid {
    opacity: 0.22;
    background-size: 74px 74px;
    mask-image: linear-gradient(180deg, black, transparent 92%);
    animation: mobile-grid-drift 14s linear infinite alternate;
  }

  .hero-content {
    align-self: center;
    padding: 94px 0 64px;
  }

  .hero-brand {
    font-size: clamp(52px, 14.8vw, 70px);
    line-height: 0.83;
  }

  .hero-thesis {
    max-width: 11ch;
    margin-top: 26px;
    font-size: clamp(34px, 10.2vw, 42px);
    line-height: 1;
  }

  .hero-thesis.hero-reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .typewriter-text {
    max-width: none;
  }

  .typewriter-wrap {
    display: block;
    max-width: 100%;
    white-space: normal;
  }

  .typewriter-text--desktop {
    display: none;
  }

  .typewriter-text--mobile {
    display: block;
    overflow: visible;
    white-space: normal;
    animation: none;
  }

  .typewriter-cursor--desktop {
    display: none;
  }

  .hero-copy {
    max-width: 31ch;
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.58;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-top: 26px;
  }

  .button {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    touch-action: manipulation;
  }

  .button:active,
  .menu-toggle:active {
    transform: scale(0.97);
  }

  .text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .hero-index span:nth-child(2) {
    display: none;
  }

  .hero-index {
    bottom: 18px;
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .thesis-section,
  .approach-section,
  .engagement-section {
    padding-top: 84px;
  }

  .thesis-heading h2,
  .section-intro h2,
  .field-copy h2,
  .engagement-title h2 {
    font-size: clamp(38px, 11vw, 48px);
    line-height: 0.98;
  }

  .thesis-body .lead {
    font-size: clamp(24px, 7.2vw, 29px);
  }

  .mode-shift {
    margin-top: 72px;
    padding-bottom: 36px;
  }

  .approach-section {
    padding-bottom: 86px;
  }

  .section-intro {
    margin-bottom: 54px;
  }

  .process-list li {
    grid-template-columns: 38px 1fr;
    gap: 8px 16px;
    padding: 28px 0;
  }

  .process-list li:hover {
    padding-right: 0;
    padding-left: 0;
  }

  .process-list p {
    grid-column: 2;
  }

  .field-visual {
    min-height: 440px;
    background-size: auto, 52px 52px, 52px 52px, auto;
  }

  .field-ring-one {
    width: 240px;
    height: 240px;
    animation: mobile-orbit-breathe 6s ease-in-out infinite;
  }

  .field-ring-two {
    width: 380px;
    height: 380px;
    animation: mobile-orbit-breathe 8s ease-in-out 500ms infinite reverse;
  }

  .field-node {
    min-width: 74px;
    height: 34px;
    padding: 0 12px;
    font-size: 9px;
    letter-spacing: 0.05em;
    box-shadow: 0 0 0 7px rgba(243, 239, 230, 0.055), 0 12px 32px rgba(0, 0, 0, 0.24);
    opacity: 0;
  }

  .field-visual.is-active .field-node {
    animation: mobile-node-rise 560ms cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
  }

  .node-guangzhou { top: 18%; left: 43%; }
  .node-zhaoqing { top: 27%; left: 10%; }
  .node-huizhou { top: 35%; left: 66%; }
  .node-foshan { top: 39%; left: 27%; }
  .node-dongguan { top: 50%; left: 58%; }
  .node-hk { top: 60%; left: 11%; }
  .node-zhongshan { top: 62%; left: 43%; }
  .node-shenzhen { top: 68%; left: 61%; }
  .node-zhuhai { top: 75%; left: 38%; }
  .node-macau { top: 82%; left: 18%; }
  .node-jiangmen { top: 85%; left: 58%; }

  .field-visual.is-active .node-guangzhou { animation-delay: 80ms; }
  .field-visual.is-active .node-zhaoqing { animation-delay: 130ms; }
  .field-visual.is-active .node-huizhou { animation-delay: 180ms; }
  .field-visual.is-active .node-foshan { animation-delay: 230ms; }
  .field-visual.is-active .node-dongguan { animation-delay: 280ms; }
  .field-visual.is-active .node-hk { animation-delay: 330ms; }
  .field-visual.is-active .node-zhongshan { animation-delay: 380ms; }
  .field-visual.is-active .node-shenzhen { animation-delay: 430ms; }
  .field-visual.is-active .node-zhuhai { animation-delay: 480ms; }
  .field-visual.is-active .node-macau { animation-delay: 530ms; }
  .field-visual.is-active .node-jiangmen { animation-delay: 580ms; }

  .field-route {
    opacity: 0;
    transform-origin: left center;
  }

  .field-visual.is-active .field-route {
    animation: mobile-route-draw 900ms cubic-bezier(0.2, 0.75, 0.2, 1) 620ms forwards;
  }

  .route-one {
    --route-angle: -27deg;
    top: 57%;
    left: 21%;
    width: 210px;
    transform: rotate(var(--route-angle));
  }

  .route-two {
    --route-angle: 60deg;
    top: 39%;
    left: 58%;
    width: 138px;
    transform: rotate(var(--route-angle));
  }

  .field-copy {
    padding-top: 76px;
    padding-bottom: 78px;
  }

  .field-copy > p,
  .engagement-title > p:last-child,
  .contact-content > p {
    line-height: 1.62;
  }

  .geography-line {
    gap: 10px 16px;
    margin-top: 38px;
    letter-spacing: 0.11em;
  }

  .engagement-output li {
    font-size: 18px;
  }

  .sector-strip {
    margin-top: 72px;
    gap: 42px;
    animation-duration: 18s;
  }

  .contact-section {
    min-height: auto;
    padding: 82px 20px max(90px, env(safe-area-inset-bottom));
  }

  .contact-content h2 {
    max-width: 9ch;
    margin: 0 auto;
    font-size: clamp(44px, 13vw, 56px);
    line-height: 0.96;
  }

  .contact-content .eyebrow {
    margin-bottom: 18px;
    font-size: 11px;
    line-height: 1.3;
  }

  .contact-content > p:not(.eyebrow) {
    max-width: 31ch;
    margin-top: 26px;
    font-size: 16px;
  }

  .contact-orbit {
    width: 126vw;
    max-width: none;
    opacity: 0.74;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 44px 24px;
  }

  .sourcing-modal {
    inset: var(--sourcing-viewport-top, 0px) 0 auto;
    height: var(--sourcing-viewport-height, 100vh);
    height: var(--sourcing-viewport-height, 100dvh);
    grid-template-rows: minmax(0, 1fr);
    align-items: end;
    padding: 12px 0 0;
  }

  .sourcing-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: min(860px, 100%);
    overflow: hidden;
    padding: 64px 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    animation: mobile-sheet-rise 260ms cubic-bezier(0.2, 0.75, 0.2, 1);
  }

  .sourcing-panel-content {
    display: block;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px max(20px, env(safe-area-inset-bottom));
    scroll-padding-block: 16px;
  }

  .sourcing-panel .eyebrow {
    margin-bottom: 12px;
  }

  .modal-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .modal-close::before,
  .modal-close::after {
    top: 20px;
    left: 11px;
    width: 18px;
  }

  .sourcing-panel h2 {
    max-width: 16ch;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.05;
  }

  .sourcing-form {
    margin-top: 20px;
    gap: 14px;
  }

  .sourcing-form label {
    gap: 6px;
  }

  .sourcing-form input,
  .sourcing-form select,
  .sourcing-form textarea {
    font-size: 16px;
  }

  .sourcing-form input,
  .sourcing-form select {
    height: 48px;
  }

  .sourcing-form textarea {
    min-height: 92px;
    height: 92px;
  }

  .form-status:empty {
    display: none;
  }

  .footer-meta {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], .hero-reveal {
    opacity: 1;
    transform: none;
  }
  .typewriter-text {
    max-width: none;
    clip-path: none;
    white-space: normal;
    animation: none !important;
  }
  .typewriter-wrap {
    display: inline;
    white-space: normal;
  }
  .typewriter-cursor {
    opacity: 1;
    animation: none !important;
  }
}
