/* depth.css — corner line-art, hand-sketched borders (rough.js), hover depth.
   Loaded last on every page so it wins the cascade. Gray tones match the site lines. */

/* 1. Corner line-art anchors. Inline SVG in the pages, positioned by these rules. */
.corner-art {
  position: absolute;
  width: 170px;
  height: 170px;
  pointer-events: none;
  z-index: 0;
}
.corner-art svg { display: block; width: 100%; height: 100%; }
.corner-art svg * { stroke: #8a8a8a; stroke-width: 1; fill: none; }
.corner-art.top-left { top: 12px; left: 28px; }
.corner-art.bottom-right { bottom: 12px; right: 28px; }
.corner-art.bottom-right svg { transform: rotate(180deg); }
.corner-art.small { width: 130px; height: 130px; opacity: .8; }

/* Corner art is a desktop-only accent. Below desktop, headings fill the
   corners and the strokes collide with text (measured at 390 and 768px),
   so the art steps aside entirely. */
@media (max-width: 1023.98px) {
  .corner-art { display: none; }
}

/* Sections need a positioning context; content stays above the art. */
.hero, .section, .proof-intro, .meet-intro, .meet-problems, .meet-work,
.meet-process, .contact-section { position: relative; }
.hero > *:not(.corner-art),
.section > *:not(.corner-art) { position: relative; z-index: 1; }
.proof-intro > *:not(.corner-art) { position: relative; z-index: 1; }
.meet-intro > *:not(.corner-art),
.contact-section > .wrap { position: relative; z-index: 1; }

/* 2. Sketch borders. The CSS border stays visible as the no-JS fallback;
   rough.js adds a canvas overlay on top of the same edges. Once the sketch
   has drawn, the straight CSS border colour drops out so only the hand-drawn
   line shows (border-width stays 1px, so card geometry never shifts). */
.sketch-box { position: relative; }
.sketch-box.sketch-drawn { border-color: transparent; }
canvas.sketch-border {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  z-index: 2;
}

/* 3. Hover depth. Pointer devices only; reduced-motion users get the state
   change without the transition (plus the global reduce rule already present). */
.hover-lift { border-color: var(--line, #dfdfdf); }
@media (hover: hover) and (pointer: fine) {
  .hover-lift {
    box-shadow: 0 1px 3px rgba(37, 37, 37, .04);
    transition: box-shadow .175s ease, border-color .175s ease, transform .2s ease;
  }
  .hover-lift:hover {
    box-shadow: 0 10px 26px rgba(37, 37, 37, .10);
    border-color: #b9b9b9;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hover-lift { transition: none; }
}
/* Sketch boxes keep the straight border retired even on hover; the shadow
   lift alone carries their hover depth (no double edge). */
.sketch-box.sketch-drawn:hover { border-color: transparent; }
