/* Ad Lunam: lunar survey chart.
   Paper, ink, one blue for the trajectory and links. One family (Archivo),
   expanded width for display, normal width for reading. */

:root {
  --paper: #EBECE7;
  --paper-2: #E2E3DD;
  --ink: #161B2E;
  --graphite: #5A6070;
  --rule: #C8CAC2;
  --earth: #2B54D6;
  --earth-ink: #1E3FAB;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* Scale: 14 / 16 / 18 / 21 / 28 / 40 / 72 */
  --t-small: 0.875rem;
  --t-body: 1.125rem;
  --t-h3: 1.3125rem;
  --t-h2: clamp(1.75rem, 3.4vw, 2.5rem);
  --t-h1: clamp(2.5rem, 6.4vw, 4.5rem);

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Display type: expanded width is the voice of the page */
.hero__title, h2, h3, .logo { font-stretch: 125%; letter-spacing: -0.01em; }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.logo__mark { width: 28px; height: 28px; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2rem; font-size: 1rem; }
.nav a { text-decoration: none; color: var(--graphite); }
.nav a:hover { color: var(--ink); }
.nav .nav__cta { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.menu-btn { display: none; font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--ink); border-radius: 3px; padding: 0.4rem 0.8rem; cursor: pointer; }
.menu { display: grid; padding: 0.5rem var(--gutter) 1rem; border-top: 1px solid var(--rule); }
.menu[hidden] { display: none; }
.menu a { padding: 0.8rem 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--rule); }
.menu a:last-child { border-bottom: 0; font-weight: 700; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 8vw, 6.5rem); }
.hero__title {
  font-size: var(--t-h1);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 15ch;
}
.hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 34rem) auto;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.75rem);
}
.hero__intro p { color: var(--graphite); font-size: 1.1875rem; line-height: 1.55; }
.hero__actions { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

.button {
  display: inline-block; font: inherit; font-size: 1rem; font-weight: 600; font-stretch: 112%;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 3px;
  padding: 0.85rem 1.4rem; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--earth-ink); border-color: var(--earth-ink); }
.button--light { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.button--light:hover { background: #fff; border-color: #fff; }
.textlink { color: var(--earth-ink); font-weight: 600; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.textlink:hover { text-decoration-thickness: 2px; }

/* ---------- Trajectory chart: the one bold element ---------- */
.chart { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.chart__svg { width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--rule); stroke-width: 1; opacity: 0.55; }
.chart__parking, .chart__orbit { fill: none; stroke: var(--graphite); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0.7; }
.chart__crater { fill: #7F817A; opacity: 0.55; }
.chart__body-label { font-family: var(--font); font-size: 15px; fill: var(--graphite); }
.chart__path {
  fill: none; stroke: var(--earth); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.chart__wp circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.chart__num { font-family: var(--font); font-size: 13px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.chart__label { font-family: var(--font); font-size: 19px; font-weight: 600; font-stretch: 125%; fill: var(--ink); }
.chart__caption {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font-size: var(--t-small); color: var(--graphite);
}

/* Single orchestrated moment: the trajectory draws once, waypoints arrive in order. */
@media (prefers-reduced-motion: no-preference) {
  .js .chart__path { stroke-dashoffset: 1; animation: draw 1.8s cubic-bezier(.45,.05,.25,1) .25s forwards; }
  .js .chart__wp { opacity: 0; animation: arrive .35s ease-out forwards; animation-delay: calc(.55s + var(--i) * .32s); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }

/* ---------- Content blocks ---------- */
.block { padding-block: clamp(4rem, 9vw, 7rem); }
.block--rule { border-top: 1px solid var(--rule); }
h2 { font-size: var(--t-h2); font-weight: 650; line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: var(--t-h3); font-weight: 650; line-height: 1.25; }
.block__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.block__head p { color: var(--graphite); max-width: 34rem; }

/* Process stages, matched to the chart's numbered waypoints */
#process { padding-top: clamp(3rem, 6vw, 4.5rem); }
#process h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem; }
.stages h3 { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.stages__n {
  flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font-size: 0.8125rem; font-weight: 700; font-stretch: 100%; transform: translateY(-0.1em);
}
.stages p { color: var(--graphite); font-size: 1rem; line-height: 1.55; }

/* Services: three disciplines, plain lists */
.disciplines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.disciplines h3 { padding-bottom: 0.9rem; margin-bottom: 0.4rem; border-bottom: 2px solid var(--ink); }
.disciplines li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }

/* Engagement terms */
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.terms article { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.terms h3 { margin-bottom: 0.4rem; }
.terms__fit { color: var(--earth-ink); font-weight: 600; font-size: 1rem; margin-bottom: 0.9rem; }
.terms p:last-child { color: var(--graphite); font-size: 1.0625rem; }

.promises__title { margin-top: clamp(3.5rem, 7vw, 5rem); margin-bottom: 1.25rem; }
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 3rem; max-width: 62rem; }
.promises li { color: var(--graphite); }
.promises strong { color: var(--ink); font-weight: 650; }

/* ---------- Contact: the one inverted block ---------- */
.contact { background: var(--ink); color: var(--paper); padding-block: clamp(4rem, 9vw, 7rem); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem 5rem; }
.contact h2 { margin-bottom: 1.25rem; max-width: 14ch; }
.contact__intro p { color: #B9BDC9; max-width: 30rem; }
.contact__intro p + p { margin-top: 1rem; }
.contact__intro a { color: var(--paper); text-underline-offset: 0.25em; }
.contact :focus-visible { outline-color: #8FA8FF; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.form__pair { display: grid; gap: 0.45rem; }
.form__pair--wide, .form__foot { grid-column: 1 / -1; }
.form label { font-size: 0.9375rem; font-weight: 600; }
.form__opt { font-weight: 400; color: #8E93A3; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--paper);
  background: transparent; border: 0; border-bottom: 1px solid #4A5068; border-radius: 0;
  padding: 0.55rem 0;
}
.form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23EBECE7' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.25rem center; padding-right: 1.5rem; }
.form select option { color: var(--ink); }
.form textarea { resize: vertical; min-height: 7rem; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: var(--paper); box-shadow: 0 1px 0 0 var(--paper); }
.form ::placeholder { color: #6E7489; }
.form [aria-invalid="true"] { border-bottom-color: #FF9C8A; }
.form__foot { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.form__status { font-size: 0.9375rem; color: #B9BDC9; }
.form__status.is-error { color: #FFB4A6; }

/* ---------- Footer ---------- */
.footer { padding-block: 2rem; font-size: var(--t-small); color: var(--graphite); }
.footer__row { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.footer__name { color: var(--ink); font-weight: 700; font-stretch: 125%; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
  .disciplines, .terms { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .hero__intro { grid-template-columns: 1fr; }
  .block__head { grid-template-columns: 1fr; }
  .stages, .disciplines, .terms, .promises { grid-template-columns: 1fr; }
  .disciplines, .terms { gap: 2.5rem; }
  .form { grid-template-columns: 1fr; }

  /* Chart at phone width: hide the waypoint words (the list below names them), enlarge the markers */
  .chart__label, .chart__body-label { display: none; }
  .chart__wp circle { r: 24px; stroke-width: 3; }
  .chart__num { font-size: 28px; transform: translateY(5px); transform-box: fill-box; }
  .chart__path { stroke-width: 6; }
  .chart__grid { opacity: 0.35; }
}
