/* Crineon Limited — landing page
   Brand palette and type per Crineon Brand Guidelines v1.0 */

:root {
  --petrol: #0A3B4F;
  --lime: #B6E33B;
  --ink: #0D1F26;
  --harbour: #4A6670;
  --deep-lime: #4D7A0F;
  --spray: #F2F6F6;
  --white: #FFFFFF;
  --line: #DFE9EA;

  --font-heading: "Manrope", Arial, sans-serif;
  --font-body: "IBM Plex Sans", Arial, sans-serif;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--deep-lime);
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

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

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--petrol);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 32px;
}

.brand {
  display: block;
  line-height: 0;
}

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

.tagline {
  color: var(--harbour);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Hero */

.hero {
  padding: 88px 0 80px;
}

.hero h1 {
  max-width: 790px;
  margin: 0 0 24px;
  font-size: clamp(2.125rem, 4.6vw, 3rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.66;
}

/* Companies */

.companies {
  padding-bottom: 104px;
}

.companies h2 {
  margin: 0 0 26px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.companies h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--lime);
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.company {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 24px;
  background: var(--spray);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.company:hover {
  border-color: rgba(10, 59, 79, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 59, 79, 0.07);
}

.company:focus-within {
  border-color: var(--petrol);
}

.company-logo {
  --logo-height: 120px;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #E4ECEC;
  border-radius: 6px;
}

.company-logo img {
  display: block;
  width: auto;
  height: var(--logo-height);
  max-width: 100%;
  object-fit: contain;
}

.company h3 {
  margin: 22px 0 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.company h3 a {
  color: var(--ink);
  text-decoration: none;
}

.company h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.company h3 a:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.company p {
  max-width: 42ch;
  color: var(--harbour);
  font-size: 15.5px;
  line-height: 1.65;
}

.company-link {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--deep-lime);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}

.arrow {
  font-size: 14px;
  transition: transform 180ms ease;
}

.company:hover .arrow {
  transform: translate(1px, -1px);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 44px;
  color: var(--harbour);
  font-size: 13px;
}

.footer-tagline {
  color: var(--petrol);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
}

/* Small screens */

@media (max-width: 720px) {
  .header-inner {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .brand img {
    width: 164px;
  }

  .tagline {
    display: none;
  }

  .hero {
    padding: 56px 0 56px;
  }

  .hero h1 {
    margin-bottom: 20px;
  }

  .lede {
    font-size: 17px;
  }

  .companies {
    padding-bottom: 72px;
  }

  .company-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .company-logo {
    --logo-height: 96px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    padding-bottom: 36px;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding: 20px;
  }

  .brand img {
    width: 120px;
  }

  .company {
    padding: 16px 16px 20px;
  }

  .company h3 {
    margin-top: 18px;
    font-size: 19px;
  }

  .hero {
    padding: 36px 0 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .company:hover {
    transform: none;
  }

  .company:hover .arrow {
    transform: none;
  }
}
