/* Astrocom — static site styles */

:root {
  --paper: #eceeef;
  --surface: #f8f9f9;
  --ink: #10243a;
  --muted: #566473;
  --rule: #c3cad0;
  --green: #0e5a47;
  --green-deep: #0a4435;
  --on-dark-muted: #aebbc7;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

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

.dark :focus-visible { outline-color: #fff; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
  border-radius: 3px;
}
.skip:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}

.btn--solid { background: var(--green); color: #fff; }
.btn--solid:hover { background: var(--green-deep); }

.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.015em;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 30px; height: 30px; }

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

.nav__links {
  display: flex;
  gap: 1.75rem;
}

.nav__links a {
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover { border-bottom-color: var(--green); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--rule);
}

.hero__traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--green);
}

.hero__traces path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: .28;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.hero__traces circle {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 2;
  opacity: .4;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.03em;
  max-width: 14em;
}

.hero__lede {
  margin-top: 1.6rem;
  max-width: 34em;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.2rem;
}

/* Work order sheet */

.order {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -24px rgba(16, 36, 58, .35);
}

.order__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .9rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px 2px 0 0;
  font-weight: 600;
  font-size: .95rem;
}
.order__head span { font-weight: 400; color: var(--on-dark-muted); }

.order__body { padding: .35rem 1.25rem 1rem; }

.order__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .98rem;
  line-height: 1.5;
}
.order__row:last-child { border-bottom: 0; }
.order__row dt { color: var(--muted); font-weight: 500; }
.order__row dd { color: var(--ink); }
.order__row--result dd { color: var(--green); font-weight: 600; }

.order__note {
  padding: .7rem 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: .85rem;
  color: var(--muted);
}

/* One-time trace draw on load */
@media (prefers-reduced-motion: no-preference) {
  .hero__traces path {
    stroke-dashoffset: 1;
    animation: draw 2.6s cubic-bezier(.4, 0, .2, 1) forwards;
    animation-delay: calc(var(--i, 0) * .22s + .15s);
  }
  .hero__traces circle {
    opacity: 0;
    animation: pad .5s ease-out forwards;
    animation-delay: calc(var(--i, 0) * .22s + 2.1s);
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pad { to { opacity: .4; } }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 8vw, 7rem) 0; }

.section--surface {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section__head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section__title {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.025em;
}

.section__intro {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 34em;
}

/* ---------- Services ---------- */

.services { border-bottom: 1px solid var(--rule); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.service__name {
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.012em;
}

.service__text { max-width: 36em; }

.service__list {
  font-size: .96rem;
  color: var(--muted);
}
.service__list li {
  padding: .3rem 0 .3rem 1rem;
  position: relative;
}
.service__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .95em;
  width: .4rem;
  height: 2px;
  background: var(--green);
}

/* ---------- Experience ---------- */

.depth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.depth__copy p + p { margin-top: 1.1rem; }
.depth__copy .section__title { margin-bottom: 1.5rem; }
.depth__copy p { color: var(--muted); max-width: 31em; }

.areas { border-top: 2px solid var(--ink); }

.areas__row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.areas__row dt { font-weight: 650; }
.areas__row dd { color: var(--muted); }

/* ---------- Process ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.steps::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 0;
  top: 1.1rem;
  height: 2px;
  background: var(--green);
  opacity: .35;
}

.step { position: relative; }

.step__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--green);
  color: var(--green);
  font-weight: 700;
  font-size: .95rem;
}

.step__name {
  margin-top: 1.25rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -.01em;
}

.step__text {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .98rem;
  max-width: 17em;
}

/* ---------- Contact ---------- */

.dark {
  background: var(--ink);
  color: var(--paper);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact .section__title { color: #fff; }

.contact__lede {
  margin-top: 1.1rem;
  color: var(--on-dark-muted);
  max-width: 28em;
}

.details {
  margin-top: 2.25rem;
  border-top: 1px solid rgba(236, 238, 239, .25);
}

.details__row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(236, 238, 239, .25);
}
.details__row dt { color: var(--on-dark-muted); }
.details__row a { text-underline-offset: 3px; }

.form { display: grid; gap: 1.1rem; }

.form__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field { display: grid; gap: .4rem; }

.field label { font-weight: 500; font-size: .96rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea { min-height: 8.5rem; resize: vertical; }

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form__hint { color: var(--on-dark-muted); font-size: .92rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  border-top: 1px solid rgba(236, 238, 239, .2);
  font-size: .92rem;
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding: 1.6rem 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__traces { display: none; }

  .hero__inner,
  .depth,
  .contact { grid-template-columns: minmax(0, 1fr); }

  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .service__list { grid-column: 2; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .steps::before { display: none; }
}

@media (max-width: 720px) {
  .site-header__bar { flex-wrap: wrap; padding: .75rem 0 .5rem; min-height: 0; }
  .nav { width: 100%; justify-content: space-between; gap: 1rem; }
  .nav__links { gap: 1.1rem; }
  .nav__links a { font-size: .93rem; }
  .nav .btn { padding: .6rem 1rem; font-size: .93rem; }

  .service { grid-template-columns: minmax(0, 1fr); gap: .9rem; padding: 1.6rem 0; }
  .service__list { grid-column: auto; }

  .areas__row { grid-template-columns: minmax(0, 1fr); gap: .25rem; }

  .order__row { grid-template-columns: minmax(0, 1fr); gap: .1rem; }

  .steps { grid-template-columns: minmax(0, 1fr); }
  .form__pair { grid-template-columns: minmax(0, 1fr); }
  .details__row { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
}

@media (max-width: 480px) {
  .nav .btn { display: none; }
}
