:root {
  --bg: #111316;
  --surface: #191d22;
  --surface-raised: #20252b;
  --text: #f3f0e8;
  --muted: #aaa69e;
  --accent: #7df5a6;
  --warm: #24201b;
  --line: rgba(243, 240, 232, 0.14);
  --max-width: 72rem;
  --radius: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 82% 4%, rgba(125, 245, 166, 0.08), transparent 26rem),
    linear-gradient(180deg, #111316 0%, #0d0f12 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #071009;
}

a {
  color: inherit;
  text-decoration-color: rgba(125, 245, 166, 0.55);
  text-underline-offset: 0.24em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.site-header {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.35rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1.25rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.section-shell,
.footer-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.section-shell {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.hero {
  min-height: min(44rem, calc(100svh - 5.5rem));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: clamp(5rem, 11vw, 9rem);
}

.eyebrow,
.project-number {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.03;
  text-wrap: balance;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.45rem, 12.2vw, 9rem);
  font-weight: 820;
  letter-spacing: -0.072em;
}

h2 {
  max-width: 15ch;
  margin-bottom: clamp(2.3rem, 5vw, 4rem);
  font-size: clamp(2.25rem, 6vw, 4.8rem);
  font-weight: 760;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.035em;
}

.hero-kicker {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  font-weight: 680;
  letter-spacing: -0.025em;
}

.hero-intro {
  max-width: 41rem;
  margin-bottom: 2.4rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #08110b;
}

.button-primary:hover {
  background: #a2f9bf;
  color: #08110b;
}

.button-ghost:hover {
  border-color: rgba(125, 245, 166, 0.6);
}

.capability-grid,
.project-grid {
  display: grid;
  gap: 1rem;
}

.capability-grid article,
.project-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.capability-grid article {
  padding: 1.55rem;
}

.capability-grid p,
.project-grid article > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.projects-section {
  border-top: 1px solid var(--line);
}

.project-grid article {
  position: relative;
  padding: 1.6rem;
}

.project-number {
  margin-bottom: 3.8rem;
}

.project-grid h3 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.history-section {
  background:
    linear-gradient(90deg, rgba(125, 245, 166, 0.045), transparent 32%),
    var(--warm);
  border-block: 1px solid var(--line);
}

.history-inner {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.history-inner > p:not(.eyebrow),
.jolly-quote {
  max-width: 50rem;
}

.jolly-quote {
  margin: clamp(2.5rem, 5vw, 4.5rem) 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--accent);
}

.jolly-quote p {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

cite {
  font-style: italic;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(5rem, 0.28fr) 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline strong {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.timeline span {
  color: var(--muted);
}

.contact-section {
  padding-bottom: clamp(5.5rem, 12vw, 10rem);
}

.contact-section > p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
}

.contact-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text);
  font-size: clamp(1.2rem, 4.2vw, 2.5rem);
  font-weight: 740;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  text-decoration-color: var(--accent);
}

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

.footer-inner {
  padding-block: 2rem 3rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-inner p {
  margin-bottom: 0;
}

@media (min-width: 42rem) {
  .site-header {
    padding-block: 1.6rem;
  }

  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-grid article,
  .project-grid article {
    padding: 2rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-number {
    margin-bottom: 6rem;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (min-width: 64rem) {
  .capability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 35rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Mole Miner holding page */
.project-grid h3 a {
  text-decoration: none;
}

.holding-hero {
  max-width: var(--max-width);
}

.holding-note {
  max-width: 41rem;
  margin-bottom: 2.4rem;
  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

/* Mole Miner themed holding page */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.moleminer-page {
  --accent: #42d8ff;
  --mm-gold: #ffb52e;
  --mm-deep: #05101b;
  --mm-ink: #02070d;
  background: var(--mm-ink);
}

.moleminer-page::selection {
  background: var(--mm-gold);
  color: #1a0e00;
}

.moleminer-site-header {
  position: relative;
  z-index: 20;
  border-bottom-color: rgba(66, 216, 255, 0.18);
}

.moleminer-site-header .wordmark-mark {
  border-color: var(--mm-gold);
  color: var(--mm-gold);
}

.moleminer-hero {
  position: relative;
  min-height: clamp(42rem, 86svh, 58rem);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(2, 7, 13, 0.14) 0%, rgba(2, 7, 13, 0.25) 52%, rgba(2, 7, 13, 0.92) 100%),
    radial-gradient(circle at 50% 44%, rgba(5, 23, 41, 0.05) 0%, rgba(2, 7, 13, 0.46) 72%),
    url('/assets/moleminer/cave.webp') center / cover no-repeat;
  border-bottom: 1px solid rgba(66, 216, 255, 0.18);
}

.moleminer-hero-inner {
  position: relative;
  z-index: 4;
  width: min(calc(100% - 2rem), 68rem);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(0rem, 3vw, 2rem) clamp(12rem, 24vw, 16rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.moleminer-eyebrow {
  color: var(--mm-gold);
  text-shadow: 0 0 1.4rem rgba(255, 181, 46, 0.25);
}

.moleminer-logo {
  display: block;
  width: min(88vw, 54rem);
  height: auto;
  margin: 0 auto clamp(1.2rem, 3vw, 2rem);
  filter: drop-shadow(0 1.2rem 1.8rem rgba(0, 0, 0, 0.55));
}

.moleminer-returning {
  margin-bottom: 0.65rem;
  color: #fff8df;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  font-weight: 820;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 0.3rem 1.2rem rgba(0, 0, 0, 0.9);
}

.moleminer-lede {
  max-width: 39rem;
  margin-bottom: 1.8rem;
  color: rgba(245, 248, 250, 0.86);
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.9);
}

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

.moleminer-page .button-ghost {
  border-color: rgba(255, 181, 46, 0.5);
  background: rgba(3, 11, 19, 0.58);
  backdrop-filter: blur(0.5rem);
}

.moleminer-page .button-ghost:hover {
  border-color: var(--mm-gold);
  color: #fff8df;
  background: rgba(30, 20, 8, 0.78);
}

.moley-art {
  position: absolute;
  z-index: 3;
  right: clamp(-4.5rem, 1vw, 1.5rem);
  bottom: -3.5rem;
  width: clamp(15rem, 29vw, 27rem);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 1.8rem 2.1rem rgba(0, 0, 0, 0.62));
}

.moleminer-return {
  position: relative;
  padding-top: clamp(2.8rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
  text-align: center;
}

.coming-soon-art {
  display: block;
  width: min(100%, 66rem);
  height: auto;
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.45));
}

.moleminer-return-copy {
  max-width: 43rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.mine-divider {
  display: block;
  width: min(100%, 68rem);
  height: auto;
  margin: 0 auto;
  opacity: 0.94;
  filter: drop-shadow(0 0.8rem 1.2rem rgba(0, 0, 0, 0.35));
}

.moleminer-heritage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 50%, rgba(23, 149, 226, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 65%, rgba(255, 111, 30, 0.12), transparent 28rem),
    linear-gradient(180deg, #07111c 0%, #03080e 100%);
  border-block: 1px solid rgba(66, 216, 255, 0.14);
}

.moleminer-heritage-inner {
  position: relative;
  min-height: 36rem;
  display: grid;
  align-items: center;
}

.moleminer-heritage-copy {
  position: relative;
  z-index: 3;
  width: min(100%, 47rem);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.2rem);
  border: 1px solid rgba(255, 181, 46, 0.22);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgba(7, 16, 27, 0.91), rgba(3, 8, 14, 0.78));
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(0.6rem);
}

.moleminer-heritage-copy h2 {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 5vw, 4rem);
  color: #fff6dc;
}

.moleminer-heritage-copy > p:not(.eyebrow):not(.hero-actions) {
  max-width: 43rem;
  color: rgba(243, 240, 232, 0.78);
}

.crystal-art {
  position: absolute;
  z-index: 1;
  width: clamp(13rem, 30vw, 28rem);
  height: auto;
  pointer-events: none;
  opacity: 0.7;
  filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.45));
}

.crystal-art-blue {
  left: clamp(-9rem, -5vw, -2rem);
  bottom: clamp(-4rem, -2vw, -1rem);
}

.crystal-art-red {
  right: clamp(-10rem, -6vw, -3rem);
  top: clamp(-4rem, -2vw, -1rem);
}

.moleminer-primary {
  margin-top: 1rem;
  border-color: var(--mm-gold);
  background: var(--mm-gold);
  color: #1a0e00;
}

.moleminer-primary:hover {
  background: #ffd072;
  color: #1a0e00;
}

.moleminer-footer {
  background: #02070d;
  border-top-color: rgba(66, 216, 255, 0.15);
}

@media (max-width: 52rem) {
  .moleminer-hero {
    min-height: 44rem;
    background-position: center top;
  }

  .moleminer-hero-inner {
    padding-top: 4.2rem;
    padding-bottom: 15rem;
  }

  .moley-art {
    right: 50%;
    bottom: -4rem;
    width: min(18rem, 64vw);
    transform: translateX(50%);
    opacity: 0.96;
  }

  .crystal-art {
    width: clamp(11rem, 42vw, 18rem);
    opacity: 0.42;
  }
}

@media (max-width: 35rem) {
  .moleminer-site-header {
    background: rgba(2, 7, 13, 0.88);
  }

  .moleminer-hero {
    min-height: 42rem;
  }

  .moleminer-hero-inner {
    padding-top: 3rem;
    padding-bottom: 14rem;
  }

  .moleminer-logo {
    width: 96vw;
    max-width: 32rem;
  }

  .moleminer-returning {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .mine-divider {
    width: 112%;
    max-width: none;
    margin-left: -6%;
  }

  .moleminer-heritage-copy {
    padding: 1.5rem;
  }

  .crystal-art-blue {
    left: -7rem;
  }

  .crystal-art-red {
    right: -8rem;
  }
}
