/* HT Partners — variant base
   Everything the four design variants share: reset, type scale hooks, the intro
   veil, scroll entry, the fluid island nav, the magnetic CTA and the line-drawn
   icon choreography. A variant sheet loads AFTER this one and owns the palette,
   the ground texture and the layout. Tokens come from the Colour Manual §1. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
a { text-decoration: none; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

:root {
  --ink-950: #070C14;
  --ink-900: #0E1A2B; --ink-800: #16243A; --ink-700: #213249; --ink-600: #3B4A61;
  --ink-500: #6B7280; --ink-400: #9CA3AF; --ink-300: #C7CCD4; --ink-200: #E5E7EB;
  --ink-100: #F3F4F6; --ink-000: #FFFFFF;
  --teal-500: #2F8EA3; --teal-400: #4FA9BC; --teal-100: #E4F1F4;

  /* the two easings the whole site moves on: heavy-mass settle, and a spring */
  /* every ↗ island fills with the accent on hover — one rule for the CTA knob,
     the contact rows and the partner plates */
  --knob-hover: var(--teal-500);
  --knob-hover-fg: #FFFFFF;

  /* lockup height in the header row, and the hamburger pill it lines up with */
  --logo-h: clamp(2.35rem, 8.5vw, 4rem);   /* shrinks on phones so it clears the pill */
  --pill-h: 3.3rem;

  --settle: cubic-bezier(.16, 1, .3, 1);
  --glide:  cubic-bezier(.32, .72, 0, 1);
  --sh: 14, 26, 43;
}

body { font-family: Geist, ui-sans-serif, system-ui, sans-serif; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }

/* ---- scroll entry --------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 3.5rem, 0);
  filter: blur(6px);
  transition:
    opacity .9s var(--settle),
    transform .9s var(--settle),
    filter .9s var(--settle);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].is-in { opacity: 1; transform: none; filter: blur(0); }
/* drop the compositing layer once the entry finishes, or large type stays
   rasterised at the layer's resolution and reads soft */
[data-reveal].is-done { filter: none; will-change: auto; }

/* ---- eyebrow tag ---------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .625rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .2em;
  color: var(--eyebrow-fg, var(--ink-500));
  background: var(--eyebrow-bg, rgba(14, 26, 43, .045));
  border: 1px solid var(--eyebrow-line, rgba(14, 26, 43, .07));
}
.eyebrow::before {
  content: ""; width: .3rem; height: .3rem; border-radius: 999px;
  background: var(--accent, var(--teal-500));
}

/* ---- island nav ------------------------------------------------------ */
.island {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 40;
  display: flex; align-items: center; justify-content: flex-end;
  padding-block-start: clamp(1rem, 2.4vw, 1.6rem);
  /* hug the page gutter, then follow the shell in once the viewport outgrows it */
  padding-inline: max(var(--page-gutter, clamp(1rem, 5vw, 4.5rem)),
                      calc((100% - var(--page-max, 1280px)) / 2 + var(--page-gutter, clamp(1rem, 5vw, 4.5rem))));
  pointer-events: none;
}
.island > * { pointer-events: auto; }
.island-inner {
  display: flex; align-items: center;
  padding: .4rem;
  border-radius: 999px;
  background: var(--island-bg, rgba(255, 255, 255, .55));
  border: 1px solid var(--island-line, rgba(255, 255, 255, .6));
  box-shadow: 0 1px 2px rgba(var(--sh), .04), 0 22px 50px -30px rgba(var(--sh), .45);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  transform: translate3d(0, -.35rem, 0) scale(.985);
  opacity: 0;
  transition: transform .9s var(--glide), opacity .9s var(--glide), background .6s var(--glide);
}
html.intro-done .island-inner,
html:not(.is-intro) .island-inner { transform: none; opacity: 1; }
html.is-scrolled .island-inner { background: var(--island-bg-scrolled, var(--island-bg, rgba(255, 255, 255, .72))); }

/* hamburger: two rules that rotate into a single X, never a swap */
.nav-toggle {
  position: relative; flex: none;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--chip, rgba(14, 26, 43, .05));
  transition: background .5s var(--glide), transform .5s var(--glide);
}
.nav-toggle:hover { background: var(--chip-strong, rgba(14, 26, 43, .1)); }
.nav-toggle:active { transform: scale(.94); }
.nav-toggle span {
  position: absolute; left: 50%; top: 50%;
  width: 1rem; height: 1.2px; border-radius: 2px;
  background: var(--island-fg, var(--ink-900));
  transition: transform .6s var(--glide), opacity .35s var(--glide);
}
.nav-toggle span:nth-child(1) { transform: translate3d(-50%, calc(-50% - 3.5px), 0); }
.nav-toggle span:nth-child(2) { transform: translate3d(-50%, calc(-50% + 3.5px), 0); }
html.nav-open .nav-toggle span:nth-child(1) { transform: translate3d(-50%, -50%, 0) rotate(45deg); }
html.nav-open .nav-toggle span:nth-child(2) { transform: translate3d(-50%, -50%, 0) rotate(-45deg); }

/* full-screen sheet: heavy glass, links masked in on a stagger */
.nav-sheet {
  position: fixed; inset: 0; z-index: 39;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(.5rem, 1.4vw, 1rem);
  padding: clamp(5rem, 14vh, 9rem) clamp(1.25rem, 8vw, 7rem) clamp(2rem, 6vh, 4rem);
  background: var(--sheet-bg, rgba(243, 244, 246, .82));
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  backdrop-filter: blur(40px) saturate(1.4);
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--glide), visibility 0s linear .6s;
}
html.nav-open .nav-sheet { opacity: 1; visibility: visible; transition-delay: 0s, 0s; }
.nav-sheet a.sheet-link {
  display: block; width: max-content; max-width: 100%;
  font-size: clamp(2.5rem, 9vw, 5.5rem); font-weight: 600;
  letter-spacing: -.05em; line-height: 1.02;
  color: var(--sheet-fg, var(--ink-900));
  opacity: 0; transform: translate3d(0, 3rem, 0);
  transition: opacity .7s var(--settle), transform .7s var(--settle), color .4s var(--glide);
}
html.nav-open .nav-sheet a.sheet-link { opacity: 1; transform: none; }
.nav-sheet a.sheet-link:nth-of-type(1) { transition-delay: .08s; }
.nav-sheet a.sheet-link:nth-of-type(2) { transition-delay: .14s; }
.nav-sheet a.sheet-link:nth-of-type(3) { transition-delay: .2s; }
.nav-sheet a.sheet-link:nth-of-type(4) { transition-delay: .26s; }
.nav-sheet a.sheet-link:hover { color: var(--accent, var(--teal-500)); }
.nav-sheet .sheet-foot {
  margin-block-start: clamp(2rem, 6vh, 4rem);
  display: flex; flex-wrap: wrap; gap: .5rem 2rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sheet-fg-soft, var(--ink-500));
  opacity: 0; transform: translate3d(0, 1.5rem, 0);
  transition: opacity .7s var(--settle) .32s, transform .7s var(--settle) .32s;
}
html.nav-open .nav-sheet .sheet-foot { opacity: 1; transform: none; }
html.nav-open, html.nav-open body { overflow: hidden; }

/* ---- CTA: pill with a nested icon island ----------------------------- */
.cta {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: .45rem .45rem .45rem 1.5rem;
  border-radius: 999px;
  font-size: clamp(.95rem, 1.3vw, 1.05rem); font-weight: 500; letter-spacing: -.01em;
  color: var(--cta-fg, var(--ink-000));
  background: var(--cta-bg, var(--ink-900));
  box-shadow: 0 1px 2px rgba(var(--sh), .1), 0 24px 44px -26px rgba(var(--sh), .6);
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform .5s var(--glide), background .6s var(--glide), box-shadow .6s var(--glide);
}
.cta:hover { background: var(--cta-bg-hover, var(--ink-800)); }
.cta:active { transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(.975); }
.cta .knob {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 999px;
  display: grid; place-items: center;
  font-size: .8rem; line-height: 1;
  background: var(--cta-knob, rgba(255, 255, 255, .14));
  transition: transform .6s var(--glide), background .6s var(--glide);
}
.cta .knob { transition: transform .6s var(--glide), background .6s var(--glide), color .6s var(--glide); }
.cta:hover .knob { transform: translate3d(3px, -3px, 0) scale(1.06); background: var(--knob-hover); color: var(--knob-hover-fg); }
.cta.is-ghost {
  color: var(--ink-900); background: var(--chip, rgba(14, 26, 43, .05));
  box-shadow: none; border: 1px solid var(--hair, rgba(14, 26, 43, .08));
}
.cta.is-ghost .knob { background: rgba(14, 26, 43, .07); }

:where(a, button):focus-visible { outline: 2px solid var(--accent, var(--teal-500)); outline-offset: 3px; border-radius: .5rem; }

/* ---- scroll-progress hairline ---------------------------------------- */
.progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 41;
  height: 2px; pointer-events: none;
  background: var(--accent, var(--teal-500));
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  opacity: .8;
}

/* ---- brand + intro veil ---------------------------------------------- */
.brand { display: inline-block; transform: var(--brand-tf, none); transform-origin: 50% 50%; }
.brand h1 { line-height: 0; }
/* the lockup sits in the header row, centred against the hamburger pill */
.brand .htlogo { height: var(--logo-h); }
.brand noscript img { width: clamp(16rem, 31vw, 22rem); }
html.is-intro .brand { will-change: transform; }

.intro-veil {
  position: fixed; inset: 0; z-index: 30;
  background: var(--veil, var(--ink-900));
  clip-path: inset(0 0 var(--veil-bottom, 0px) 0);
}
html.is-intro, html.is-intro body { overflow: hidden; }
html.is-intro .island-inner, html.is-intro .progress { opacity: 0; }
html.intro-run .intro-veil { transition: clip-path 1.15s var(--settle); }
html.intro-run .brand { transition: transform 1.15s var(--settle); }

/* ---- line-drawn icons ------------------------------------------------- */
.ico { display: block; flex: none; line-height: 0; }
.ico svg { width: 100%; height: 100%; overflow: visible; }

.ico-mail .mail-flap {
  transform-box: view-box; transform-origin: 50% 19.657%;
  transition: transform .55s cubic-bezier(.34, 1.25, .64, 1);
}
.ico-mail .mail-rim { transition: opacity .22s ease-out; }
.ico-mail .mail-pocket {
  transform-box: view-box; transform-origin: 50% 75.3%;
  opacity: 0; transform: scaleY(.25);
  transition: opacity .3s ease-out .16s, transform .4s cubic-bezier(.34, 1.25, .64, 1) .16s;
}
.ico-phone .ring { transform-box: view-box; transform-origin: 65% 42.1%; opacity: 0; }
.ico-phone .handset { transform-box: view-box; transform-origin: 50% 50%; }

@media (hover: hover) {
  .row:hover .ico-mail .mail-flap, .row:focus-within .ico-mail .mail-flap { transform: scaleY(-1.27); }
  .row:hover .ico-mail .mail-rim, .row:focus-within .ico-mail .mail-rim { opacity: 0; }
  .row:hover .ico-mail .mail-pocket, .row:focus-within .ico-mail .mail-pocket { opacity: 1; transform: scaleY(1); }
  .row:hover .ico-phone .handset, .row:focus-within .ico-phone .handset { animation: handset-shake .95s cubic-bezier(.36, .07, .19, .97) infinite; }
  .row:hover .ico-phone .ring, .row:focus-within .ico-phone .ring { animation: ring-wave .95s ease-out infinite; }
  .row:hover .ico-phone .ring:nth-of-type(2), .row:focus-within .ico-phone .ring:nth-of-type(2) { animation-delay: .14s; }
}
.row:focus-within .ico-mail .mail-flap { transform: scaleY(-1.27); }
.row:focus-within .ico-mail .mail-rim { opacity: 0; }
.row:focus-within .ico-mail .mail-pocket { opacity: 1; transform: scaleY(1); }

@keyframes handset-shake {
  0%, 62%, 100% { transform: rotate(0deg); }
  6% { transform: rotate(-10deg); } 15% { transform: rotate(8deg); }
  24% { transform: rotate(-6deg); } 33% { transform: rotate(4.5deg); }
  42% { transform: rotate(-3deg); } 51% { transform: rotate(1.5deg); }
}
@keyframes ring-wave {
  0% { opacity: 0; transform: scale(.45); }
  22% { opacity: 1; }
  62% { opacity: .85; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

.ico-svc { color: var(--accent, var(--teal-500)); }
.ico-server .led { stroke-width: 2.2; opacity: .45; }
.ico-erp .node { transform-box: view-box; transform-origin: 50% 50%; }
.ico-web .brk { transform-box: view-box; transform-origin: 50% 50%; transition: transform .5s cubic-bezier(.34, 1.3, .64, 1); }
.ico-web .caret { opacity: .45; }
.ico-chart .bar { transform-box: view-box; transform-origin: 50% 72.9%; }
.ico-chart .trend { stroke-dasharray: 16; stroke-dashoffset: 0; }

@media (hover: hover) {
  .svc:hover .ico-server .led { animation: led-blink 1.6s ease-in-out infinite; }
  .svc:hover .ico-server .led:nth-of-type(2) { animation-delay: .18s; }
  .svc:hover .ico-server .led:nth-of-type(3) { animation-delay: .36s; }
  .svc:hover .ico-erp .node { animation: node-ping 1.8s ease-in-out infinite; }
  .svc:hover .ico-erp .node:nth-of-type(2) { animation-delay: .2s; }
  .svc:hover .ico-erp .node:nth-of-type(3) { animation-delay: .4s; }
  .svc:hover .ico-web .brk-l { transform: translateX(-1.5px); }
  .svc:hover .ico-web .brk-r { transform: translateX(1.5px); }
  .svc:hover .ico-web .caret { animation: caret-blink 1.1s steps(1, end) infinite; }
  .svc:hover .ico-chart .bar { animation: bar-grow .9s var(--settle) both; }
  .svc:hover .ico-chart .bar:nth-of-type(3) { animation-delay: .1s; }
  .svc:hover .ico-chart .bar:nth-of-type(4) { animation-delay: .2s; }
  .svc:hover .ico-chart .trend { animation: trend-draw .8s var(--settle) .28s both; }
}
@keyframes led-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes node-ping { 0%, 100% { transform: scale(1); opacity: .75; } 45% { transform: scale(1.22); opacity: 1; } }
@keyframes caret-blink { 0%, 49% { opacity: .7; } 50%, 100% { opacity: 0; } }
@keyframes bar-grow { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
@keyframes trend-draw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }

/* ---- reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  .intro-veil { display: none; }
  .brand { transform: none; }
  .island-inner { opacity: 1; transform: none; }
  .nav-sheet a.sheet-link, .nav-sheet .sheet-foot { opacity: 1; transform: none; }
  .ico-mail .mail-flap, .ico-mail .mail-rim, .ico-mail .mail-pocket { transition: none; }
  .row:hover .ico-mail .mail-flap, .row:focus-within .ico-mail .mail-flap { transform: none; }
  .row:hover .ico-mail .mail-rim, .row:focus-within .ico-mail .mail-rim { opacity: 1; }
  .row:hover .ico-mail .mail-pocket, .row:focus-within .ico-mail .mail-pocket { opacity: 0; }
  .ico-phone .handset, .ico-phone .ring,
  .ico-server .led, .ico-erp .node, .ico-web .caret,
  .ico-chart .bar, .ico-chart .trend { animation: none !important; }
  .ico-web .brk { transition: none; }
  .svc:hover .ico-web .brk { transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
