/* Mount Adams Solutions
   Dark, neon. The hero is a stacked-contour model of the real mountain. */

:root {
  --void: #07060d;
  --ink: #f2ecff;
  --ink-soft: #bdb3d9;
  --ink-dim: #8d83b0;
  --violet: #7a2bff;
  --purple: #b026ff;
  --magenta: #ff2bd6;
  --cyan: #7df9ff;
  --rule: #2a1f4a;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--void);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

::selection {
  background: var(--purple);
  color: #fff;
}

a {
  color: var(--cyan);
  text-decoration-color: var(--magenta);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

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

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: max(100svh, 38rem);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(44rem 30rem at 72% 56%, rgba(122, 43, 255, 0.2), transparent 70%),
    radial-gradient(30rem 20rem at 6% 100%, rgba(255, 43, 214, 0.1), transparent 70%),
    var(--void);
}

/* faint scanlines over the whole hero */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px);
}

.bar,
.hero-foot {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.bar a,
.hero-foot > * {
  pointer-events: auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.mark {
  display: block;
  color: var(--ink);
  line-height: 0;
}

.mark svg {
  width: 2.25rem;
  height: 2.25rem;
}

.mark .cap {
  fill: var(--cyan);
}

.bar-link {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink);
}

.hero-foot {
  align-self: end;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding-block: 3rem clamp(2.5rem, 6vw, 4.5rem);
}

h1 {
  margin: 0 0 1.5rem;
  width: fit-content;
  font-size: clamp(2rem, 9.5vw, 5.25rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-shadow:
    -0.022em 0 0 rgba(255, 43, 214, 0.6),
    0.022em 0 0 rgba(125, 249, 255, 0.6),
    0 0 2.2rem rgba(176, 38, 255, 0.45);
}

h1 span {
  display: block;
  white-space: nowrap;
}

.lede {
  margin: 0;
  max-width: 31rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* readout beside the model */
.hud {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.3rem 1.25rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  white-space: nowrap;
}

.hud dt {
  color: var(--ink-dim);
}

.hud dd {
  margin: 0;
  color: var(--ink);
}

.hud .hint {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  color: var(--purple);
}

/* ---------- The model ---------- */

.stage {
  position: absolute;
  z-index: 1;
  left: 70%;
  top: 48%;
  width: min(66vw, 62rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.stage.dragging {
  cursor: grabbing;
}

.stage:focus-visible {
  outline-offset: -1.5rem;
}

.model {
  /* resting pose; terrain.js takes these over */
  --spin: -28deg;
  --tilt: 0.42;
  --rise: 0.9075;
  --scan: 0;
  --scan-o: 0;
}

.floor {
  transform: scaleY(var(--tilt)) rotate(var(--spin));
}

.floor.haze {
  fill: url(#haze);
}

.floor.ring {
  fill: none;
  stroke: var(--violet);
  stroke-opacity: 0.55;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.floor.ticks {
  fill: none;
  stroke: var(--purple);
  stroke-width: 12;
  stroke-dasharray: 0.12 4.88;
  stroke-opacity: 0.8;
}

.floor.ticks.major {
  stroke: var(--cyan);
  stroke-width: 24;
  stroke-dasharray: 0.22 29.78;
  stroke-dashoffset: 0.11;
}

.lvl,
.slab {
  transform: translateY(calc(var(--z) * var(--rise) * -1px)) scaleY(var(--tilt)) rotate(var(--spin));
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.slab {
  fill: #090613;
  stroke: #3a1a8a;
  stroke-width: 1;
}

.lvl {
  fill: var(--f);
  stroke: var(--c);
  stroke-width: 1;
  transition: stroke 1.1s ease-out, stroke-width 1.1s ease-out;
}

.lvl.idx {
  stroke-width: 1.7;
}

.lvl.hot {
  stroke: #fff;
  stroke-width: 2.2;
  transition-duration: 0s;
}

.terrain.glow {
  filter: drop-shadow(0 0 7px rgba(176, 38, 255, 0.55));
}

.scan {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: var(--scan-o);
  transform: translateY(calc(var(--scan) * var(--rise) * -1px)) scaleY(var(--tilt));
}

/* labels pinned to points on the terrain; positioned by terrain.js */
.pins {
  display: none;
  font-family: var(--mono);
  font-size: 14px;
  pointer-events: none;
}

.js .pins {
  display: block;
}

.pin-body {
  transform: scale(var(--pin-scale, 1));
}

.pin circle {
  fill: var(--ink);
}

.pin .lead {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.6;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pin text {
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--void);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.pin.glacier text {
  fill: var(--cyan);
}

.pin.summit text {
  font-size: 16px;
  font-weight: 600;
}

.pin.card text {
  fill: var(--purple);
  font-weight: 600;
}

.pin[data-side="l"] .lead {
  transform: scaleX(-1);
}

.pin[data-side="l"] text {
  text-anchor: end;
  transform: translateX(-100px);
}

.stage.compact .lvl {
  stroke-width: 0.8;
}

.stage.compact .lvl.idx {
  stroke-width: 1.3;
}

.stage.compact .lvl.hot {
  stroke-width: 1.5;
}

.stage.compact .pin.glacier,
.stage.compact .pin.butte {
  display: none;
}

/* opening pose, so nothing jumps before terrain.js takes over: wide screens
   start as a flat map seen from above, narrow ones tilted with no height yet */
@media (prefers-reduced-motion: no-preference) {
  .js .model {
    --rise: 0;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 45.01rem) {
  .js .model {
    --tilt: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .lvl {
    animation: lvl-in 0.45s ease-out both;
    animation-delay: calc(var(--i) * 32ms);
  }

  .js .pins {
    animation: lvl-in 0.7s ease-out 1.1s both;
  }
}

@keyframes lvl-in {
  from {
    opacity: 0;
  }
}

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

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 2rem 3rem;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

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

h2 {
  margin: 0;
  font-size: 1.5rem;
  font-stretch: 112%;
  font-weight: 650;
  line-height: 1.2;
}

.services {
  margin: 0;
}

.services > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 0.35rem 2rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--rule);
}

.services > div:first-child {
  padding-top: 0.3rem;
  border-top: 0;
}

.services > div:last-child {
  padding-bottom: 0;
}

.services dt {
  font-weight: 600;
}

.services dd {
  margin: 0;
  color: var(--ink-soft);
}

.prose p {
  margin: 0.2rem 0 1rem;
  max-width: 36rem;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.email {
  font-family: var(--mono);
  font-size: clamp(0.9375rem, 3.7vw, 1.625rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.email::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.2em;
  vertical-align: -0.16em;
  background: var(--magenta);
}

@media (prefers-reduced-motion: no-preference) {
  .email::after {
    animation: blink 1.1s steps(1) infinite;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

.lost {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  min-height: 100svh;
  padding-block: 3rem;
}

.lost > * {
  margin: 0;
}

.lost-code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--purple);
}

/* ---------- Link-preview capture (index.html#card, see CLAUDE.md) ---------- */

.card .hud,
.card .bar-link {
  visibility: hidden;
}

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

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- Mid-width screens ---------- */

@media (max-width: 64rem) {
  .stage {
    left: 60%;
    top: 38%;
    width: min(74vw, 46rem);
  }

  .hero-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .hud .wide-only {
    display: none;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 45rem) {
  .hero {
    min-height: 0;
  }

  .stage {
    left: 50%;
    top: -7vw;
    width: 112vw;
    transform: translateX(-50%);
  }

  .hero-foot {
    padding-top: 56vw;
  }

  .section,
  .services > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    gap: 1.5rem;
  }
}
