@import url("tokens.css");

/* ============================================================
   E & M Towing of Mississippi
   Dark night-photo site, bottom-anchored utility bar.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; margin: 0; letter-spacing: .005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[id] { scroll-margin-top: var(--s6); }
.tnum { font-variant-numeric: tabular-nums; }

::selection { background: var(--sodium); color: var(--on-sodium); }
* { scrollbar-width: thin; scrollbar-color: #4A443E var(--raised); }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: var(--raised); }
*::-webkit-scrollbar-thumb { background: #4A443E; border: 3px solid var(--raised); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #635B52; }

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

.skip {
  position: absolute; left: var(--s3); top: -100px; z-index: 200;
  background: var(--sodium); color: var(--on-sodium);
  padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top var(--t) var(--ease);
}
.skip:focus { top: var(--s3); }

.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.only-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Bottom utility bar (this site's header) ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(18,16,14,0.93);
  border-top: 1px solid var(--hairline);
  backdrop-filter: blur(10px);
}
.bar__in {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  min-height: var(--bar-h);
  display: flex; align-items: center; gap: var(--s4);
}
.bar__nav { display: flex; align-items: center; gap: var(--s5); flex: 1; }
.bar__nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--muted);
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  position: relative;
  transition: color var(--t) var(--ease);
}
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 12px; height: 2px;
  background: var(--sodium); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.bar__nav a:hover { color: var(--ink); }
.bar__nav a:hover::after { transform: scaleX(1); }
.bar__nav a[aria-current="page"] { color: var(--ink); }
.bar__nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--sodium); }

.bar__call {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; text-decoration: none; color: var(--sodium);
  font-family: var(--display); font-weight: 700; font-size: 28px;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  transition: color var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.bar__call-i { width: 20px; height: 20px; flex: none; }
.bar__call:hover { color: #FFB765; }
.bar__call:active { transform: translateY(2px); }
.bar__toggle { display: none; }
.bar__toggle-i { width: 22px; height: 22px; }

@media (max-width: 899px) {
  .bar__in { gap: var(--s3); justify-content: space-between; }
  .bar__toggle {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; min-width: 44px; padding: 0 12px 0 4px;
    background: none; border: 0; color: var(--muted);
    font-family: var(--body); font-size: 14px; font-weight: 600;
    cursor: pointer; border-radius: var(--radius);
    transition: color var(--t) var(--ease);
  }
  .bar__toggle:hover { color: var(--ink); }
  .bar__toggle:active { transform: translateY(1px); }
  .bar__toggle-i--close { display: none; }
  .bar__toggle[aria-expanded="true"] .bar__toggle-i--open { display: none; }
  .bar__toggle[aria-expanded="true"] .bar__toggle-i--close { display: block; }
  .bar__toggle[aria-expanded="true"] { color: var(--ink); }
  .bar__call { font-size: 23px; }

  .bar__nav {
    position: fixed; left: 0; right: 0; bottom: var(--bar-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--raised);
    border-top: 1px solid var(--hairline);
    padding: var(--s2) var(--gutter) var(--s3);
    transform: translateY(101%);
    visibility: hidden;
    transition: transform var(--t-slow) var(--ease), visibility var(--t-slow);
  }
  .bar__nav[data-open="true"] { transform: translateY(0); visibility: visible; }
  .bar__nav li + li { border-top: 1px solid var(--hairline-2); }
  .bar__nav a { min-height: 52px; font-size: 17px; }
  .bar__nav a::after { bottom: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(18,16,14,0.96) 0%, rgba(18,16,14,0.72) 34%, rgba(18,16,14,0.30) 62%, rgba(18,16,14,0.60) 100%);
}
/* Ambient: vertical wet-asphalt sheen travelling downward */
.hero__sheen {
  position: absolute; inset: -30% 0 auto 0; height: 60%; z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(242,160,61,0) 0%,
    rgba(242,160,61,0.055) 38%,
    rgba(255,236,210,0.085) 50%,
    rgba(242,160,61,0.055) 62%,
    rgba(242,160,61,0) 100%);
  animation: sheen 10s linear infinite;
}
@keyframes sheen {
  from { transform: translateY(0); }
  to   { transform: translateY(220%); }
}

.hero__in {
  position: relative;
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding: var(--s8) 0 calc(var(--bar-h) + var(--s7));
  display: grid; gap: var(--s6);
}
.mark { display: grid; gap: 10px; justify-items: start; }
.mark__name {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(21px, 3.1vw, 30px);
  line-height: 1; letter-spacing: .03em;
  color: var(--ink);
}
.mark__rule { display: block; width: 100%; max-width: 340px; height: 2px; }
.mark__rule rect { fill: var(--sodium); }
.mark__where {
  font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: .05em;
}

.hero__stack { display: grid; gap: var(--s4); max-width: 46rem; }
.hero__line {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 4.4vw, 44px); line-height: 1.08;
  color: var(--ink);
}
.hero__sub { color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); max-width: 34rem; }

/* The number is the CTA */
.callline {
  display: inline-grid; gap: 6px; justify-items: start;
  text-decoration: none; color: var(--sodium);
  transition: color var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.callline__label {
  font-family: var(--body); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; color: var(--muted);
}
.callline__n {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 10.5vw, 108px); line-height: .92;
  font-variant-numeric: tabular-nums; letter-spacing: .005em;
}
.callline__bar { display: block; height: 3px; background: var(--sodium); width: 100%; transform-origin: left; }
.callline:hover { color: #FFB765; }
.callline:hover .callline__bar { background: #FFB765; }
.callline:active { transform: translateY(2px); }

.arrows { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.alink {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 16px;
  transition: color var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.alink svg { width: 18px; height: 18px; flex: none; color: var(--sodium); transition: transform var(--t) var(--ease); }
.alink:hover { color: var(--sodium); }
.alink:hover svg { transform: translateX(5px); }
.alink:active { transform: translateY(1px); }

/* ---------- Sections ---------- */
main { display: block; }
.sec { padding: var(--s8) 0; }
.sec--tight { padding: var(--s7) 0; }
.sec__head { display: grid; gap: var(--s3); max-width: 44rem; margin-bottom: var(--s6); }
h2 { font-size: clamp(27px, 3.5vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 23px); }
.lede { color: var(--muted); font-size: 17px; }

/* Hairline rows: this site's main container language */
.rows { border-top: 1px solid var(--hairline); }
.row {
  display: grid; gap: var(--s2) var(--s5);
  grid-template-columns: 13rem 1fr;
  padding: var(--s4) var(--s2);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  transition: background var(--t) var(--ease);
}
.row::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: var(--sodium); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.row:hover { background: var(--raised); }
.row:hover::before { transform: scaleX(1); }
.row__k { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.row__v { color: var(--muted); }
.row__v strong { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }

/* Numbered steps: real sequence only */
.steps { counter-reset: st; border-top: 1px solid var(--hairline); }
.step {
  counter-increment: st;
  display: grid; grid-template-columns: 3.2rem 1fr; gap: var(--s2) var(--s4);
  padding: var(--s4) var(--s2);
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t) var(--ease);
}
.step:hover { background: var(--raised); }
.step::before {
  content: counter(st);
  font-family: var(--display); font-weight: 700; font-size: 30px;
  color: var(--sodium); line-height: 1; font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); }
@media (max-width: 560px) { .step { grid-template-columns: 2.4rem 1fr; gap: var(--s2) var(--s3); } }

/* Photo panels, deliberately varied in size */
.panel { position: relative; overflow: hidden; }
.panel img { width: 100%; height: 100%; object-fit: cover; }
.panel--bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.pcap {
  margin-top: 10px; font-size: 13px; color: var(--dim);
}
.duo {
  display: grid; gap: var(--s4);
  grid-template-columns: 1.55fr 1fr; align-items: start;
}
.duo--rev { grid-template-columns: 1fr 1.55fr; }
@media (max-width: 860px) { .duo, .duo--rev { grid-template-columns: 1fr; } }

.split {
  display: grid; gap: var(--s7);
  grid-template-columns: 1fr 1fr; align-items: start;
}
/* Photos inside a split cap their height so a portrait frame does not
   run away from the column beside it. */
.split .panel img { max-height: 560px; object-fit: cover; }
@media (min-width: 901px) {
  .split > .panel { position: sticky; top: var(--s6); }
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--s5); } }

/* Page banner for interior pages */
.banner { position: relative; isolation: isolate; overflow: hidden; }
.banner__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18,16,14,0.95) 6%, rgba(18,16,14,0.62) 55%, rgba(18,16,14,0.55) 100%);
}
.banner__in {
  width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto;
  padding: var(--s8) 0 var(--s7);
  display: grid; gap: var(--s4);
}
.banner h1 { font-size: clamp(34px, 5.6vw, 62px); max-width: 20ch; }
.banner__sub { color: var(--muted); max-width: 40rem; font-size: 17px; }

/* ---------- Signature: Recovery, by weight ---------- */
.sig { background: var(--raised); border-block: 1px solid var(--hairline); }
.sig__grid { display: grid; gap: var(--s6); }
.scale { width: 100%; height: auto; display: block; }
.scale .beam { stroke: var(--sodium); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.scale .post { stroke: rgba(242,238,232,0.34); stroke-width: 2; }
.scale .tick { stroke: rgba(242,238,232,0.22); stroke-width: 1.25; }
.scale .sil { fill: rgba(244,240,234,0.90); }
.scale .sil--open { fill: none; stroke: var(--sodium); stroke-width: 2; stroke-dasharray: 6 5; }
.scale .sil--ring { fill: none; stroke: var(--sodium); stroke-width: 2; }
.scale .lbl { fill: var(--ink); font-family: var(--display); font-weight: 700; font-size: 15px; }
.scale .sub { fill: var(--muted); font-family: var(--body); font-size: 13px; }
.scale .amber { fill: var(--sodium); }
.sig__note { color: var(--muted); font-size: 15px; max-width: 42rem; }
.sig__note strong { color: var(--ink); font-weight: 600; }

/* ---------- Table: real enumerable data only ---------- */
.tblwrap { overflow-x: auto; border-top: 1px solid var(--hairline); }
table { width: 100%; border-collapse: collapse; min-width: 30rem; }
caption { text-align: left; color: var(--dim); font-size: 13px; padding-bottom: var(--s3); }
th, td { text-align: left; padding: 14px var(--s3) 14px 0; border-bottom: 1px solid var(--hairline); }
th { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--dim); }
td { color: var(--muted); }
td.v { color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
tbody tr { transition: background var(--t) var(--ease); }
tbody tr:hover { background: rgba(242,238,232,0.035); }

/* ---------- Checklist ---------- */
.checks { display: grid; gap: var(--s2); }
.check {
  display: grid; grid-template-columns: 26px 1fr; gap: var(--s3);
  padding: var(--s3) var(--s2);
  border-bottom: 1px solid var(--hairline-2);
  transition: background var(--t) var(--ease);
}
.check:hover { background: var(--raised); }
.check svg { width: 20px; height: 20px; color: var(--sodium); margin-top: 3px; }
.check b { font-weight: 600; color: var(--ink); display: block; }
.check span { color: var(--muted); font-size: 15.5px; }

/* ---------- Form ---------- */
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 7px; }
.field > label { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.field .hint { font-size: 13px; color: var(--dim); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--raised); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 12px 13px; width: 100%;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover, textarea:hover { border-color: rgba(242,238,232,0.26); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--sodium); background: var(--raised-2);
  box-shadow: inset 0 0 0 1px var(--sodium);
}
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #E4694F; }
textarea { min-height: 128px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A39C92' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 40px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 26px;
  background: var(--sodium); color: var(--on-sodium);
  border: 0; border-radius: var(--radius);
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .015em;
  cursor: pointer; text-decoration: none;
  transition: background var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: #FFB765; transform: translateY(-1px); }
.btn:active { background: var(--sodium-deep); transform: translateY(2px); }
.btn:disabled { background: #5C5349; color: #9A9188; cursor: not-allowed; transform: none; }
.formnote {
  display: none; padding: var(--s4);
  background: var(--raised); border-left: 3px solid var(--sodium);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.formnote[data-show="true"] { display: block; }
.formnote p { color: var(--muted); font-size: 15.5px; }
.formnote a { color: var(--sodium); font-weight: 600; }
.formnote .fn-n {
  font-family: var(--display); font-weight: 700; font-size: 30px;
  color: var(--sodium); text-decoration: none; display: inline-flex;
  align-items: center; min-height: 44px; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Map ---------- */
#map { height: 420px; width: 100%; background: var(--raised); border: 1px solid var(--hairline); }
.leaflet-container { font-family: var(--body); background: var(--raised); }
.pin { display: grid; place-items: center; }
.pin__dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sodium); border: 3px solid var(--base);
  box-shadow: 0 0 0 1px var(--sodium);
}
.leaflet-popup-content-wrapper {
  background: var(--raised); color: var(--ink);
  border-radius: var(--radius); border: 1px solid var(--hairline);
}
.leaflet-popup-tip { background: var(--raised); border: 1px solid var(--hairline); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.5; }
.leaflet-popup-content b { font-family: var(--display); font-size: 17px; }
.leaflet-popup-close-button { color: var(--muted) !important; }
.leaflet-control-attribution { background: rgba(18,16,14,0.86) !important; color: var(--dim) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a {
  background: var(--raised) !important; color: var(--ink) !important;
  border-color: var(--hairline) !important;
}
.leaflet-bar a:hover { background: var(--raised-2) !important; }

/* ---------- Call band ---------- */
.band { border-block: 1px solid var(--hairline); background: var(--raised); }
.band__in {
  display: grid; gap: var(--s4); justify-items: start;
  padding-block: var(--s8);
}
.band__in--flat { padding-block: 0; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--hairline); padding: var(--s8) 0 calc(var(--bar-h) + var(--s6)); }
/* Nothing may end underneath the fixed bottom bar. */
body { padding-bottom: 0; }
@supports (padding: max(0px)) {
  .foot { padding-bottom: calc(var(--bar-h) + var(--s6) + env(safe-area-inset-bottom)); }
}
.foot__in { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; display: grid; gap: var(--s5); }
.foot__name { font-family: var(--display); font-weight: 700; font-size: 26px; }
.foot__sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.foot__rows { border-top: 1px solid var(--hairline); max-width: 44rem; }
.frow {
  display: grid; grid-template-columns: 12rem 1fr; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s2);
  border-bottom: 1px solid var(--hairline);
}
.frow__k { font-size: 13px; color: var(--dim); font-weight: 600; letter-spacing: .05em; }
.frow__v { color: var(--muted); font-size: 15.5px; }
a.frow__v { text-decoration: none; transition: color var(--t) var(--ease); }
.frow__v--big {
  font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--sodium);
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; min-height: 44px;
}
a.frow__v--big:hover { color: #FFB765; }
a.frow__v--big:active { transform: translateY(2px); }
@media (max-width: 620px) { .frow { grid-template-columns: 1fr; } }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.foot__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600;
  transition: color var(--t) var(--ease);
}
.foot__links a:hover { color: var(--sodium); }
.foot__fine { color: var(--dim); font-size: 13.5px; max-width: 54rem; line-height: 1.62; }
.foot__fine--last { padding-top: var(--s3); border-top: 1px solid var(--hairline-2); }

/* ---------- Motion: reveals ---------- */
.js [data-rise] { opacity: 0; transform: translateY(22px); }
.js [data-rise].is-in {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .hero__in [data-load] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .hero__sheen { display: none; }
  .js [data-rise], .js .hero__in [data-load] { opacity: 1 !important; transform: none !important; }
}
