/* Infinity Return Group — one page, two sides.
   The navy of the hero keeps running down the right-hand "back of house" column,
   so the white "front of house" panel reads as cut out of it. */

:root {
  --navy: #001668;      /* logo circle */
  --navy-deep: #000f4a; /* footer, pressed states */
  --sky: #9edaf3;       /* logo highlight */
  --paper: #ffffff;
  --mist: #eef3fa;
  --line: #d5ddec;
  --slate: #3b4670;     /* body text on paper */
  --haze: #c9d3ef;      /* body text on navy */

  --display: "Red Hat Display", system-ui, sans-serif;
  --text: "Red Hat Text", system-ui, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  /* left/right padding that lines full-bleed panels up with the centred content column */
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
.on-paper :focus-visible { outline-color: var(--navy); }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--sky); color: var(--navy); padding: 8px 14px; border-radius: 6px;
  font-weight: 600; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- hero ---------- */

.hero {
  background: var(--navy);
  color: var(--paper);
  padding: 0 var(--edge) clamp(72px, 12vw, 152px);
}

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; font: 700 1.0625rem/1 var(--display); letter-spacing: -0.01em;
}
/* the circle is the hero's own navy, so only the letters show */
.brand img { width: 52px; height: 52px; margin: -6px; }
.nav ul { display: flex; gap: clamp(16px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav ul a {
  text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.nav ul a:hover { border-bottom-color: var(--sky); }

.hero h1 {
  margin-top: clamp(64px, 11vw, 144px);
  max-width: 13ch;
  font-size: clamp(2.6rem, 1.1rem + 6.2vw, 5.75rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero .lede {
  max-width: 34rem;
  margin: clamp(24px, 3vw, 36px) 0 0;
  color: var(--haze);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

/* ---------- companies: front | back ---------- */

.sides { display: grid; grid-template-columns: 1fr 1fr; }

.side { padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px); }
.side.front { background: var(--paper); padding-left: var(--edge); }
.side.back  { background: var(--navy); color: var(--paper); padding-right: var(--edge); }

.side h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.front h2 { color: var(--navy); }
.side > p { max-width: 30rem; margin: 12px 0 0; }
.back > p { color: var(--haze); }

.companies { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; }
.company {
  position: relative;
  display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.back .company { border-top-color: rgba(158, 218, 243, 0.22); }

.company img {
  width: 96px; height: 86px; object-fit: cover;
  border-radius: 10px; background: #fff;
}
.front .company img { outline: 1px solid var(--line); outline-offset: -1px; }

.company h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.front .company h3 { color: var(--navy); }
.company h3 a { text-decoration: none; }
/* the whole row opens the company's site */
.company h3 a::after { content: ""; position: absolute; inset: 0; }
.company p { margin: 4px 0 0; font-size: 0.96875rem; line-height: 1.5; }
.back .company p { color: var(--haze); }
.company .domain { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.875rem; font-weight: 500; }
.front .company .domain { color: var(--navy); }
.back .company .domain { color: var(--sky); }
.domain svg { width: 12px; height: 12px; flex: none; }

.company:hover h3 a, .company:focus-within h3 a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.front .company:hover h3 a { text-decoration-color: var(--sky); }

/* ---------- about ---------- */

.about {
  padding: clamp(72px, 10vw, 128px) var(--edge);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.about h2 { color: var(--navy); font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.about p { margin: 0 0 1em; max-width: 36rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.65; }
.about p:last-child { margin-bottom: 0; }

/* ---------- contact / footer ---------- */

.contact { background: var(--navy-deep); color: var(--paper); padding: clamp(56px, 8vw, 96px) var(--edge) 32px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.contact h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.contact h3 { font: 600 0.9375rem/1.4 var(--text); color: var(--sky); margin-bottom: 8px; }
.contact address, .contact p { font-style: normal; margin: 0; color: var(--haze); line-height: 1.6; }
.contact a { color: var(--paper); text-underline-offset: 3px; }
.contact a:hover { color: var(--sky); }
.legal {
  margin-top: clamp(48px, 7vw, 80px); padding-top: 20px;
  border-top: 1px solid rgba(158, 218, 243, 0.22);
  font-size: 0.875rem; color: var(--haze);
}

/* ---------- 404 ---------- */

.lost { min-height: 100vh; display: flex; flex-direction: column; }
.lost .hero { flex: 1; }
.lost .actions { margin-top: 32px; }
.button {
  display: inline-block; padding: 14px 22px; border-radius: 999px;
  background: var(--sky); color: var(--navy); font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--paper); }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .sides { grid-template-columns: 1fr; }
  .side.front, .side.back { padding-left: var(--gutter); padding-right: var(--gutter); }
  .about { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
  .nav ul { display: none; }
  .company { grid-template-columns: 72px 1fr; gap: 16px; }
  .company img { width: 72px; height: 65px; }
}
