:root {
  --ink: #20231f;
  --muted: #5c655c;
  --paper: #f7f4ec;
  --panel: rgba(255, 252, 244, 0.95);
  --panel-solid: #fffaf0;
  --line: rgba(32, 35, 31, 0.14);
  --gold: #c69a3a;
  --gold-dark: #7a5a16;
  --dark: #151515;
  --dark-2: #252822;
  --white: #fff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--dark);
  background-image:
    linear-gradient(90deg, rgba(10, 10, 10, 0.18), rgba(10, 10, 10, 0.58)),
    url("/assets/wallpaper/layers/gravel-road-tile.jpg");
  background-position: left bottom;
  background-repeat: repeat;
  background-size: auto, 900px 900px;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: min(58vw, 760px);
  height: min(28vh, 260px);
  background: url("/assets/wallpaper/layers/yellowstone-track-overlay.png") left bottom / auto 100% no-repeat;
  opacity: 0.62;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
}

a { color: inherit; }

.site-wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.72);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.military-entry {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-left: auto;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(243, 234, 215, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(198, 154, 58, 0.14), transparent 58%),
    #171914;
  color: var(--white);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.military-entry:hover,
.military-entry:focus-visible {
  background:
    linear-gradient(180deg, rgba(198, 154, 58, 0.2), transparent 58%),
    #20231d;
  outline: 3px solid rgba(198, 154, 58, 0.35);
  outline-offset: 2px;
}

.military-entry img {
  display: block;
  width: 62px;
  height: 35px;
  object-fit: cover;
  border-radius: 5px;
}

.military-entry span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.military-entry strong {
  color: #f3e5ba;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-transform: uppercase;
}

.military-entry small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--dark-2);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
  line-height: 1.1;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: #3a3e36;
  outline: 3px solid rgba(198, 154, 58, 0.35);
  outline-offset: 2px;
}

.btn.primary {
  background: var(--gold);
  color: #1c1a14;
}

.btn.primary:hover,
.btn.primary:focus-visible { background: #d8ae50; }

.btn:disabled {
  cursor: progress;
  opacity: 0.86;
}

.wait-indicator {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.wait-indicator img {
  display: block;
  width: 100%;
  height: 100%;
}

.btn .wait-indicator {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.wait-status {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero,
.section,
.quote-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: center;
  padding: 26px;
}

.hero-logo {
  display: block;
  width: min(460px, 100%);
  height: auto;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2.45rem, 6vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.lede {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quote-pointer {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--gold-dark);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.quote-layout.note-added .quote-pointer {
  display: flex;
}

.quote-pointer-arrow {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 2px;
  flex: 0 0 58px;
  background: var(--gold);
  animation: point-right 950ms ease-in-out infinite;
}

.quote-pointer-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.quote-layout.note-added textarea[name="Notes"] {
  animation: note-glow 1.8s ease-out 1;
}

@keyframes point-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes note-glow {
  0% { box-shadow: 0 0 0 0 rgba(198, 154, 58, 0); }
  28% { box-shadow: 0 0 0 4px rgba(198, 154, 58, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(198, 154, 58, 0); }
}

@keyframes point-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}

.quick-card {
  padding: 20px;
  border: 1px solid rgba(32, 35, 31, 0.12);
  border-radius: 8px;
  background: #fff7e3;
}

.quick-card p {
  color: var(--muted);
  line-height: 1.5;
}

.quick-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.service-board {
  margin: 14px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(198, 154, 58, 0.42);
  border-radius: 8px;
  background: #161713;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -12px 28px rgba(0, 0, 0, 0.28);
}

.service-board-label {
  display: block;
  padding: 7px 10px 6px;
  border-bottom: 1px solid rgba(198, 154, 58, 0.34);
  background: linear-gradient(180deg, #202119, #151611);
  color: #caa34d;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.service-rotator {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 13px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(180deg, #24251f 0%, #151611 49%, #090a08 50%, #1c1d18 100%);
  color: #f3e5ba;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.service-rotator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.service-rotator.is-flipping {
  animation: board-flip 520ms ease-in-out;
}

@keyframes board-flip {
  0% {
    opacity: 1;
    transform: perspective(420px) rotateX(0deg);
  }
  46% {
    opacity: 0.72;
    transform: perspective(420px) rotateX(-86deg);
  }
  54% {
    opacity: 0.72;
    transform: perspective(420px) rotateX(86deg);
  }
  100% {
    opacity: 1;
    transform: perspective(420px) rotateX(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-rotator.is-flipping {
    animation: none;
  }

  .quote-pointer-arrow,
  .quote-layout.note-added textarea[name="Notes"] {
    animation: none;
  }
}

.quick-card .btn {
  width: 100%;
  margin-top: 8px;
}

.quick-actions .btn {
  margin-top: 0;
}

.section {
  margin-top: 16px;
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.card p,
.section li {
  color: var(--muted);
  line-height: 1.52;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li {
  padding: 8px 11px;
  border: 1px solid rgba(32, 35, 31, 0.12);
  border-radius: 999px;
  background: #f7edd4;
  color: #4c4637;
  font-size: 0.92rem;
  font-weight: 750;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 118px;
  padding: 42px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark-2);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 900;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 16px;
  align-items: start;
}

.quote-panel {
  padding: 20px;
  background: var(--panel-solid);
}

form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: #3b3f38;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid rgba(32, 35, 31, 0.22);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 34px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(198, 154, 58, 0.32);
  border-color: var(--gold-dark);
}

.urgent-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(122, 90, 22, 0.26);
  border-radius: 8px;
  background: #fff0c9;
}

.urgent-panel[hidden] {
  display: none;
}

.urgent-panel strong {
  color: #332815;
}

.urgent-panel p {
  margin: 0;
  color: #4d3d1e;
  line-height: 1.45;
}

.urgent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.optional-details {
  border: 1px solid rgba(32, 35, 31, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.optional-details summary {
  min-height: 44px;
  padding: 12px 14px;
  color: #30352f;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.optional-details summary::-webkit-details-marker {
  display: none;
}

.optional-details summary::after {
  content: "+";
  float: right;
  color: var(--gold-dark);
  font-size: 1.2rem;
  line-height: 1;
}

.optional-details[open] summary {
  border-bottom: 1px solid rgba(32, 35, 31, 0.12);
}

.optional-details[open] summary::after {
  content: "-";
}

.optional-details p {
  margin: 12px 14px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.optional-details .form-grid {
  padding: 12px 14px 14px;
}

.fine-print {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.trust-strip strong {
  display: block;
  font-size: 1.3rem;
}

footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.45fr);
  gap: 28px;
  align-items: start;
  margin-top: 16px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.82);
  color: var(--white);
}

footer p,
footer a,
footer li {
  color: rgba(255, 255, 255, 0.82);
}

footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 1.65;
}

footer h2 {
  margin: 2px 0 12px;
  color: var(--white);
  font-size: 1rem;
}

.footer-tagline {
  max-width: 38ch;
  margin: 0;
}

.footer-logo {
  width: min(285px, 100%);
  max-width: 100%;
  height: auto;
  margin-bottom: 14px;
  filter: invert(1);
}

.footer-contact-list {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.footer-contact-list a {
  font-weight: 850;
}

.footer-service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 3px;
}

.footer-service-list .wide {
  grid-column: 1 / -1;
}

.footer-privacy {
  display: inline-block;
  margin-top: 12px;
  font-weight: 850;
}

.site-version {
  position: fixed;
  right: 10px;
  bottom: 8px;
  z-index: 20;
  padding: 4px 6px;
  border: 1px solid rgba(247, 244, 236, 0.18);
  border-radius: 5px;
  background: rgba(12, 12, 12, 0.68);
  color: rgba(247, 244, 236, 0.74);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
}

@media (min-width: 1700px) {
  body::before {
    width: 860px;
    height: 280px;
  }
}

@media (max-width: 1180px) {
  body::before {
    width: min(70vw, 680px);
    height: 220px;
    opacity: 0.54;
  }
}

@media (max-width: 850px) {
  .site-wrap {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar,
  .hero,
  .quote-layout,
  footer {
    grid-template-columns: 1fr;
  }

  .military-entry {
    width: 100%;
    margin-left: 0;
  }

  .contact-row,
  .hero-actions,
  .final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .contact-row .btn,
  .hero-actions .btn,
  .final-actions .btn { width: 100%; }

  .quote-pointer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .quote-pointer-arrow {
    width: 2px;
    height: 42px;
    flex: 0 0 42px;
    margin-left: 18px;
    animation-name: point-down;
  }

  .quote-pointer-arrow::after {
    top: auto;
    right: 50%;
    bottom: -1px;
    transform: translateX(50%) rotate(135deg);
  }

  .hero,
  .section {
    padding: 18px;
  }

  .hero-logo {
    width: min(390px, 100%);
  }

  .grid,
  .grid.two,
  .steps,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .footer-service-list {
    grid-template-columns: 1fr;
  }

  .footer-service-list .wide {
    grid-column: auto;
  }

  .steps li {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(10, 10, 10, 0.08), rgba(10, 10, 10, 0.56)),
      url("/assets/wallpaper/layers/gravel-road-tile.jpg");
  }

  body::before {
    left: -90px;
    bottom: -8px;
    width: 430px;
    height: 160px;
    opacity: 0.48;
  }

  h1 {
    margin-bottom: 10px;
    font-size: 2.15rem;
    line-height: 1;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .topbar {
    gap: 10px;
    padding: 10px;
  }

  .contact-row {
    gap: 6px;
  }

  .hero {
    gap: 14px;
    padding: 16px;
  }

  .hero-logo {
    width: min(260px, 100%);
    margin-bottom: 12px;
  }

  .lede {
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .quick-card {
    padding: 15px;
  }

  .quick-card h2 {
    font-size: 1.28rem;
  }

  .service-board {
    margin: 12px 0 14px;
  }

  .service-rotator {
    min-height: 52px;
    padding: 12px 10px;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
  }

  .form-grid,
  .hero-actions,
  .final-actions,
  .urgent-actions {
    grid-template-columns: 1fr;
  }

  .topbar .contact-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) and (max-height: 500px) {
  body::before {
    width: 380px;
    height: 130px;
    opacity: 0.42;
  }
}
