/* Dustprint landing page.
   Visual language: forensic. A graphite ground, shoe prints dusted out of
   particles, numbered yellow evidence markers, mono labels and sharp corners. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b0d0f;
  --ink-line: #262c33;
  --on-ink: #e8ebee;
  --on-ink-muted: #98a1aa;

  --paper: #eff0ec;
  --paper-line: #cdd0c9;
  --text: #0b0d0f;
  --text-muted: #4b5259;

  --marker: #f4c430;
  --marker-hover: #ffd34d;
  --marker-ink: #15120a;
  --marker-side: #d6a81e;

  --font-sans:
    "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
  --font-mono:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  /* Shared by every multi-column layout so their columns line up. */
  --col-gap: 3rem;

  /* Context tokens, swapped per section ground. */
  --muted: var(--on-ink-muted);
  --line: var(--ink-line);
  color-scheme: dark;
}

@media (min-width: 1100px) {
  :root {
    --col-gap: 2.5rem;
  }
}

@media (min-width: 1800px) {
  :root {
    --wrap: 86rem;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  font-stretch: 85%;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.875rem, 6.4vw, 5.75rem);
  font-stretch: 80%;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

h2 {
  font-size: clamp(2.125rem, 4.4vw, 3.5rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.5rem;
  font-stretch: 90%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--marker);
  color: var(--marker-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Section grounds ---------- */

.ink {
  background: var(--ink);
  color: var(--on-ink);
  --muted: var(--on-ink-muted);
  --line: var(--ink-line);
}

.paper {
  background: var(--paper);
  color: var(--text);
  --muted: var(--text-muted);
  --line: var(--paper-line);
  color-scheme: light;
}

.paper :focus-visible {
  outline-color: var(--text);
}

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

.section-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-head {
  display: grid;
  gap: 1.5rem;
  max-width: 52rem;
}

@media (min-width: 960px) {
  .section-head-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--col-gap);
    max-width: none;
  }
}

.lead {
  max-width: 40rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.375rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn .arrow {
  transition: transform 0.15s ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-marker {
  background: var(--marker);
  color: var(--marker-ink);
}

.btn-marker:hover {
  background: var(--marker-hover);
}

.btn-ghost {
  border-color: var(--ink-line);
  color: var(--on-ink);
}

.btn-ghost:hover {
  border-color: var(--on-ink-muted);
}

.btn-sm {
  padding: 0.6rem 0.95rem;
  font-size: 0.9375rem;
}

/* ---------- Evidence marker ---------- */

.marker {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.625rem;
  height: 1.375rem;
  padding-top: 0.2rem;
  background: linear-gradient(
    90deg,
    var(--marker) 0 68%,
    var(--marker-side) 68%
  );
  color: var(--marker-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}

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

.site-header {
  position: relative;
  z-index: 2;
  background: var(--ink);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-ink);
  font-size: 1.25rem;
  font-weight: 600;
  font-stretch: 90%;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  color: var(--marker);
}

.logo-sm {
  font-size: 1.0625rem;
}

.logo-sm .logo-mark {
  width: 22px;
  height: 22px;
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.75rem);
  min-height: calc(100svh - 4.75rem);
  overflow: hidden;
  background: var(--ink);
}

/* Flex items shrink to fit their content; keep both hero rows full width. */
.hero > .wrap {
  width: 100%;
}

.hero-grid {
  flex: 1;
  align-content: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 8vw, 6rem) clamp(2.5rem, 6vw, 5rem);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--on-ink-muted);
}

.kicker::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--marker);
}

.hero-lead {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--on-ink-muted);
}

.hero-actions {
  margin-top: 2.5rem;
}

.print {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1.04;
  margin-inline: auto;
  background: radial-gradient(
    closest-side,
    rgba(244, 196, 48, 0.06),
    rgba(244, 196, 48, 0) 75%
  );
}

@media (min-width: 600px) and (max-width: 959px) {
  .print {
    max-width: 440px;
  }
}

@media (min-width: 960px) and (max-height: 780px) {
  .hero-grid {
    padding-block: 2rem;
  }

  .hero h1 {
    font-size: clamp(2.875rem, 10.5vh, 5.75rem);
  }

  .hero-lead {
    margin-top: 1.25rem;
  }

  .hero-actions {
    margin-top: 2rem;
  }

  .print {
    max-width: min(560px, calc((100svh - 9rem) / 1.04));
  }
}

/* Very large screens: bigger prints. */
@media (min-width: 1800px) and (min-height: 1100px) {
  .print {
    max-width: 640px;
  }
}

.print canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.print .marker {
  position: absolute;
  width: 1.875rem;
  height: 1.625rem;
  font-size: 0.8125rem;
  transform: translate(-50%, -100%);
}

.js .print .marker {
  opacity: 0;
  transform: translate(-50%, -70%);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  transition-delay: var(--d, 0ms);
}

.js .print.is-settled .marker {
  opacity: 1;
  transform: translate(-50%, -100%);
}

html:not(.js) .print::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/print.webp") center / 100% 100% no-repeat;
}

.ruler {
  height: 12px;
  border-right: 1px solid;
  color: rgba(152, 161, 170, 0.35);
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 10px)
      bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 50px)
      bottom / 100% 12px no-repeat;
}

/* ---------- Approach ---------- */

.trail {
  position: relative;
  height: clamp(4.5rem, 8vw, 7rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

html:not(.js) .trail {
  display: none;
}

.trail canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pillars {
  display: grid;
  gap: 3.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

/* Without the trail, leave room between the paragraph and the markers. */
html:not(.js) .pillars {
  margin-top: clamp(3.5rem, 6vw, 5rem);
}

@media (min-width: 640px) {
  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem var(--col-gap);
  }
}

@media (min-width: 1100px) {
  .pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pillars li {
  position: relative;
  padding-top: 1.25rem;
  border-top: 1px solid var(--text);
}

/* Each marker stands on its point's rule, like a tent on the floor. */
.pillars .marker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 1px);
  width: 1.875rem;
  height: 1.625rem;
  font-size: 0.8125rem;
}

.pillars p {
  max-width: 22rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

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

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--col-gap);
  }
}

.contact h2 {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  font-stretch: 80%;
  letter-spacing: -0.035em;
}

.contact .lead {
  margin-top: 1.5rem;
}

.contact-alt {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--on-ink-muted);
}

.lead + .contact-alt {
  margin-top: 2rem;
}

/* The booking calendar. Calendly draws on white and sets this box's height to
   fit what it shows; 700px holds the space until it reports in. Until then
   (or if Calendly is blocked) the box shows a plain link to the same page. */
.js .booking {
  display: grid;
  place-items: center;
  height: 700px;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
}

.js .booking.is-live {
  display: block;
}

.booking iframe {
  display: block;
}

.booking .calendly-spinner {
  display: none;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--on-ink);
  text-underline-offset: 4px;
  text-decoration-color: var(--ink-line);
}

.contact-link:hover {
  text-decoration-color: var(--on-ink);
}

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

.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--ink-line);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.footer-meta a {
  text-underline-offset: 3px;
}

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

.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1.5rem;
  min-height: 70vh;
  padding-block: 4rem;
}

.not-found p:not(.kicker) {
  color: var(--on-ink-muted);
  font-size: 1.125rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .print .marker {
    opacity: 1;
    transform: translate(-50%, -100%);
    transition: none;
  }

  .btn .arrow {
    transition: none;
  }
}
