/* trenchside.com. A marketing page with a field-crew look: a near-black hero with survey contour
   lines, hi-vis orange for buttons and the closing band, heavy system type, and real screenshots
   with callouts outlining what they show. Solid colors and real shadows only: no glows, blurred
   gradients, badges, icon tiles or scroll animations. The body follows the system's light or
   dark setting; the hero, the rules band and the orange band look the same in both. */

:root {
  --orange: #f26b1d;
  --orange-hover: #ff7f33;
  --black: #0e0e0d;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #141413;
  --body: #3b3934;
  --muted: #6e6a62;
  --line: #e2dfd7;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 24px 48px -24px rgb(30 24 10 / 28%);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1c1b19;
    --ink: #f1efea;
    --body: #cdc9c0;
    --muted: #99948a;
    --line: #2e2c29;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 24px 48px -24px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

.swap {
  display: contents;
}
.swap-d {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .swap-l {
    display: none;
  }
  .swap-d {
    display: contents;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html,
body {
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 17px / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  color: var(--ink);
}
a {
  color: inherit;
}
img {
  display: block;
  width: 100%;
  height: auto;
}
picture {
  display: contents;
}
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 20px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 30;
  padding: 8px 12px;
  background: var(--orange);
  color: var(--black);
}
.skip:focus {
  left: 8px;
}
.mark {
  width: 24px;
  height: 24px;
  flex: none;
  color: currentColor;
}
.center {
  text-align: center;
}
h2 {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
h3 {
  font-size: 19px;
  letter-spacing: -0.015em;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 14px;
}
.btn-lg {
  padding: 13px 24px;
  font-size: 17px;
}
.btn-orange {
  background: var(--orange);
  color: var(--black);
}
.btn-orange:hover {
  background: var(--orange-hover);
}
.btn-outline {
  border-color: rgb(255 255 255 / 35%);
  color: #fff;
}
.btn-outline:hover {
  border-color: #fff;
}
.btn-black {
  background: var(--black);
  color: #fff;
}
.btn-black:hover {
  background: #2a2926;
}
.btn-ghost-dark {
  border-color: var(--black);
  color: var(--black);
}
.btn-ghost-dark:hover {
  background: rgb(0 0 0 / 8%);
}

/* --- Header and hero (always dark) --------------------------------------------------------- */

.dark-band {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: #c9c5bc;
}
.top {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
}
.nav a:not(.btn) {
  color: #b9b5ac;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:not(.btn):hover {
  color: #fff;
}

.hero {
  position: relative;
  padding: 96px 0 240px;
}
.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgb(255 255 255 / 6.5%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
}
.hero h1 {
  max-width: 13ch;
  color: #fff;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 850;
}
.hero .lede {
  max-width: 620px;
  margin-top: 28px;
  color: #c9c5bc;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.5;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-note {
  margin-top: 20px;
  color: #8d8981;
  font-size: 14px;
}
.hero-404 {
  padding-bottom: 120px;
}

/* The hero screenshot sits half in the dark band and half on the page below it. */
.hero-shots {
  position: relative;
  margin-top: -180px;
}
.shot {
  position: relative;
  border-radius: 12px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    var(--shadow);
}
.shot > picture img,
.shot > .swap img,
.shot img {
  border-radius: 12px;
}
.shot-hero {
  container-type: inline-size;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 10%),
    0 40px 80px -30px rgb(0 0 0 / 55%);
}
/* The hero shows the whole window, so on a narrow page its callouts shrink with it. */
@container (max-width: 900px) {
  .callout {
    --gap: 4px;
    --reach: 12px;
  }
  .callout-tag {
    padding: 4px 8px;
    font-size: 12px;
  }
}
/* The phone stands over the empty foot of the app's sidebar, leaving the findings in view. It
   hangs further out where the page margin has room for it. */
.phone {
  position: absolute;
  left: clamp(-48px, calc((1220px - 100vw) / 2), -8px);
  bottom: -48px;
  width: clamp(150px, 19%, 230px);
  overflow: hidden;
  border: 7px solid #1b1a18;
  border-radius: 34px;
  background: #1b1a18;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 8%),
    0 30px 60px -20px rgb(0 0 0 / 55%);
}
.phone img {
  border-radius: 27px;
}

/* Callouts: an orange outline around one real detail of a screenshot, and a tag saying what it
   shows. A box's tag hangs flush off one corner, squared where they meet, like a selection label
   in a drawing tool. A ring marks a spot on a map or chart and holds its tag out on a leader. */
.callout {
  --gap: 5px;
  --reach: 18px;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.callout::before {
  content: "";
  position: absolute;
  inset: calc(var(--gap) * -1);
  border: 2px solid var(--orange);
  border-radius: 9px;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 30%),
    inset 0 0 0 1px rgb(0 0 0 / 30%);
}
.callout-tag {
  position: absolute;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--black);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 18%),
    0 8px 18px -8px rgb(0 0 0 / 55%);
}
.callout-above .callout-tag {
  bottom: calc(100% + var(--gap));
}
.callout-below .callout-tag {
  top: calc(100% + var(--gap));
}
.callout-left .callout-tag {
  right: calc(100% + var(--gap));
}
.callout-right .callout-tag {
  left: calc(100% + var(--gap));
}
:is(.callout-above, .callout-below).callout-start .callout-tag {
  left: calc(var(--gap) * -1);
}
:is(.callout-above, .callout-below).callout-end .callout-tag {
  right: calc(var(--gap) * -1);
}
:is(.callout-left, .callout-right).callout-start .callout-tag {
  top: calc(var(--gap) * -1);
}
:is(.callout-left, .callout-right).callout-end .callout-tag {
  bottom: calc(var(--gap) * -1);
}
/* Square the outline's corner and the tag's corner where the two meet. */
.callout-above.callout-start::before,
.callout-left.callout-start::before {
  border-top-left-radius: 0;
}
.callout-above.callout-end::before,
.callout-right.callout-start::before {
  border-top-right-radius: 0;
}
.callout-below.callout-start::before,
.callout-left.callout-end::before {
  border-bottom-left-radius: 0;
}
.callout-below.callout-end::before,
.callout-right.callout-end::before {
  border-bottom-right-radius: 0;
}
.callout-above.callout-start .callout-tag,
.callout-right.callout-end .callout-tag {
  border-bottom-left-radius: 0;
}
.callout-above.callout-end .callout-tag,
.callout-left.callout-end .callout-tag {
  border-bottom-right-radius: 0;
}
.callout-below.callout-start .callout-tag,
.callout-right.callout-start .callout-tag {
  border-top-left-radius: 0;
}
.callout-below.callout-end .callout-tag,
.callout-left.callout-start .callout-tag {
  border-top-right-radius: 0;
}
.callout-ring::before {
  border-radius: 50%;
}
.callout-ring::after {
  content: "";
  position: absolute;
  background: var(--orange);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 30%);
}
.callout-ring:is(.callout-left, .callout-right)::after {
  top: calc(50% - 1px);
  width: var(--reach);
  height: 2px;
}
.callout-ring:is(.callout-above, .callout-below)::after {
  left: calc(50% - 1px);
  width: 2px;
  height: var(--reach);
}
.callout-ring.callout-left::after {
  right: calc(100% + var(--gap));
}
.callout-ring.callout-right::after {
  left: calc(100% + var(--gap));
}
.callout-ring.callout-above::after {
  bottom: calc(100% + var(--gap));
}
.callout-ring.callout-below::after {
  top: calc(100% + var(--gap));
}
.callout-ring:is(.callout-left, .callout-right) .callout-tag {
  top: 50%;
  translate: 0 -50%;
}
.callout-ring:is(.callout-above, .callout-below) .callout-tag {
  left: 50%;
  translate: -50% 0;
}
.callout-ring.callout-left .callout-tag {
  right: calc(100% + var(--gap) + var(--reach));
}
.callout-ring.callout-right .callout-tag {
  left: calc(100% + var(--gap) + var(--reach));
}
.callout-ring.callout-above .callout-tag {
  bottom: calc(100% + var(--gap) + var(--reach));
}
.callout-ring.callout-below .callout-tag {
  top: calc(100% + var(--gap) + var(--reach));
}

/* --- Numbers -------------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 112px;
}
.stats div {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}
.stats strong {
  color: var(--ink);
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 850;
}
.stats span {
  max-width: 22ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.4;
}

/* --- Before and after ------------------------------------------------------------------------ */

.compare {
  margin-top: 136px;
}
.compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.compare-card {
  padding: 32px;
  border-radius: 14px;
}
.compare-card ul {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.compare-card li {
  position: relative;
  padding-left: 26px;
}
.compare-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 3px;
  border-radius: 2px;
}
.compare-old {
  border: 1px solid var(--line);
  background: var(--surface);
}
.compare-old h3 {
  color: var(--muted);
}
.compare-old li {
  color: var(--muted);
}
.compare-old li::before {
  background: var(--muted);
  opacity: 0.5;
}
.compare-new {
  border: 2px solid var(--orange);
  background: var(--black);
  color: #d6d2c9;
}
.compare-new h3 {
  color: #fff;
}
.compare-new li::before {
  background: var(--orange);
}

/* --- Features -------------------------------------------------------------------------------- */

.features {
  display: grid;
  gap: 136px;
  margin-top: 136px;
  scroll-margin-top: 24px;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 64px;
}
/* Flipped, the screenshot comes first and keeps the wider column. */
.feature-flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.feature-flip .feature-copy {
  order: 2;
}
.feature-copy {
  display: grid;
  gap: 20px;
}
.feature-body {
  color: var(--body);
  font-size: 18px;
}
.points {
  display: grid;
  gap: 10px;
}
.points li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
}

/* --- Rules band (always dark) ------------------------------------------------------------------ */

.rules-band {
  margin-top: 152px;
  padding: 104px 0;
  background: var(--black);
  color: #c9c5bc;
  scroll-margin-top: 0;
}
.rules-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 20px 64px;
  align-items: end;
}
.rules-band h2 {
  color: #fff;
}
.rules-head p {
  font-size: 18px;
}
.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  margin-top: 56px;
}
.rules li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 11%);
  color: #f1efea;
  font-weight: 600;
}
.code {
  flex: none;
  color: var(--orange);
  font: 700 14px / 1 var(--mono);
}

/* --- Trenchside AI ----------------------------------------------------------------------------- */

/* The assistant's panel is tall and narrow, so it stands beside the copy at a fixed width. */
.ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
  gap: 72px;
  margin-top: 136px;
  scroll-margin-top: 24px;
}
.ai-copy {
  display: grid;
  gap: 20px;
  max-width: 600px;
}
.ai-shot {
  width: 100%;
  max-width: 460px;
}

/* --- Roles --------------------------------------------------------------------------------------- */

.roles {
  margin-top: 136px;
}
.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.roles-grid div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.roles-grid p {
  color: var(--muted);
  font-size: 16px;
}

/* --- Closing band (always orange) ---------------------------------------------------------------- */

.cta-band {
  margin-top: 136px;
  padding: 88px 0;
  background: var(--orange);
  color: var(--black);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}
.cta-band h2 {
  max-width: 14ch;
  color: var(--black);
  font-size: clamp(36px, 5.4vw, 68px);
}
.cta-band .cta {
  margin-top: 0;
}

/* --- Footer (always dark) ------------------------------------------------------------------------ */

.foot {
  background: var(--black);
  color: #8d8981;
  font-size: 15px;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 48px;
  padding-block: 56px 36px;
}
.foot-brand {
  display: grid;
  gap: 12px;
  max-width: 360px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.foot a {
  color: #c9c5bc;
  text-decoration: none;
}
.foot a:hover {
  color: #fff;
}
.foot-base {
  padding-block: 20px 36px;
  border-top: 1px solid rgb(255 255 255 / 9%);
  font-size: 13px;
}

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

@media (max-width: 960px) {
  .feature,
  .ai,
  .rules-head,
  .compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature {
    gap: 32px;
  }
  .feature-flip .feature-copy {
    order: 0;
  }
  .ai {
    gap: 32px;
  }
  .stats,
  .roles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
  .rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-hide {
    display: none;
  }
}
@media (max-width: 760px) {
  .callout {
    display: none;
  }
  .hero {
    padding: 64px 0 160px;
  }
  .hero-shots {
    margin-top: -120px;
  }
  .phone {
    display: none;
  }
  .stats,
  .compare,
  .features,
  .ai,
  .roles,
  .cta-band {
    margin-top: 88px;
  }
  .features {
    gap: 88px;
  }
  .rules-band {
    margin-top: 96px;
    padding: 72px 0;
  }
}
@media (max-width: 560px) {
  .roles-grid,
  .rules {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats strong {
    font-size: 40px;
  }
  .compare-card {
    padding: 24px;
  }
  .cta-band {
    padding: 64px 0;
  }
  /* A whole desktop window is unreadable this narrow: the hero shows the phone capture instead. */
  .shot-hero {
    display: none;
  }
  .phone {
    display: block;
    position: relative;
    left: auto;
    bottom: auto;
    width: min(290px, 80%);
    margin-inline: auto;
  }
}
@media (max-width: 420px) {
  .nav-signin {
    display: none;
  }
  /* Stacked, the two calls to action line up at the same width. */
  .cta .btn-lg {
    width: 100%;
  }
}

/* --- Link-preview card (1200×630, drawn at build time) ---------------------------------------------- */

.og {
  width: 1200px;
  height: 630px;
  overflow: hidden;
  background: var(--black);
}
.og-card {
  position: relative;
  width: 1200px;
  height: 630px;
  padding: 64px;
  color: #c9c5bc;
}
.og-brand {
  position: relative;
  font-size: 28px;
}
.og-brand .mark {
  width: 32px;
  height: 32px;
}
.og-title {
  position: relative;
  width: 600px;
  margin-top: 52px;
  color: #fff;
  font-size: 74px;
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.og-sub {
  position: relative;
  margin-top: 26px;
  font-size: 26px;
}
.og-sub::before {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin-bottom: 22px;
  background: var(--orange);
}
.og-shot {
  position: absolute;
  left: 700px;
  top: 72px;
  width: 1000px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 12%);
}
