/* MDL Consulting INC — Summit County, Colorado */

:root {
  /* Light-only: stops Chrome's auto-dark-theme inverting the header and hiding the logo. */
  color-scheme: light;

  --ink: #0b1c2c;
  --ink-2: #12304a;
  --slate: #56697b;
  --paper: #eef2f6;
  --white: #ffffff;
  /* --signal is bright enough only for large type and for use on --ink.
     Small text on white, and white text on an orange fill, need --signal-ink
     or darker to clear WCAG AA (4.5:1). */
  --signal: #f2620c;
  --signal-2: #ff8534;
  --signal-ink: #c9490a;
  --signal-deep: #b33e0a;
  --rule: #d5dee6;

  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 1200px;

  --shadow-sm: 0 2px 8px rgba(11, 28, 44, 0.06);
  --shadow-md: 0 12px 30px rgba(11, 28, 44, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 28, 44, 0.16);

  --dots: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

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

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

body {
  margin: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--signal);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
}

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--signal);
  flex: none;
}

.eyebrow--slate {
  color: var(--slate);
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

/* Translucency only where the blur is actually supported — Safari mispaints
   sticky elements with an unprefixed backdrop-filter. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .masthead {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
  }
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 80px;
}

.masthead__logo {
  display: block;
  flex: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.masthead__logo img {
  display: block;
  height: 42px;
  width: auto;
  min-width: 42px;
}

.masthead__nav {
  margin-left: auto;
}

.masthead__nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.masthead__nav a {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.625rem;
  transition: color 0.18s ease;
}

.masthead__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--signal-ink);
}

.masthead__nav a:hover::after,
.masthead__nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.masthead__call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--signal-ink), var(--signal-deep));
  padding: 0.75rem 1.375rem;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(242, 98, 12, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.masthead__call:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(242, 98, 12, 0.42);
}

@media (max-width: 760px) {
  .masthead__call span {
    display: none;
  }
}

@media (max-width: 580px) {
  .masthead__inner {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding-block: 0.875rem;
  }

  .masthead__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.5rem;
  }

  .masthead__nav ul {
    gap: 1.5rem;
  }

  .masthead__call {
    margin-left: auto;
  }
}

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

.hero {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media--right img {
  object-position: right center;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, var(--ink) 30%, rgba(11, 28, 44, 0.82) 58%, rgba(11, 28, 44, 0.55) 100%),
    linear-gradient(to top, var(--ink), transparent 45%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--dots);
  background-size: 22px 22px;
  opacity: 0.9;
}

.hero__inner {
  padding-block: clamp(4rem, 11vw, 8rem) clamp(3rem, 7vw, 5rem);
  max-width: 44rem;
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--signal-2);
}

.hero__sub {
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  color: #c3d2de;
  margin: 0 0 2.5rem;
  max-width: 32ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

/* Compact hero for interior pages */

.hero--slim .hero__inner {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}

.hero--slim h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

/* ---------- Phone block (signature) ---------- */

.dial {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.dial__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-2);
  display: block;
  margin-bottom: 0.5rem;
}

.dial__number {
  font-family: var(--mono);
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  display: block;
  transition: color 0.18s ease;
}

.dial:hover .dial__number {
  color: var(--signal-2);
}

.dial--light .dial__label {
  color: var(--signal-ink);
}

.dial--light .dial__number {
  color: var(--ink);
}

.dial--light:hover .dial__number {
  color: var(--signal-ink);
}

/* ---------- Stats ---------- */

.statband {
  background: var(--ink-2);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* margin-block only — a `margin: 0` shorthand would cancel .wrap's auto centring */
  margin-block: 0;
}

.stats div {
  text-align: center;
  padding: clamp(1.5rem, 3.5vw, 2.25rem) clamp(1.25rem, 3vw, 2.5rem);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.stats div:first-child {
  border-left: 0;
}

.stats dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8ba2b5;
  margin-bottom: 0.5rem;
}

.stats dd {
  margin: 0;
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--signal-2);
}

@media (max-width: 620px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .stats div:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

/* ---------- Sections ---------- */

.band {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.band--paper {
  background: var(--paper);
}

.band--ink {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.band--ink::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--dots);
  background-size: 22px 22px;
}

.band__head {
  max-width: 60ch;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
}

.band h2 {
  font-size: clamp(2rem, 4.6vw, 3.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
}

.band--ink h2 {
  color: var(--white);
}

/* Utilities replacing inline style attributes, so script-src/style-src can stay
   strict — a CSP without 'unsafe-inline' blocks style="" on elements. */
.band h2.is-spaced {
  margin-bottom: 1.75rem;
}

.hero__sub--wide {
  max-width: 48ch;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__base--bare {
  padding-top: 0;
}

/* ---------- Intro split ---------- */

.intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

@media (max-width: 880px) {
  .intro {
    grid-template-columns: 1fr;
  }
}

.intro__figure {
  position: relative;
  margin: 0;
}

.intro__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.intro__figure::before {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 62%;
  height: 62%;
  background: var(--signal);
  z-index: -1;
}

.prose p {
  margin: 0 0 1.375rem;
  color: var(--slate);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}

.prose p:first-of-type {
  color: var(--ink);
  font-size: clamp(1.1875rem, 2.2vw, 1.4375rem);
  line-height: 1.5;
  font-weight: 500;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Towns ---------- */

.towns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  list-style: none;
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  padding: 0;
}

.towns li {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.9375rem;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  border-radius: 100px;
}

.band--paper .towns li {
  background: var(--white);
}

/* ---------- Capability index ---------- */

.index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin: 0;
  padding: 0;
  list-style: none;
  box-shadow: var(--shadow-md);
}

.index li {
  position: relative;
  background: var(--white);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.125rem 1.25rem 1.125rem 2.25rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}

.index li::before {
  content: "";
  position: absolute;
  left: 1.125rem;
  top: 1.5rem;
  width: 6px;
  height: 6px;
  background: var(--signal);
  transition: transform 0.18s ease;
}

.index li:hover {
  background: var(--ink);
  color: var(--white);
}

.index li:hover::before {
  transform: scale(1.6);
}

@media (max-width: 900px) {
  .index {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .index {
    grid-template-columns: 1fr;
  }
}

.count {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 1.75rem;
}

.count a {
  color: var(--signal-ink);
}

/* ---------- Partners ---------- */

.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}

.partners__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partners__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.partners__item img {
  max-height: 68px;
  width: auto;
}

/* ---------- Split cards ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--signal), var(--signal-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--slate);
  margin: 0 0 1.75rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--signal-ink), var(--signal-deep));
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(242, 98, 12, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(242, 98, 12, 0.4);
}

.btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  box-shadow: none;
}

.btn--outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

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

.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 880px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

.nap {
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--slate);
}

.nap strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.nap a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--signal);
}

.nap a:hover {
  color: var(--signal-ink);
}

.form-panel {
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0.875rem 1rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.field input:focus,
.field textarea:focus {
  background: var(--white);
  border-color: var(--signal);
  outline: 2px solid rgba(242, 98, 12, 0.25);
  outline-offset: 0;
}

.field textarea {
  resize: vertical;
  min-height: 150px;
}

.honey {
  position: absolute;
  left: -9999px;
}

.h-captcha {
  margin-bottom: 1.5rem;
}

.note {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--slate);
  margin: 1rem 0 0;
}

.map {
  position: relative;
  display: block;
  margin-top: 2rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease;
}

.map:hover {
  box-shadow: var(--shadow-lg);
}

.map img {
  width: 100%;
  transition: transform 0.45s ease;
}

.map:hover img {
  transform: scale(1.04);
}

.map__cta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1.125rem 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(to top, rgba(11, 28, 44, 0.94), rgba(11, 28, 44, 0));
}

.map__cta::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.map:hover .map__cta::after {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .map:hover img {
    transform: none;
  }
}

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

.footer {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: #9fb3c4;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  font-size: 0.9375rem;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--dots);
  background-size: 22px 22px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-2);
  margin: 0 0 1.125rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 0.375rem;
}

.footer li a {
  display: inline-block;
  padding-block: 0.25rem;
}

.footer a {
  color: #9fb3c4;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer a:hover {
  color: var(--signal-2);
}

.footer address {
  font-style: normal;
  line-height: 1.8;
}

.footer address a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* The logo PNG carries a white background, so it needs a light chip to sit on. */
.footer__logo {
  display: inline-block;
  background: var(--white);
  padding: 0.6875rem 0.9375rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  transition: transform 0.18s ease;
}

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

.footer__logo img {
  display: block;
  height: 40px;
  width: auto;
}

.footer__base {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #7c92a4;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
