/* Logo colourway previews — surface and type matched per brand treatment (no terrain) */

body.static-surface .hero {
  justify-content: center;
  padding-block: clamp(32px, 6vh, 80px) clamp(40px, 9vh, 120px);
}

body.static-surface .hero::before,
body.static-surface .foot::before {
  display: none;
}

/* Page 1 — forest green marks on off-white */
body.theme-page1 {
  color-scheme: light;
  --surface: #f4f3ed;
  --surface-veil: #f4f3ed;
  --ink: #1a3221;
  --ink-muted: #2c5234;
  --ink-foot: #333333;
  --accent-intro: #3f6b4c;
  --accent-text: #2c5234;
  --hairline-fade: rgb(44 82 52 / 0.35);
  --terrain-occlude: #f4f3ed;
  --terrain-line-core: rgb(63 107 76);
  --terrain-line-mid: rgb(44 82 52 / 0.72);
  --terrain-line-edge: rgb(44 82 52 / 0.38);
  --glow-blend: normal;
  --glow-a: rgb(111 158 120 / 0.28);
  --glow-b: rgb(44 82 52 / 0.18);
  --glow-b-mid: transparent;
  --glow-opacity: 0.85;
  --status-border: rgb(44 82 52 / 0.28);
  --status-bg: linear-gradient(to bottom, rgb(255 255 255 / 0.92), rgb(244 243 237 / 0.65));
  --status-inset: inset 0 1px 0 rgb(255 255 255 / 1), inset 0 -1px 0 rgb(44 82 52 / 0.1), 0 8px 24px -12px rgb(44 82 52 / 0.15);
  --terrain-strength: 2.4;
  --hero-veil-height: 78%;
  --hero-veil: linear-gradient(to bottom, #f4f3ed 0%, #f4f3ed 80%, rgb(244 243 237 / 0.98) 92%, transparent 100%);
  --hero-radial: radial-gradient(closest-side at 50% 92%, #f4f3ed, transparent 72%);
  --foot-veil: linear-gradient(to top, #f4f3ed 55%, transparent);
  --beam-soft: rgb(44 82 52 / 0.14);
  --beam-accent: rgb(44 82 52 / 0.4);
}

body.theme-page1 .foot {
  padding-top: 10px;
}

/* Page 2 — black marks on white (greyscale) */
body.theme-page2 {
  color-scheme: light;
  --surface: #ffffff;
  --surface-veil: #ffffff;
  --ink: #000000;
  --ink-muted: rgb(0 0 0 / 0.7);
  --ink-foot: #333333;
  --accent-intro: #333333;
  --accent-text: #000000;
  --forest-lit: #555555;
  --hairline-fade: rgb(0 0 0 / 0.28);
  --terrain-occlude: #ffffff;
  --terrain-line-core: rgb(0 0 0 / 0.55);
  --terrain-line-mid: rgb(0 0 0 / 0.38);
  --terrain-line-edge: rgb(0 0 0 / 0.22);
  --glow-blend: normal;
  --glow-a: rgb(0 0 0 / 0.06);
  --glow-b: rgb(0 0 0 / 0.04);
  --glow-b-mid: transparent;
  --glow-opacity: 1;
  --status-border: rgb(0 0 0 / 0.14);
  --status-bg: linear-gradient(to bottom, rgb(255 255 255 / 1), rgb(0 0 0 / 0.03));
  --status-inset: inset 0 1px 0 rgb(255 255 255 / 1), inset 0 -1px 0 rgb(0 0 0 / 0.08), 0 8px 24px -12px rgb(0 0 0 / 0.1);
  --terrain-strength: 2.4;
  --hero-veil-height: 78%;
  --hero-veil: linear-gradient(to bottom, #ffffff 0%, #ffffff 80%, rgb(255 255 255 / 0.98) 92%, transparent 100%);
  --hero-radial: radial-gradient(closest-side at 50% 92%, #ffffff, transparent 72%);
  --foot-veil: linear-gradient(to top, #ffffff 55%, transparent);
  --beam-soft: rgb(0 0 0 / 0.12);
  --beam-accent: rgb(0 0 0 / 0.26);
}

body.theme-page2 .foot {
  padding-top: 10px;
}

body.theme-page2 .services li + li::before {
  background: #555555;
}

/* Page 3 — white marks on forest green */
body.theme-page3 {
  color-scheme: dark;
  --surface: #2c5234;
  --surface-veil: #2c5234;
  --ink: #f4f3ed;
  --ink-muted: rgb(244 243 237 / 0.82);
  --ink-foot: rgb(244 243 237 / 0.72);
  --accent-intro: #d4e4d7;
  --accent-text: #e8efe9;
  --hairline-fade: rgb(244 243 237 / 0.36);
  --terrain-occlude: #2c5234;
  --terrain-line-core: rgb(228 240 230);
  --terrain-line-mid: rgb(244 243 237 / 0.62);
  --terrain-line-edge: rgb(200 228 204 / 0.35);
  --terrain-strength: 2.8;
  --glow-blend: screen;
  --glow-a: rgb(160 205 168 / 0.45);
  --glow-b: rgb(0 0 0 / 0.5);
  --glow-b-mid: rgb(0 0 0 / 0.18);
  --glow-opacity: 1;
  --status-border: rgb(244 243 237 / 0.24);
  --status-bg: linear-gradient(to bottom, rgb(244 243 237 / 0.18), rgb(0 0 0 / 0.1) 55%, rgb(0 0 0 / 0.22));
  --status-inset: inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 -1px 0 rgb(0 0 0 / 0.35), 0 10px 28px -10px rgb(0 0 0 / 0.4);
  --hero-veil-height: 82%;
  --hero-veil: linear-gradient(to bottom, #2c5234 0%, #2c5234 80%, rgb(44 82 52 / 0.98) 92%, transparent 100%);
  --hero-radial: radial-gradient(closest-side at 50% 88%, rgb(12 28 17 / 0.75), transparent 70%);
  --foot-veil: linear-gradient(to top, #2c5234 48%, transparent);
  --beam-soft: rgb(244 243 237 / 0.16);
  --beam-accent: rgb(200 228 204 / 0.7);
}

/* Page 3 with a quiet drift: forest ground, pale lines only in the lower field */
body.theme-page3.motion-quiet {
  --terrain-strength: 2.4;
  --glow-a: rgb(200 228 204 / 0.22);
  --glow-b: rgb(0 0 0 / 0.28);
  --glow-b-mid: transparent;
  --glow-opacity: 0.7;
  --beam-soft: rgb(244 243 237 / 0.08);
  --beam-accent: rgb(228 240 230 / 0.35);
  --hero-veil-height: 78%;
  --sky-line: #2c5234;
  --sky-fill: #f4f3ed;
  --sky-fill-grey: #c5cfc6;
  --sky-fill-far: #9aab9c;
}

body.theme-page1 .terrain,
body.theme-page2 .terrain {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 46%, #000 68%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 46%, #000 68%);
}

@media (prefers-reduced-motion: no-preference) {
  body.theme-page3.motion-quiet .purpose,
  body.theme-page3.motion-quiet .services {
    animation: settle 900ms var(--ease-out) both;
  }

  body.theme-page3.motion-quiet .purpose {
    animation-delay: 180ms;
  }

  body.theme-page3.motion-quiet .services {
    animation-delay: 320ms;
  }
}

@keyframes settle {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Page 3 — Hong Kong harbour skyline, drawn in five steps */

.skyline {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: clamp(190px, 30vh, 260px);
  color: var(--sky-line, #2c5234);
}

.skyline line,
.skyline path,
.skyline rect,
.skyline circle,
.skyline ellipse {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.sky-mass {
  fill: var(--sky-fill, #f4f3ed);
  stroke: none;
}

.sky-mass--grey {
  fill: var(--sky-fill-grey, #c5cfc6);
}

.sky-mass--far {
  fill: var(--sky-fill-far, #9aab9c);
  stroke: none;
}

.sky-cloud {
  fill: var(--off-white);
}

.sky-wheel {
  fill: none;
  stroke: var(--off-white);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.sky-wheel__hub,
.sky-wheel__car {
  fill: var(--off-white);
  stroke: none;
}

.sky-line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.5;
}

.sky-brace {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.5;
}

.sky-ports {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.55;
  stroke-width: 1.4;
}

.sky-ridge {
  fill: rgb(12 28 17 / 0.5);
  stroke: currentColor;
  stroke-opacity: 0.2;
}

.sky-waterline {
  stroke: currentColor;
  stroke-opacity: 0.4;
}

.sky-ripple {
  stroke: currentColor;
  stroke-opacity: var(--o, 0.2);
}

/* Buildings rise from the waterline at y=340, then their detail draws on top. */
.sky-step {
  transform-box: view-box;
  transform-origin: 50% 340px;
}

@media (prefers-reduced-motion: no-preference) {
  body.theme-page3.motion-quiet .sky-step {
    animation: sky-build 1000ms var(--ease-out) both;
  }

  body.theme-page3.motion-quiet .sky-step--1 {
    animation-name: sky-fade;
    animation-duration: 1300ms;
  }

  body.theme-page3.motion-quiet .sky-step--2 {
    animation-delay: 280ms;
  }

  body.theme-page3.motion-quiet .sky-step--3 {
    animation-delay: 860ms;
  }

  body.theme-page3.motion-quiet .sky-step--4 {
    animation-delay: 1440ms;
  }

  body.theme-page3.motion-quiet .sky-clouds {
    animation: sky-fade 1600ms var(--ease-out) 2000ms both, cloud-drift 32s ease-in-out 2000ms infinite alternate;
  }

  body.theme-page3.motion-quiet .sky-ripple {
    animation: sky-drift 11s ease-in-out infinite alternate;
  }

  body.theme-page3.motion-quiet .sky-brace,
  body.theme-page3.motion-quiet .sky-line,
  body.theme-page3.motion-quiet .sky-ports {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: sky-trace 900ms var(--ease-out) 1100ms both;
  }

  body.theme-page3.motion-quiet .sky-step--3 .sky-brace,
  body.theme-page3.motion-quiet .sky-step--3 .sky-line,
  body.theme-page3.motion-quiet .sky-step--3 .sky-ports {
    animation-delay: 1700ms;
  }

  body.theme-page3.motion-quiet .sky-step--4 .sky-brace,
  body.theme-page3.motion-quiet .sky-step--4 .sky-line,
  body.theme-page3.motion-quiet .sky-step--4 .sky-ports {
    animation-delay: 2300ms;
  }
}

@keyframes sky-build {
  from { opacity: 0; transform: scaleY(0.02); }
  to { opacity: 1; transform: none; }
}

@keyframes sky-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sky-drift {
  from { transform: translateX(-8px); }
  to { transform: translateX(8px); }
}

@keyframes cloud-drift {
  from { transform: translateX(-24px); }
  to { transform: translateX(36px); }
}

@keyframes sky-trace {
  to { stroke-dashoffset: 0; }
}

/* Page 4 — white marks on black (production) */
body.theme-page4 {
  color-scheme: dark;
  --surface: #000000;
  --surface-veil: #000000;
  --ink: #f4f3ed;
  --ink-muted: rgb(244 243 237 / 0.66);
  --ink-foot: rgb(244 243 237 / 0.6);
  --accent-intro: #8fa394;
  --accent-text: #8fa394;
  --terrain-occlude: #000000;
  --terrain-line-core: rgb(200 228 204);
  --terrain-line-mid: rgba(111, 158, 120, 0.58);
  --terrain-line-edge: rgba(244, 243, 237, 0.31);
  --terrain-strength: 2.4;
  --glow-blend: screen;
  --glow-a: rgb(160 205 168 / 0.7);
  --glow-b: rgb(44 82 52 / 1);
  --glow-b-mid: rgb(44 82 52 / 0.35);
  --glow-opacity: 1;
  --hero-veil-height: 72%;
  --hero-veil: linear-gradient(to bottom, #000000 0%, #000000 78%, transparent 100%);
  --hero-radial: radial-gradient(closest-side at 50% 88%, rgb(0 0 0 / 0.85), transparent 70%);
  --foot-veil: linear-gradient(to top, #000000 45%, transparent);
}
