/* Aileron (CC0): a Helvetica-style fallback with real light weights, for systems
   without Helvetica Neue. Apple devices use Helvetica Neue and never download it. */
@font-face {
  font-family: 'Aileron';
  src: url('fonts/aileron-latin-300-normal.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('fonts/aileron-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('fonts/aileron-latin-600-normal.woff2') format('woff2');
  font-weight: 500 600;
  font-display: swap;
}

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

/* Greyscale only. The moon artwork is quantised to similar steps. */
:root {
  --void: #000000;
  --graphite: #121212;
  --line: #262626;
  --steel: #4d4d4d;
  --ash: #8c8c8c;
  --fog: #c4c4c4;
  --white: #f2f2f2;
  --font: 'Helvetica Neue', 'Aileron', Helvetica, Arial, sans-serif;
  --measure: 1080px;
  --cell: 4px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--void);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 2rem;
}

:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

/* ── Headers with the moon ── */
.hero,
.page-head {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--void);
}

.hero {
  min-height: 100svh;
}

.page-head {
  min-height: 64svh;
}

.moon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* LED matrix: a dark hairline grid laid over the pixels */
.matrix {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
}

/* ── Navigation ── */
.nav {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2rem;
}

.wordmark {
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--fog);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* ── Hero (home) ── */
.hero-body {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16vh 2rem 40vh;
}

.hero h1 {
  font-size: clamp(1.875rem, 4.2vw, 3.375rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

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

.hero .actions {
  justify-content: center;
}

/* ── Page header (subpages) ── */
.page-head-body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 12vh;
  padding-bottom: 26vh;
}

.page-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--fog);
  max-width: 46ch;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-light {
  background: var(--white);
  color: var(--void);
  border: 1px solid var(--white);
}

.btn-light:hover {
  background: var(--fog);
  border-color: var(--fog);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--steel);
}

.btn-ghost:hover {
  border-color: var(--white);
}

/* ── Sections ── */
.section {
  padding: 7rem 0;
  border-top: 1px solid var(--line);
}

/* The header's moon already closes the top of the page */
main > .section:first-child {
  border-top: 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  align-items: start;
}

.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head p {
  color: var(--ash);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 52ch;
}

/* Bordered rows: services */
.rows {
  list-style: none;
  border-top: 1px solid var(--line);
}

.rows > li {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.rows h3 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.rows p {
  color: var(--ash);
  line-height: 1.7;
  max-width: 56ch;
}

.product-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--fog);
  text-underline-offset: 5px;
}

.product-link:hover {
  color: var(--white);
}

.leaf {
  filter: grayscale(1);
}

/* ── Contact page ── */
.email-big {
  display: inline-block;
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  text-decoration: none;
  border-bottom: 1px solid var(--steel);
  padding-bottom: 0.25rem;
  transition: border-color 0.15s;
  overflow-wrap: anywhere;
}

.email-big:hover {
  border-color: var(--white);
}

.location {
  margin-top: 1.5rem;
  color: var(--ash);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  color: var(--ash);
  font-size: 0.875rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-top .wordmark {
  font-size: 0.75rem;
}

.footer-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: var(--fog);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 0.8125rem;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .wrap {
    padding: 0 1rem;
  }

  .nav {
    padding-top: 1.25rem;
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .hero-body {
    padding: 12vh 1rem 36vh;
  }

  .page-head-body {
    padding-top: 9vh;
    padding-bottom: 22vh;
  }

  .section {
    padding: 4.5rem 0;
  }

  .section-head,
  .rows > li {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }

  .rows > li {
    gap: 0.75rem;
  }
}

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