/* Gamecock Truck & Trailer Service. Work-order chassis. Written fresh for this site. */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.62;
  font-synthesis-weight: none;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.14; letter-spacing: -.015em; margin: 0; font-weight: 600; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -.005em; }
p { margin: 0 0 var(--s2); max-width: var(--measure); }
a { color: inherit; }
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
* { scrollbar-color: var(--rule) var(--carbon); }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--carbon); }
*::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--carbon); }

.skip {
  position: absolute; left: var(--s2); top: -100px; z-index: 100;
  background: var(--red); color: var(--paper); padding: 12px 18px;
  font-family: var(--f-display); font-weight: 600; text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip:focus { top: var(--s2); }
.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-n { width: min(var(--wrap-narrow), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ambient: carbon paper fibre + slow ruling shift ---------- */
.fibre { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .02; mix-blend-mode: multiply; }
.ruling {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, var(--rule-2) 0 1px, transparent 1px 28px);
  opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  animation: rule-shift 16s linear infinite;
}
.sect--slab .ruling, .hero__under .ruling { background-image: repeating-linear-gradient(to bottom, var(--rule-dark) 0 1px, transparent 1px 28px); }
@keyframes rule-shift { from { transform: translateX(0); } to { transform: translateX(-56px); } }

/* ---------- header: work-order form block ---------- */
.site-head { position: relative; z-index: 20; background: var(--paper); }
.form-head {
  border: var(--bd); border-bottom-width: 2px; background: var(--carbon);
  margin-top: var(--s3); position: relative;
}
.form-head__fields {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: var(--bd);
}
.field {
  flex: 1 1 0; min-width: 0; padding: 10px var(--s2) 9px;
  border-right: var(--bd);
}
.field:last-child { border-right: 0; }
.field__label {
  display: block; font-family: var(--f-body); font-size: var(--t-label);
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 2px;
}
.field__value { font-family: var(--f-display); font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.form-head__title { padding: var(--s3) var(--s2) var(--s3); }
.form-head__title .co {
  font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.375rem, 3.4vw, 2rem); line-height: 1.08; display: block; color: var(--ink);
  text-decoration: none;
}
.form-head__title .co-sub { display: block; margin-top: 4px; font-size: var(--t-small); color: var(--ink-3); }
.form-head__rules { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; }
.form-head__rules line { stroke: var(--red); stroke-width: 2; }

/* nav tabs sit on the block's bottom rule */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 -2px var(--s2); padding: 0; list-style: none; position: relative; }
.tabs a {
  padding: 10px 18px; text-decoration: none;
  font-family: var(--f-display); font-weight: 500; font-size: var(--t-small);
  color: var(--ink-2); background: var(--carbon-2);
  border: var(--bd); border-bottom: 2px solid var(--rule);
  margin-right: -1px; min-height: 44px; display: flex; align-items: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tabs a:hover { background: var(--paper); color: var(--ink); }
.tabs a[aria-current="page"] {
  background: var(--paper); color: var(--ink); font-weight: 600;
  border-bottom-color: var(--paper); box-shadow: inset 0 3px 0 var(--red);
}
.nav-toggle {
  display: none; align-items: center; gap: 10px; margin: var(--s2);
  background: var(--paper); border: var(--bd); color: var(--ink);
  font-family: var(--f-display); font-weight: 600; font-size: var(--t-small);
  padding: 11px 16px; min-height: 44px; cursor: pointer; border-radius: 0;
  transition: background var(--dur) var(--ease);
}
.nav-toggle:hover { background: var(--carbon-2); }
.nav-toggle:active { transform: translateY(2px); }
.nav-toggle .bars { display: grid; gap: 3px; }
.nav-toggle .bars i { display: block; width: 16px; height: 2px; background: var(--ink); }

@media (max-width: 760px) {
  .field { flex: 1 1 50%; border-bottom: var(--bd); }
  .field:nth-child(2n) { border-right: 0; }
  .nav-toggle { display: inline-flex; }
  .tabs {
    display: none; flex-direction: column; margin: 0; border-top: var(--bd);
  }
  .tabs.open { display: flex; }
  .tabs a { border: 0; border-bottom: var(--bd); margin: 0; background: var(--paper); padding: 14px var(--s2); }
  .tabs a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); background: var(--carbon-2); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--red); color: var(--paper); text-decoration: none;
  font-family: var(--f-display); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; min-height: 48px; border: 0; border-radius: 0; cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--red-lift); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); }
.phone-plain {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; font-size: 1.25rem;
  border-bottom: 2px solid var(--rule); padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.phone-plain:hover { border-color: var(--red); color: var(--red); }
.tlink {
  color: var(--ink); text-decoration: none; font-weight: 500;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px; transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tlink:hover { background-size: 100% 2px; color: var(--red); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--slab); }
.hero__media { position: relative; }
.hero__media img { width: 100%; height: clamp(360px, 58vh, 620px); object-fit: cover; object-position: center 55%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,24,28,.92) 0%, rgba(20,24,28,.55) 34%, rgba(20,24,28,.12) 66%);
}
.hero__bar { position: absolute; left: 0; bottom: 0; z-index: 2; width: 100%; }
.title-bar {
  background: var(--red); color: var(--paper);
  display: inline-block; max-width: min(760px, 100%);
  padding: var(--s2) var(--s3); border-radius: 0;
}
.title-bar .tb-label {
  display: block; font-size: var(--t-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: rgba(244,242,237,.86); margin-bottom: 6px;
}
.title-bar h1 { color: var(--paper); }
.hero__under { background: var(--slab); color: var(--paper); padding: var(--s5) 0 var(--s6); position: relative; }
.hero__under .ruling { opacity: .3; }
.hero__grid { position: relative; z-index: 1; display: grid; gap: var(--s4); grid-template-columns: 1.1fr .9fr; align-items: start; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__lede { color: var(--paper-dim); font-size: var(--t-lead); max-width: 46ch; margin: 0; }
.callblock { border-top: var(--bd-dark); border-bottom: var(--bd-dark); padding: var(--s3) 0; }
.callblock .field__label { color: #8a939c; }
.bignum {
  display: inline-block; font-family: var(--f-display); font-weight: 700;
  font-size: var(--t-phone); letter-spacing: -.035em; line-height: 1.02;
  color: var(--paper); text-decoration: none; margin: 4px 0 var(--s2);
  transition: color var(--dur) var(--ease);
}
.bignum:hover { color: var(--red-lift); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.hero__cta .phone-plain { color: var(--paper); border-color: var(--rule-dark); }
.hero__cta .phone-plain:hover { color: var(--red-lift); border-color: var(--red-lift); }

/* ---------- sections ---------- */
.sect { padding: var(--section-y) 0; position: relative; }
.sect--carbon { background: var(--carbon); }
.sect--slab { background: var(--slab); color: var(--paper); }
.sect--slab h2, .sect--slab h3 { color: var(--paper); }
.sect--slab p { color: var(--paper-dim); }
.sect__head { position: relative; margin-bottom: var(--s5); }
.sect__head h2 { position: relative; z-index: 1; }
.sect__head p { position: relative; z-index: 1; margin-top: var(--s2); }

/* form block container */
.block { border: var(--bd); background: var(--paper); border-radius: 0; position: relative; }
.sect--slab .block { background: var(--slab-2); border-color: var(--rule-dark); }
.block__label {
  font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-3); padding: 9px var(--s2); border-bottom: var(--bd); background: var(--carbon);
}
.sect--slab .block__label { color: #8a939c; background: #171d22; border-color: var(--rule-dark); }
.block__body { padding: var(--s3); }
.block__body > :last-child { margin-bottom: 0; }

/* ruled rows: how facts are presented (never a stat strip) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline;
  padding: 13px var(--s2); border-bottom: var(--bd-2);
}
.rows li:last-child { border-bottom: 0; }
.rows .rk {
  flex: 0 0 auto; min-width: 148px; font-size: var(--t-label);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.rows .rv { flex: 1 1 260px; color: var(--ink); }
.sect--slab .rows li { border-color: var(--rule-dark); }
.sect--slab .rows .rk { color: #8a939c; }
.sect--slab .rows .rv, .sect--slab .rows .rv a { color: var(--paper); }
.rows--link li { padding: 0; }
.rows--link li a {
  display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; width: 100%;
  padding: 15px var(--s2); min-height: 44px; text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.rows--link li a:hover { background: var(--carbon); }
.sect--slab .rows--link li a:hover { background: #202830; }

/* photo bands */
.band { position: relative; }
.band img { width: 100%; height: clamp(240px, 40vh, 420px); object-fit: cover; }
.pair { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s5); align-items: start; }
.pair > figure { align-self: center; }
.pair--flip { grid-template-columns: 1fr 1.35fr; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }
.plate { border: var(--bd); background: var(--paper); padding: var(--s1); }
.sect--slab .plate { border-color: var(--rule-dark); background: var(--slab-2); }
.plate img { width: 100%; }
.plate--tall img { max-height: 460px; object-fit: cover; }
.cap {
  font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-3); padding: 10px var(--s1) 2px;
}
.sect--slab .cap { color: #8a939c; }
.prose { max-width: var(--measure); }
h2 + .prose, h2 + .prose > p:first-child { margin-top: 0; }
.pair h2, .sect > .wrap > h2 { margin-bottom: var(--s2); }
.pair .prose { margin-top: var(--s2); }

/* ---------- signature: the work order sheet ---------- */
.wo { border: 2px solid var(--rule); background: var(--paper); position: relative; }
.sect--slab .wo { border-color: var(--rule-dark); background: var(--slab-2); }
.wo__head { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--rule); }
.sect--slab .wo__head { border-color: var(--rule-dark); }
.wo__head .field { border-color: var(--rule); }
.sect--slab .wo__head .field { border-color: var(--rule-dark); }
.sect--slab .wo__head .field__label { color: #8a939c; }
.sect--slab .wo__head .field__value { color: var(--paper); }
.wo__cols {
  display: grid; grid-template-columns: 56px 1fr 268px; gap: 0;
  border-bottom: var(--bd); background: var(--carbon);
  font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.sect--slab .wo__cols { background: #171d22; border-color: var(--rule-dark); color: #8a939c; }
.wo__cols span { padding: 9px var(--s2); border-right: var(--bd); }
.wo__cols span:last-child { border-right: 0; }
.sect--slab .wo__cols span { border-color: var(--rule-dark); }
.wo__row {
  display: grid; grid-template-columns: 56px 1fr 268px;
  border-bottom: var(--bd-2); min-height: 60px;
}
.sect--slab .wo__row { border-color: var(--rule-dark); }
.wo__row > * { padding: 14px var(--s2); border-right: var(--bd-2); display: flex; align-items: center; }
.sect--slab .wo__row > * { border-color: var(--rule-dark); }
.wo__row > *:last-child { border-right: 0; }
.wo__no { color: var(--ink-3); font-size: var(--t-small); }
.sect--slab .wo__no { color: #8a939c; }
.wo__item { font-family: var(--f-body); font-weight: 500; }
.wo__note { color: var(--ink-2); font-size: var(--t-small); }
.sect--slab .wo__note { color: #99a2ab; }
.wo__row--open .wo__item, .wo__row--open .wo__note { color: var(--ink-3); font-style: italic; }
.sect--slab .wo__row--open .wo__item, .sect--slab .wo__row--open .wo__note { color: #8b949d; }
.wo__foot {
  border-top: 2px solid var(--rule); padding: var(--s3);
  display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between;
}
.sect--slab .wo__foot { border-color: var(--rule-dark); }
.wo__sig { flex: 1 1 300px; }
.wo__sig .field__label { margin-bottom: var(--s2); }
.wo__sigline { border-bottom: 1px solid var(--rule); height: 1px; max-width: 320px; }
.sect--slab .wo__sigline { border-color: var(--rule-dark); }
@media (max-width: 700px) {
  .wo__cols { grid-template-columns: 44px 1fr; }
  .wo__cols span:last-child { display: none; }
  .wo__row { grid-template-columns: 44px 1fr; padding-bottom: 12px; }
  .wo__row > * { border-right: 0; padding: 12px var(--s2) 0; align-items: start; }
  .wo__no { padding-top: 13px; }
  .wo__row > *:last-child { grid-column: 2 / -1; padding-top: 2px; }
}
/* fill animation */
[data-anim] .wo__row .wo__item, [data-anim] .wo__row .wo__note { opacity: 0; transform: translateY(6px); }
[data-anim] .wo__row.is-filled .wo__item, [data-anim] .wo__row.is-filled .wo__note { opacity: 1; transform: none; transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
[data-anim] .wo__row.is-filled .wo__note { transition-delay: 90ms; }

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s3); }
.f-row { display: grid; gap: var(--s1); }
.f-row label {
  font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3);
}
.f-row input, .f-row select, .f-row textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: var(--bd); border-radius: 0;
  padding: 12px var(--s2); min-height: 48px; width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.f-row textarea { min-height: 128px; resize: vertical; }
.f-row input:hover, .f-row select:hover, .f-row textarea:hover { border-color: var(--ink-3); }
.f-row input:focus-visible, .f-row select:focus-visible, .f-row textarea:focus-visible {
  outline: none; border-color: var(--red); box-shadow: inset 0 0 0 2px var(--red);
}
.f-row input:disabled { background: var(--carbon); color: var(--ink-3); }
.f-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 620px) { .f-two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: var(--t-small); color: var(--ink-2); max-width: 52ch; }
.form__msg {
  display: none; border: 2px solid var(--red); background: #f7ebea;
  padding: var(--s3); color: var(--ink);
}
.form__msg.show { display: block; }
.form__msg strong { font-family: var(--f-display); display: block; margin-bottom: 6px; }
.form__msg a { color: var(--red); font-weight: 600; }

/* ---------- footer ---------- */
.site-foot { background: var(--slab); color: var(--paper-dim); padding: var(--s7) 0 var(--s6); font-size: var(--t-small); }
.foot__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s5); }
@media (max-width: 800px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }
.site-foot .fh {
  font-family: var(--f-display); font-size: var(--t-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: #8a939c; margin: 0 0 var(--s2); font-weight: 500;
}
.site-foot p { color: var(--paper-dim); max-width: 42ch; }
.site-foot a { color: var(--paper); text-decoration: none; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot ul li a { padding: 10px 0; min-height: 44px; display: flex; align-items: center; transition: color var(--dur) var(--ease); }
.site-foot ul li a:hover { color: var(--red-lift); }
.foot__fine {
  margin-top: var(--s6); padding-top: var(--s3); border-top: var(--bd-dark);
  color: #79838d; display: grid; gap: var(--s1);
}
.foot__fine p { color: #838d96; max-width: 78ch; margin: 0; font-size: .75rem; }

/* ---------- mobile sticky call bar ---------- */
.stickbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none;
  grid-template-columns: 1fr 1fr; border-top: 2px solid var(--red);
  transform: translateY(102%); transition: transform 260ms var(--ease);
}
.stickbar.show { transform: none; }
.stickbar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: .9375rem;
}
.stickbar .sb-call { background: var(--red); color: var(--paper); }
.stickbar .sb-alt { background: var(--slab); color: var(--paper); }
.stickbar a:active { transform: translateY(2px); }
@media (max-width: 760px) {
  .stickbar { display: grid; }
  body { padding-bottom: 56px; }
}

/* ---------- icons ---------- */
.ico { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- scroll reveals ---------- */
[data-anim] .rv-up { opacity: 0; transform: translateY(18px); }
[data-anim] .rv-up.in { opacity: 1; transform: none; transition: opacity 520ms var(--ease), transform 520ms var(--ease); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ruling { animation: none; }
  [data-anim] .rv-up, [data-anim] .wo__row .wo__item, [data-anim] .wo__row .wo__note { opacity: 1 !important; transform: none !important; }
  .stickbar { transition: none; }
}
