/* Texpo Group Ltd. Tokens live in docs/design/DESIGN.md. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #141c2b;
  --ink-2: #4b5568;
  --line: #dde2ea;
  --accent: #1a5ab4;
  --accent-hover: #154a96;
  --accent-ink: #ffffff;
  --night: #0b1322;
  --night-2: #121c2e;
  --night-line: #223049;
  --on-night: #e9eef6;
  --on-night-2: #98a5ba;
  --route-in: #7fb0f7;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 4px; --r: 10px; --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1200px;
  --gut: 16px;
  --sec: 64px;
  --head-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1322;
    --surface: #121c2e;
    --ink: #e9eef6;
    --ink-2: #98a5ba;
    --line: #223049;
    --accent: #7fb0f7;
    --accent-hover: #a3c6fa;
    --accent-ink: #0b1322;
    --night: #070d18;
    --night-2: #0f1828;
    color-scheme: dark;
  }
}
@media (min-width: 768px) { :root { --gut: 32px; --sec: 112px; --head-h: 72px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 18px; } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
section { padding: var(--sec) 0; }

.skip { position: absolute; left: 16px; top: -56px; min-height: 44px; display: inline-flex; align-items: center; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: var(--r); transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.night :focus-visible { outline-color: var(--route-in); }

/* Type */
.eyebrow { font: 600 14px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.night .eyebrow { color: var(--route-in); }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: .98; }
h1 { font-size: clamp(48px, 9vw, 112px); text-transform: uppercase; }
h2 { font-size: clamp(40px, 6vw, 72px); text-transform: uppercase; }
h3 { font: 600 20px/1.25 var(--body); }
.lead { font-size: 18px; line-height: 1.55; max-width: 56ch; }
@media (min-width: 768px) { .lead { font-size: 21px; } }
.body-lg { font-size: 18px; color: var(--ink-2); max-width: 54ch; margin-top: 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .16s var(--ease), transform .16s var(--ease), border-color .16s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px) scale(.98); }
.night .btn { background: var(--route-in); color: var(--night); }
.night .btn:hover { background: #a3c6fa; }
.btn.ghost { background: transparent; color: var(--on-night); border-color: rgb(233 238 246 / .28); }
.btn.ghost:hover { border-color: var(--on-night); background: rgb(233 238 246 / .06); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--head-h);
  color: var(--on-night);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.site-header.scrolled {
  background: rgb(11 19 34 / .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgb(233 238 246 / .08);
}
.site-header.solid {
  background: rgb(245 247 250 / .86); color: var(--ink);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgb(11 19 34 / .06);
}
@media (prefers-color-scheme: dark) { .site-header.solid { background: rgb(11 19 34 / .82); box-shadow: 0 1px 0 var(--line); } }
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 36px; width: auto; }
@media (min-width: 768px) { .brand img { height: 40px; } }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { font-weight: 500; font-size: 16px; text-decoration: none; opacity: .82; transition: opacity .16s var(--ease); padding: 11px 0; }
.nav a:not(.btn):hover { opacity: 1; }
.site-header:not(.solid) .nav .btn { background: var(--route-in); color: var(--night); }
.menu-toggle { display: none; }

@media (max-width: 767px) {
  .menu-toggle {
    display: grid; place-content: center; gap: 6px; width: 48px; height: 48px; margin-right: -12px;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--head-h) 0 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gut) 24px; background: var(--night); color: var(--on-night);
    box-shadow: 0 24px 48px rgb(0 0 0 / .3);
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .nav a:not(.btn) { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--night-line); opacity: 1; }
  .nav .btn { margin-top: 16px; min-height: 48px; background: var(--route-in) !important; color: var(--night) !important; }
  .site-header.menu-open { background: var(--night); color: var(--on-night); box-shadow: none; }
}

/* Night sections */
.night { background: var(--night); color: var(--on-night); }
.night .lead { color: var(--on-night-2); }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--head-h) + 48px) 0 32px; }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero h1 span { color: var(--route-in); }
.hero .lead { margin-top: 24px; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 48px; border-top: 1px solid var(--night-line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--night-line); font-size: 15px; }
.facts strong { font-weight: 600; color: var(--on-night); }
.facts span { color: var(--on-night-2); }
@media (min-width: 768px) {
  .hero { padding-bottom: 48px; }
  .facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--night-line); margin-top: 72px; }
  .facts li { flex-direction: column; gap: 2px; border-bottom: 0; padding: 20px 24px 20px 0; }
  .facts li + li { padding-left: 24px; border-left: 1px solid var(--night-line); }
}
.legend { position: relative; z-index: 2; width: 100%; display: flex; gap: 24px; margin-top: 64px; font-size: 13px; color: var(--on-night-2); letter-spacing: .04em; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend span::before { content: ""; width: 18px; height: 0; border-top: 2px solid var(--route-in); }
.legend .k-out::before { border-top: 2px dashed var(--on-night-2); }

.globe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; opacity: 0; animation: fadein 1s .2s forwards; }
@media (min-width: 900px) {
  .globe { -webkit-mask-image: linear-gradient(90deg, transparent 34%, #000 62%); mask-image: linear-gradient(90deg, transparent 34%, #000 62%); }
}
@media (max-width: 899px) {
  .globe { -webkit-mask-image: linear-gradient(#000 calc(var(--head-h) + 150px), transparent calc(var(--head-h) + 236px)); mask-image: linear-gradient(#000 calc(var(--head-h) + 150px), transparent calc(var(--head-h) + 236px)); }
  .hero { padding-top: calc(var(--head-h) + 196px); min-height: 0; }
}
@keyframes fadein { to { opacity: 1; } }

[data-rise] { opacity: 0; transform: translateY(24px); animation: rise .7s var(--ease) forwards; }
[data-rise]:nth-child(2) { animation-delay: .08s; }
[data-rise]:nth-child(3) { animation-delay: .16s; }
[data-rise]:nth-child(4) { animation-delay: .24s; }
[data-rise]:nth-child(5) { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js [data-reveal].in-view { opacity: 1; transform: none; }

/* Statement */
.statement { padding: calc(var(--sec) * 1.1) 0; }
@media (prefers-color-scheme: dark) { .statement { border-top: 1px solid var(--line); } }
.scrub { font: 600 clamp(28px, 4.4vw, 52px)/1.18 var(--body); letter-spacing: -.015em; max-width: 26ch; }
.scrub .w { opacity: .2; transition: opacity .3s linear; }
.scrub .w.on { opacity: 1; }

/* Section heads */
.sec-head { margin-bottom: 48px; }
@media (min-width: 768px) { .sec-head { margin-bottom: 64px; } }

/* What we do */
.what { background: var(--surface); }
.dir-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .dir-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.dir {
  position: relative; padding: 32px 24px; border-radius: var(--r-lg);
  background: var(--bg); border: 1px solid var(--line); overflow: hidden;
}
@media (min-width: 768px) { .dir { padding: 48px; } }
.dir::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease) .2s;
}
.dir.out::before { transform-origin: left; }
.dir.in-view::before { transform: scaleX(1); }
.dir-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.chip { font: 600 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.arrow { width: 64px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.dir.in:hover .arrow { transform: translateX(-8px); }
.dir.out:hover .arrow { transform: translateX(8px); }
.dir h3 { font-family: var(--display); font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; text-transform: uppercase; line-height: 1; letter-spacing: -.005em; }
.dir p { margin-top: 16px; color: var(--ink-2); max-width: 46ch; }
.ticks { margin-top: 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.also { display: grid; gap: 32px; margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .also { grid-template-columns: 1fr 1fr; gap: 48px; } }
.also p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }

/* How */
.steps { position: relative; display: grid; gap: 40px; padding-left: 40px; }
.track { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.track .fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: top; }
.step { position: relative; }
.step::before {
  content: ""; position: absolute; left: -40px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line); transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
.step.lit::before { border-color: var(--accent); background: var(--accent); transform: scale(1.1); }
.step .n { display: block; font: 700 14px/1 var(--display); letter-spacing: .1em; color: var(--ink-2); margin-bottom: 8px; transition: color .3s var(--ease); }
.step.lit .n { color: var(--accent); }
.step h3 { font-family: var(--display); font-size: 32px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.step p { margin-top: 8px; color: var(--ink-2); max-width: 40ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 40px 0 0; }
  .track { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 2px; }
  .track .fill { transform: scaleX(var(--p, 0)); transform-origin: left; }
  .step::before { left: 0; top: -40px; }
}

/* Company */
.company { background: var(--surface); }
.company-wrap .body-lg { max-width: 62ch; }
@media (min-width: 900px) { .company-wrap > div { display: grid; grid-template-columns: 1fr 1.1fr; column-gap: 96px; align-items: end; } .company-wrap .eyebrow { grid-column: 1 / -1; } .company-wrap .body-lg { margin-top: 0; } }
.record { border-top: 1px solid var(--line); }
.record div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .record div { grid-template-columns: 180px 1fr; gap: 24px; } }
.record dt { color: var(--ink-2); font-size: 15px; }
.record dd { font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }

/* Contact */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 96px; } }
.contact .lead { margin-top: 24px; }
.reach { margin-top: 40px; border-top: 1px solid var(--night-line); }
.reach div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--night-line); }
.reach dt { color: var(--on-night-2); font-size: 15px; padding-top: 2px; }
.reach a { text-decoration-color: rgb(233 238 246 / .35); text-underline-offset: 4px; transition: text-decoration-color .16s var(--ease); }
.reach a:hover { text-decoration-color: currentColor; }
.reach .more { display: inline-block; margin-top: 8px; color: var(--route-in); padding: 4px 0; }

.enquiry { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 20px; align-content: start; }
@media (min-width: 768px) { .enquiry { padding: 40px; } }
.row2 { display: grid; gap: 20px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .seg legend { font-size: 15px; font-weight: 500; color: var(--on-night); }
.opt { color: var(--on-night-2); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--on-night);
  background: var(--night); border: 1px solid #5b6a82; border-radius: var(--r);
  padding: 12px 14px; min-height: 48px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--on-night-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--route-in); box-shadow: 0 0 0 3px rgb(127 176 247 / .25); }
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { margin-bottom: 10px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid #5b6a82; color: var(--on-night-2); font-weight: 500;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.seg input:checked + span { background: var(--route-in); border-color: var(--route-in); color: var(--night); }
.seg input:focus-visible + span { outline: 2px solid var(--route-in); outline-offset: 3px; }
.enquiry .btn { justify-self: start; }
.form-note { font-size: 14px; color: var(--on-night-2); }
.form-note.sent { color: var(--on-night); }
.err { font-size: 14px; color: #ffb4a8; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff8a78; }

/* Footer */
.site-footer { background: var(--night); color: var(--on-night-2); border-top: 1px solid var(--night-line); padding: 32px 0; font-size: 14px; }
.foot { display: grid; gap: 16px; align-items: center; }
@media (min-width: 768px) { .foot { grid-template-columns: auto 1fr auto; gap: 32px; } }
.foot img { height: 32px; width: auto; }
.foot .top { color: var(--on-night); text-underline-offset: 4px; padding: 12px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-rise], .js [data-reveal], .globe { opacity: 1; transform: none; }
  .scrub .w { opacity: 1; }
}
