/* MontiumX — landing page
   Black canvas, whitish hairlines. Jost for type, Geist Mono for labels. */

:root {
  --bg: #000;
  --ink: #f2f2f2;
  --ink-2: #a6a6a6;
  --ink-3: #808080;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.07);
  --line-3: rgba(255, 255, 255, 0.32);

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  --header-h: 76px;

  --font: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--ink); color: #000; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: #000;
  font-size: 14px; transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus-visible { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Blueprint frame: two hairlines on the container edges, the full height of the page */
.frame { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.frame::before,
.frame::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.frame::before { left: var(--edge); }
.frame::after { right: var(--edge); }

/* Type */
.label,
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

h2 {
  font-weight: 300;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  height: 50px;
  padding: 0 24px;
  border: 1px solid var(--line-3);
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.btn--solid { background: var(--ink); border-color: var(--ink); color: #000; }
.btn--solid:hover { background: #fff; }
.btn--line:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }

.arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform .35s var(--ease); }
.btn:hover .arrow,
.mail:hover .arrow { transform: translateX(4px); }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.66);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-2);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 15px; color: var(--ink); }
.brand__mark { width: auto; height: 28px; overflow: visible; stroke-width: 8; }
.brand__word { width: auto; height: 11px; }

.nav { display: flex; gap: 36px; margin-left: auto; margin-right: 12px; }
.nav a { position: relative; padding: 6px 0; font-size: 14px; letter-spacing: 0.03em; color: var(--ink-2); transition: color .3s var(--ease); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Line-drawing for the mark (header + hero X) */
.draw path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .draw path { stroke-dashoffset: 1; opacity: 0; }
.js .draw.is-drawn path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset 1s var(--ease); }
.js .draw.is-drawn .draw__b { transition-delay: .55s; transition-duration: .6s; }
.js .draw.is-drawn .draw__c { transition-delay: .8s; transition-duration: .6s; }

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(40px, 9vh, 110px));
  overflow: clip;
}
.hero__copy { position: relative; z-index: 2; text-align: center; }
.eyebrow__sep { margin: 0 .5em; color: var(--line-3); }

.hero__title {
  margin-top: 26px;
  font-weight: 300;
  font-size: clamp(50px, 7vw, 100px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.hero__title .line > span { display: inline-block; }

.hero__lede { max-width: 500px; margin: 26px auto 0; font-size: clamp(17px, 1.3vw, 19px); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }

.hero__art {
  position: relative;
  z-index: 1;
  flex: none;
  width: max(118vw, 1200px);
  margin-top: auto;
  margin-left: 50%;
  transform: translateX(-50%);
  container-type: inline-size;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 52%, transparent 96%);
}
.hero__layer {
  position: relative;
  aspect-ratio: 3840 / 1268;
  margin-top: clamp(-40px, -2vw, 0px);
  background: #000;
  will-change: transform;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 24%, #000 76%, transparent 96%);
  mask-image: linear-gradient(to right, transparent 4%, #000 24%, #000 76%, transparent 96%);
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .62; }
.js .hero__img { opacity: 0; transform: translateY(18px); transition: opacity 2s var(--ease) .35s, transform 2.4s var(--ease) .35s; }
.js .hero.is-ready .hero__img { opacity: .62; transform: none; }

/* A slow light sweep across the ridgelines: a white band blended with overlay brightens lines, leaves black black */
.hero__layer::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  mix-blend-mode: overlay;
  transform: translateX(-110%);
  animation: sweep 11s cubic-bezier(.45, 0, .55, 1) 2.6s infinite;
}
.hero.is-offscreen .hero__layer::after { animation-play-state: paused; }
@keyframes sweep {
  0% { transform: translateX(-110%); }
  55%, 100% { transform: translateX(560%); }
}

.hero__x {
  position: absolute;
  left: 49.77%;
  top: 23.66%;
  width: 4cqi;
  height: 4cqi;
  overflow: visible;
  color: var(--ink);
  stroke-width: 1.5;
  transform: translate(-50%, calc(-50% - 1.4cqi));
}
.js .hero__x.is-drawn .draw__b { transition-delay: 0s; transition-duration: .7s; }
.js .hero__x.is-drawn .draw__c { transition-delay: .25s; transition-duration: .7s; }

/* Hero entrance */
.js .hero .reveal { transition-delay: var(--d, 0s); }
.js .hero__title .line.reveal { opacity: 1; transform: none; }
.js .hero__title .line > span { transform: translateY(135%); transition: transform 1.3s var(--ease) var(--d, 0s); }
.js .hero__title .line.is-in > span { transform: none; }
.hero .eyebrow { --d: .1s; }
.hero__title .line:nth-child(1) { --d: .2s; }
.hero__title .line:nth-child(2) { --d: .32s; }
.hero__lede { --d: .55s; }
.hero__actions { --d: .68s; }

/* Generic scroll reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Sections */
.section { position: relative; padding: clamp(96px, 13vw, 176px) 0; }
.section + .section { border-top: 1px solid var(--line-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  align-items: start;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head .label { padding-top: .9em; }

/* Services */
.cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.card { position: relative; display: flex; flex-direction: column; }
.card + .card { --d: .12s; border-left: 1px solid var(--line); }

.card__art { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
.card__art img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: .78; transform: scale(1.01);
  transition: transform 1.4s var(--ease), opacity .8s var(--ease);
}
.card:hover .card__art img { opacity: 1; transform: scale(1.05); }

.card__body { padding: clamp(28px, 3vw, 40px); }
.card__index { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
.card h3 { margin-top: 14px; font-weight: 300; font-size: clamp(26px, 2.5vw, 34px); line-height: 1.15; letter-spacing: -0.01em; }
.card p { margin-top: 14px; max-width: 46ch; color: var(--ink-2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 6px 10px 5px;
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
}

/* Plus-shaped registration ticks on frame corners */
.tick { position: absolute; z-index: 2; width: 13px; height: 13px; }
.tick::before,
.tick::after { content: ""; position: absolute; background: var(--ink); }
.tick::before { left: 6px; top: 0; width: 1px; height: 13px; }
.tick::after { top: 6px; left: 0; width: 13px; height: 1px; }
.tick--tl { top: -7px; left: -7px; }
.tick--tr { top: -7px; right: -7px; }
.tick--bl { bottom: -7px; left: -7px; }
.tick--br { bottom: -7px; right: -7px; }

/* Approach */
.ascent { color: var(--ink); }
.ascent__svg { width: 100%; height: auto; overflow: visible; }
.ascent__ridge { stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ascent__guides { stroke-width: 1; opacity: .2; }
.ascent__points circle { stroke-width: 1.3; }
.ascent__x { stroke-width: 1.6; }
.ascent__x path { stroke-dasharray: 1; stroke-dashoffset: 0; }

.js .ascent__ridge { stroke-dashoffset: 1; }
.js .ascent__guides path { transform-box: fill-box; transform-origin: top; transform: scaleY(0); }
.js .ascent__points circle { opacity: 0; }
.js .ascent__x path { stroke-dashoffset: 1; opacity: 0; }
.js .ascent.is-in .ascent__ridge { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s cubic-bezier(.5, 0, .2, 1); }
.js .ascent.is-in .ascent__guides path { transform: none; transition: transform 1s var(--ease); }
.js .ascent.is-in .ascent__points circle { opacity: 1; transition: opacity .5s var(--ease); }
.js .ascent.is-in .ascent__x path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset .6s var(--ease) 2.5s, opacity 0s 2.5s; }
.js .ascent.is-in .ascent__x path + path { transition-delay: 2.75s, 2.75s; }
.ascent__guides path:nth-child(1), .ascent__points circle:nth-child(1) { transition-delay: .1s !important; }
.ascent__guides path:nth-child(2), .ascent__points circle:nth-child(2) { transition-delay: .75s !important; }
.ascent__guides path:nth-child(3), .ascent__points circle:nth-child(3) { transition-delay: 1.4s !important; }
.ascent__guides path:nth-child(4) { transition-delay: 2.3s !important; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 26px 24px 8px 22px; border-left: 1px solid var(--line); }
.step:nth-child(2) { --d: .1s; }
.step:nth-child(3) { --d: .2s; }
.step:nth-child(4) { --d: .3s; }
.step__n { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
.step h3 { margin-top: 10px; font-weight: 400; font-size: 22px; letter-spacing: -0.005em; }
.step p { margin-top: 8px; max-width: 26ch; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

/* Contact */
.contact {
  position: relative;
  padding: clamp(120px, 16vw, 220px) 0;
  border-top: 1px solid var(--line-2);
  overflow: clip;
  text-align: center;
}
.contact__art {
  position: absolute; inset: 0; z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 30%, transparent 78%);
}
.contact__art img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 43%; opacity: .5; }
.contact__art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 34% 40% at 50% 52%, rgba(0, 0, 0, .9), transparent 100%);
}
.contact__inner { position: relative; z-index: 1; }
.contact h2 { margin-top: 22px; font-size: clamp(42px, 6.6vw, 92px); line-height: 1.02; letter-spacing: -0.025em; }
.contact__lede { margin-top: 22px; color: var(--ink-2); font-size: clamp(17px, 1.3vw, 19px); }
.contact h2 { --d: .08s; }
.contact__lede { --d: .16s; }

.mail {
  --d: .24s;
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 44px; padding-bottom: 12px;
  font-weight: 300; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -0.005em;
  border-bottom: 1px solid var(--line-3);
  transition: border-color .4s var(--ease);
}
.mail .arrow { width: 20px; height: 20px; stroke-width: 1.2; }
.mail:hover { border-color: var(--ink); }

/* Footer */
.site-footer { position: relative; border-top: 1px solid var(--line-2); padding-top: 56px; overflow: clip; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer__mark { width: 40px; height: 31px; color: var(--ink); stroke-width: 1.3px; overflow: visible; }
.footer__nav { display: flex; gap: 32px; }
.footer__nav a,
.footer__top-link { font-size: 14px; color: var(--ink-2); transition: color .3s var(--ease); }
.footer__nav a:hover,
.footer__top-link:hover { color: var(--ink); }

.footer__word { margin-top: clamp(56px, 9vw, 120px); }
.footer__word svg { width: 100%; height: auto; overflow: visible; color: transparent; }
.footer__word use { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1px; }

.footer__bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  margin-top: clamp(40px, 5vw, 64px); padding: 22px 0 28px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.footer__bottom p:nth-child(2) { text-align: center; }
.footer__top-link { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.footer__top-link .arrow { width: 12px; height: 12px; }
.footer__top-link:hover .arrow { transform: translateY(-3px); }

/* Altimeter: a small scroll-linked readout in the left gutter */
.altimeter {
  position: fixed; z-index: 45; top: 50%;
  left: calc(var(--edge) - 30px);
  display: none;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--ink-3);
  pointer-events: none; user-select: none;
}
.altimeter b { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Responsive */
@media (min-width: 1360px) {
  .altimeter { display: block; }
}

@media (max-width: 960px) {
  .nav { gap: 26px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .ascent__svg { display: none; }
  .step { padding-bottom: 40px; }
  .step::before {
    content: ""; position: absolute; top: -5px; left: -5px; width: 9px; height: 9px;
    border: 1px solid var(--ink); border-radius: 50%; background: #000;
  }
  .step:last-child::before { border-radius: 0; border: 0; background: none; width: 11px; height: 11px; left: -6px; top: -6px;
    background: linear-gradient(45deg, transparent calc(50% - .6px), var(--ink) calc(50% - .6px), var(--ink) calc(50% + .6px), transparent calc(50% + .6px)),
                linear-gradient(-45deg, transparent calc(50% - .6px), var(--ink) calc(50% - .6px), var(--ink) calc(50% + .6px), transparent calc(50% + .6px)); }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card + .card { --d: 0s; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .brand { gap: 12px; }
  .brand__mark { height: 24px; }
  .brand__word { height: 10px; }
  .section-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .section-head .label { padding-top: 0; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .footer__bottom { grid-template-columns: 1fr; text-align: left; gap: 8px; }
  .footer__bottom p:nth-child(2) { text-align: left; }
  .footer__top-link { justify-self: start; margin-top: 6px; }
  .footer__nav { gap: 22px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero__actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .eyebrow span { display: block; }
  .eyebrow .eyebrow__sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .hero__layer::after { display: none; }
}
