/* Hypelabs Limited public site */

:root {
  --navy: #0e1621;
  --ink: #171c23;
  --muted: #4a5056;
  --paper: #f5f3ee;
  --paper-2: #fbfaf7;
  --stone: #ebe6dc;
  --line: #ddd6cb;
  --accent: #0c4a41;
  --accent-hover: #08382f;
  --on-navy: #f5f3ee;
  --on-navy-muted: #b3bac2;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 4.75rem;
  --wrap: 1120px;
  color-scheme: light;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8.75rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

address {
  font-style: normal;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  letter-spacing: -0.022em;
  line-height: 1.12;
  text-wrap: balance;
  font-optical-sizing: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: #d5e6e1;
  color: var(--navy);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  z-index: 40;
  background: var(--navy);
  color: var(--on-navy);
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.skip:focus {
  transform: translateY(0.75rem);
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.numeral {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 243, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--accent);
}

/* Hero */

.hero {
  padding-top: clamp(3.25rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.hero-grid,
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  column-gap: 4rem;
  row-gap: 1.25rem;
  align-items: start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.25rem;
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.3vw, 4.15rem);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.05;
}

.hero h1 .line {
  display: block;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.hero .lede {
  max-width: 38rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--navy);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  line-height: 1;
}

.button-primary {
  background: var(--navy);
  color: var(--on-navy);
}

.button-primary:hover {
  background: #243044;
  border-color: #243044;
  color: var(--on-navy);
}

.button-secondary {
  background: transparent;
  color: var(--navy);
}

.button-secondary:hover {
  background: rgba(14, 22, 33, 0.05);
  color: var(--navy);
}

/* Company particulars */

.particulars {
  background: var(--navy);
  color: var(--on-navy);
}

.particulars dl {
  display: grid;
  grid-template-columns: 0.9fr 0.7fr 1.7fr 1.15fr;
  gap: 1.35rem 1.75rem;
  padding-block: 1.45rem;
}

.particulars div {
  min-width: 0;
}

.particulars dt {
  margin-bottom: 0.4rem;
  color: var(--on-navy-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.particulars dd {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.particulars a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.particulars a:hover {
  color: #ffffff;
}

.particulars :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffffff;
}

/* Sections */

.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2,
.about-head h2 {
  font-size: clamp(1.85rem, 3vw, 2.65rem);
}

.section-head .lede {
  padding-top: 0.35rem;
}

.about-head {
  margin-bottom: 2rem;
}

.about-head h2 {
  max-width: 14em;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.82fr);
  gap: 2.5rem 4rem;
  align-items: start;
}

.prose p + p {
  margin-top: 1rem;
}

.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.35rem 1.4rem 0.35rem;
}

.panel h3 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--accent);
}

.panel ul {
  list-style: none;
  padding: 0;
}

.panel li {
  padding-block: 0.95rem;
  border-top: 1px solid var(--line);
  font-size: 0.975rem;
  line-height: 1.5;
}

.panel li:first-of-type {
  margin-top: 0.85rem;
}

/* Services */

.services {
  list-style: none;
  padding: 0;
}

.services li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  padding-block: 1.85rem;
  border-top: 1px solid var(--line);
}

.services li:last-child {
  border-bottom: 1px solid var(--line);
}

.services .index {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
  padding-top: 0.15rem;
}

.services h3 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  margin-bottom: 0.65rem;
}

.services p {
  max-width: 68ch;
  color: var(--muted);
}

/* Process */

.process-band {
  background: var(--stone);
}

.process {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
}

.process li {
  border-top: 1px solid var(--navy);
  padding-top: 1rem;
}

.process .index {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--accent);
}

.process h3 {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
}

.process p {
  color: var(--muted);
  font-size: 0.975rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 2rem 4rem;
  align-items: start;
}

.contact-email {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.2vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  overflow-wrap: anywhere;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-note {
  max-width: 42ch;
  color: var(--muted);
}

.contact-facts {
  display: grid;
  gap: 1.5rem;
}

.contact-facts .label,
.footer-label {
  margin-bottom: 0.4rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.contact-facts p,
.contact-facts address {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.45;
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: var(--on-navy);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: 1.5rem;
}

.site-footer a {
  color: var(--on-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .brand img {
  filter: brightness(0) invert(1);
  height: 26px;
}

.footer-tag {
  margin-top: 1rem;
  max-width: 18rem;
  color: var(--on-navy-muted);
  font-size: 0.975rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1fr 0.75fr;
  gap: 2rem 2rem;
}

.footer-label {
  color: var(--on-navy-muted);
}

.site-footer address,
.footer-grid p {
  font-size: 0.975rem;
  line-height: 1.55;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li + li {
  margin-top: 0.35rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(245, 243, 238, 0.16);
  color: var(--on-navy-muted);
  font-size: 0.875rem;
}

.footer-base p {
  margin: 0;
}

/* Legal pages and 404 */

.legal {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem);
}

.legal h1,
.legal .intro,
.legal .updated,
.legal .toc,
.legal h2,
.legal p,
.legal ul,
.legal .actions {
  max-width: 40rem;
}

.legal h1 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.updated {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.legal .intro {
  font-size: 1.125rem;
  margin-bottom: 1.75rem;
}

.toc {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 1.1rem 1.25rem 1.2rem;
  margin-bottom: 2rem;
}

.toc p {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.toc ol {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
}

.toc li {
  margin: 0.3rem 0;
}

.toc a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.4rem;
  margin-bottom: 0.7rem;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 0.85rem;
}

.legal ul,
.legal ol.plain {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal a {
  overflow-wrap: anywhere;
}

/* Responsive */

@media (max-width: 960px) {
  .particulars dl {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .section-head,
  .about-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .section-head .lede,
  .hero .lede {
    padding-top: 0;
  }

  .process {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 8.5rem;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    padding-block: 0.7rem 0.35rem;
    row-gap: 0.15rem;
  }

  .nav-desktop {
    flex: 1 0 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    margin-inline: -0.15rem;
  }

  .nav-desktop a {
    padding-inline: 0.35rem;
    white-space: nowrap;
    font-size: 0.9375rem;
  }
}

@media (max-width: 560px) {
  .wrap,
  .legal-wrap {
    width: min(var(--wrap), calc(100% - 2rem));
  }

  .particulars dl,
  .process,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .particulars dl {
    gap: 1.1rem;
    padding-block: 1.25rem;
  }

  .services li {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .footer-links a {
    min-height: 40px;
  }
}

@media (max-width: 340px) {
  .nav-desktop a {
    font-size: 0.8125rem;
    padding-inline: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .particulars,
  .site-footer,
  .process-band {
    background: Canvas;
    color: CanvasText;
  }

  .site-footer .brand img {
    filter: none;
  }

  .button-primary {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }
}

@media print {
  .site-header,
  .skip,
  .actions {
    display: none !important;
  }

  body,
  .particulars,
  .process-band,
  .site-footer {
    background: #fff !important;
    color: #000 !important;
  }

  .site-footer .brand img {
    filter: none;
  }

  a {
    color: #000;
  }

  .particulars a[href]::after,
  .contact-email::after,
  .site-footer a[href^="mailto:"]::after,
  .legal a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  .services li,
  .process li,
  .particulars {
    break-inside: avoid;
  }
}
