/* Heritage Prime Meats - hiring site
   Navy-first, red rationed. Red appears on the primary CTA, the earnings
   figure, and required markers. Nowhere else. That restraint is what makes
   it read as an established employer rather than a campaign. */

:root {
  --navy:       #12294d;
  --navy-deep:  #0b1c36;
  --blue:       #2557a7;
  --red:        #b02a30;
  --red-dark:   #8e2126;
  --cream:      #f7f5f1;
  --ink:        #1b1f24;
  --rule:       #dcd9d2;

  --muted:      #5b636e;
  --white:      #ffffff;

  --wrap:       72rem;
  --wrap-narrow: 46rem;

  --r:    10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(11, 28, 54, .06), 0 2px 8px rgba(11, 28, 54, .05);
  --shadow-md: 0 2px 4px rgba(11, 28, 54, .07), 0 12px 28px rgba(11, 28, 54, .09);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --step: .35s cubic-bezier(.22, .61, .36, 1);
}

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

/* [hidden] is a user-agent rule and loses to any class that sets display.
   Without this, .btn { display: inline-flex } keeps hidden buttons on
   screen - which showed Back, Continue and Submit all at once on step 1. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.018em; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: var(--wrap-narrow); }

/* ---------- masthead ---------- */

.masthead {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  position: sticky; top: 0; z-index: 40;
}
.masthead-in {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 62px; gap: 1rem;
}
.wordmark { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.wordmark-rule {
  width: 3px; height: 26px; border-radius: 2px;
  background: linear-gradient(180deg, var(--red) 0 50%, var(--white) 50% 100%);
}
.wordmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark-text strong {
  color: var(--white); font-size: .98rem; font-weight: 700; letter-spacing: .01em;
}
.wordmark-text span {
  color: #9fb3d1; font-size: .68rem; letter-spacing: .19em; text-transform: uppercase;
}
.masthead-cta {
  color: var(--white); text-decoration: none; font-weight: 600; font-size: .9rem;
  border: 1px solid rgba(255, 255, 255, .32);
  padding: .48rem 1.05rem; border-radius: 999px;
  transition: background var(--step), border-color var(--step);
}
.masthead-cta:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255,255,255,.55); }

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(4rem, 9vw, 6rem);
}
.hero-in { position: relative; z-index: 2; max-width: 54rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 1.15rem; padding: .34rem .85rem .34rem .7rem;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  font-size: .74rem; font-weight: 700;
  letter-spacing: .17em; text-transform: uppercase; color: #dce6f5;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px rgba(176, 42, 48, .3);
}

.hero-title {
  font-size: clamp(2.3rem, 6.2vw, 4.1rem);
  font-weight: 800; margin-bottom: 1.1rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  color: #c9d7ea; max-width: 44rem; margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero-trust { margin: 0; font-size: .92rem; color: #93a9c6; }

/* Seven stripes. A flag reference, not a flag. */
.hero-stripes {
  position: absolute; inset: auto 0 0 0; display: flex; height: 6px; z-index: 1;
}
.hero-stripes span { flex: 1; }
.hero-stripes span:nth-child(odd)  { background: var(--red); }
.hero-stripes span:nth-child(even) { background: rgba(255, 255, 255, .9); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: .88rem 1.7rem; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform var(--step), background var(--step),
              box-shadow var(--step), border-color var(--step);
}
.btn-primary {
  background: var(--red); color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 18px rgba(176, 42, 48, .3);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: currentColor;
  border-color: rgba(255, 255, 255, .35);
}
.section-apply .btn-ghost, .thanks .btn-ghost {
  color: var(--navy); border-color: var(--rule); background: var(--white);
}
.btn-ghost:hover { border-color: currentColor; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px;
}
.hero :where(a, button):focus-visible { outline-color: #9ec5ff; }

/* ---------- sections ---------- */

.section { padding: clamp(3.2rem, 7vw, 5.2rem) 0; }
.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 800;
  color: var(--navy); margin-bottom: 2rem;
}
.section-traits { background: var(--white); border-block: 1px solid var(--rule); }

/* ---------- value tiles: rank drives size ---------- */

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.tile {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .3rem;
}
.tile-r1 {
  grid-column: span 4;
  background: var(--navy); border-color: var(--navy);
  color: var(--white); padding: clamp(1.8rem, 4vw, 2.9rem);
  box-shadow: var(--shadow-md);
}
.tile-r2 { grid-column: span 2; }
.tile-r3 { grid-column: span 1; }

.tile-value {
  margin: 0; font-weight: 800; color: var(--navy);
  font-variant-numeric: tabular-nums; font-size: 1.5rem; letter-spacing: -.02em;
}
.tile-r1 .tile-value {
  color: #ff6b70; font-size: clamp(2.4rem, 7vw, 4.3rem); line-height: 1;
  margin-bottom: .5rem;
}
.tile-r3 .tile-value { font-size: 1.15rem; color: var(--blue); }
.tile-label { margin: 0; font-weight: 600; color: var(--ink); }
.tile-r1 .tile-label { color: var(--white); font-size: 1.2rem; font-weight: 700; }
.tile-r3 .tile-label { font-size: .9rem; font-weight: 500; color: var(--muted); }
.tile-detail { margin: .3rem 0 0; font-size: .92rem; color: var(--muted); }
.tile-r1 .tile-detail { color: #a9bdd8; }

/* ---------- traits ---------- */

.traits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 2rem; }
.trait { display: flex; flex-direction: column; gap: .45rem; }
.icon { width: 40px; height: 40px; margin-bottom: .35rem; }
.icon path, .icon circle, .icon rect {
  fill: none; stroke: var(--navy); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon .icon-accent { fill: var(--red); stroke: none; }
.icon .icon-accent-stroke { stroke: var(--red); }
.trait-title { font-size: 1.06rem; font-weight: 700; color: var(--navy); }
.trait-text { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- expectations ---------- */

.section-expect { padding-top: 0; }
.expect {
  background: var(--white); border: 1px solid var(--rule);
  border-left: 4px solid var(--navy);
  border-radius: var(--r-lg); padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-sm);
}
.expect-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: .6rem; }
.expect-body { margin: 0; color: var(--muted); max-width: 52rem; }

/* ---------- straight answers ----------
   Skepticism is the main reason a qualified applicant leaves. This section
   is doing conversion work, not decoration. */

.section-faq { background: var(--white); border-top: 1px solid var(--rule); }
.faq-lede { margin: -1.4rem 0 1.8rem; color: var(--muted); }
.faq { border-top: 1px solid var(--rule); }

.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 0; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--navy); font-size: 1.03rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue); }
.chev {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: var(--muted); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--step);
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item p {
  margin: -.2rem 0 1.15rem; color: var(--muted); max-width: 42rem;
}

/* ---------- sticky mobile apply bar ---------- */

.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: none; align-items: center; gap: .8rem;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 -4px 16px rgba(11, 28, 54, .22);
}
.stickybar-text { flex: 1; min-width: 0; }
.stickybar-text b { display: block; color: var(--white); font-size: .92rem; }
.stickybar-text span { color: #9fb3d1; font-size: .76rem; }
.stickybar .btn { padding: .7rem 1.2rem; font-size: .95rem; flex: none; }

/* ---------- form ---------- */

.section-apply { background: var(--white); border-top: 1px solid var(--rule); }
.apply-lede { margin: -1.4rem 0 2rem; color: var(--muted); }

.req { color: var(--red); font-weight: 700; }
.optional {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-left: .5rem;
  border: 1px solid var(--rule); border-radius: 999px; padding: .15rem .5rem;
}

.progress { margin-bottom: 1.8rem; }
.progress-bar {
  height: 5px; background: var(--rule); border-radius: 999px; overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0; background: var(--navy);
  border-radius: 999px; transition: width var(--step);
}
.progress-text {
  margin: .55rem 0 0; font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

.step { border: 0; margin: 0 0 1.6rem; padding: 0; min-width: 0; }
.step-legend {
  font-size: 1.28rem; font-weight: 800; color: var(--navy);
  padding: 0; margin-bottom: 1.1rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.field { display: flex; flex-direction: column; margin-bottom: .3rem; min-width: 0; }
.field label { font-weight: 600; font-size: .92rem; margin-bottom: .38rem; color: var(--ink); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: .72rem .85rem; background: var(--white);
  border: 1px solid #c6c2ba; border-radius: var(--r);
  transition: border-color var(--step), box-shadow var(--step);
  width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: #9d9a93; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 87, 167, .16);
  outline: none;
}
input[aria-invalid="true"] { border-color: var(--red); }
textarea { resize: vertical; min-height: 6.5rem; }
input[type="file"] {
  font: inherit; font-size: .92rem; padding: .6rem;
  border: 1px dashed #b3aea5; border-radius: var(--r);
  background: var(--cream); width: 100%;
}

.hint { margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }
.counter { margin: .3rem 0 0; font-size: .78rem; color: var(--muted); text-align: right; }
.err { margin: .35rem 0 0; font-size: .86rem; font-weight: 600; color: var(--red); }
.err:empty { display: none; }

.errors {
  background: #fdf1f1; border: 1px solid #eccbcc; border-left: 4px solid var(--red);
  border-radius: var(--r); padding: .9rem 1.1rem; margin-bottom: 1.5rem;
}
.errors p { margin: 0; font-weight: 600; color: var(--red-dark); }

.q { font-weight: 600; margin: 0 0 .6rem; }
.gate { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.gate:last-of-type { border-bottom: 0; }

.choices { display: flex; flex-direction: column; gap: .55rem; }
.choices-inline { flex-direction: row; gap: .6rem; }
.choice {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: .7rem .95rem; background: var(--white);
  font-size: .96rem; font-weight: 500;
  transition: border-color var(--step), background var(--step);
}
.choices-inline .choice { min-width: 6.5rem; justify-content: center; }
.choice:hover { border-color: var(--blue); background: #f4f8ff; }
.choice input { accent-color: var(--navy); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--navy); background: #eef3fb; }

.expedite {
  background: #eef3fb; border: 1px solid #cddcf2; border-radius: var(--r);
  padding: .85rem 1.05rem; margin: 0 0 1.2rem;
  font-weight: 600; color: var(--navy);
}
.privacy {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 1.1rem 0 0; font-size: .87rem; color: var(--muted);
  background: var(--cream); border: 1px solid var(--rule);
  border-radius: var(--r); padding: .95rem 1.1rem;
}
.lock { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.lock path, .lock rect {
  fill: none; stroke: var(--navy); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

.certify { margin: 1.8rem 0 1.4rem; }
.certify .choice { align-items: flex-start; }

.nav { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-submit { position: relative; }
.spinner { display: none; width: 16px; height: 16px; }
.is-submitting .btn-label { opacity: .65; }
.is-submitting .spinner {
  display: block; border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white); border-radius: 50%;
}

/* honeypot: off-screen, not display:none - some bots skip hidden fields */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

.declined {
  background: var(--white); border: 1px solid var(--rule);
  border-left: 4px solid var(--navy); border-radius: var(--r-lg);
  padding: clamp(1.7rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm);
}
.declined h2 { color: var(--navy); font-size: 1.5rem; margin-bottom: .7rem; }
.declined p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- thanks ---------- */

.thanks-main { padding: clamp(3.5rem, 10vw, 7rem) 0; }
.thanks { text-align: center; }
.thanks-mark { width: 76px; height: 76px; margin-bottom: 1.4rem; }
.thanks-mark circle { fill: none; stroke: var(--rule); stroke-width: 3; }
.thanks-mark .thanks-check {
  fill: none; stroke: var(--navy); stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round;
}
.thanks h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--navy); margin-bottom: .9rem; }
.thanks-body { font-size: 1.1rem; color: var(--muted); margin: 0 auto 1rem; max-width: 34rem; }
.thanks-aside { font-weight: 600; color: var(--navy); margin: 0 0 2rem; }

/* ---------- footer ---------- */

.footer { background: var(--navy-deep); color: #a9bdd8; padding: 2.6rem 0; }
.footer-in { display: flex; gap: 2rem; justify-content: space-between; flex-wrap: wrap; }
.footer-name { margin: 0; color: var(--white); font-weight: 700; font-size: 1.05rem; }
.footer-tag { margin: .2rem 0 0; font-size: .9rem; }
.footer-eeo { margin: 0; font-size: .78rem; max-width: 34rem; line-height: 1.55; color: #7f95b4; }

/* ---------- responsive ---------- */

@media (max-width: 62rem) {
  .traits { grid-template-columns: repeat(2, 1fr); }
  .tile-r3 { grid-column: span 2; }
}

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .tiles { grid-template-columns: 1fr; }
  .tile, .tile-r1, .tile-r2, .tile-r3 { grid-column: span 1; }
  .traits { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .nav .btn { flex: 1 1 auto; }
  .masthead-cta { padding: .42rem .9rem; }

  /* Most of this traffic arrives from a phone. Once the hero CTA has
     scrolled away, the way to apply must stay within thumb reach. */
  .stickybar.is-on { display: flex; }

  /* Constant, not conditional on the bar being shown. Tying this to
     :has(.is-on) made showing the bar change the document height, which
     moved the observed element, which re-fired the observer - a reflow
     loop that pegged rendering. */
  .footer { padding-bottom: 7rem; }
}

/* ---------- motion ----------
   Everything below is opt-in. With reduced motion requested, nothing here
   applies and every element renders in its final state. */

@media (prefers-reduced-motion: no-preference) {
  /* The .js gate matters: motion.js sets that class on <html> before it
     observes anything. If the script is blocked, slow, or errors, the
     class never lands and the content simply renders - rather than the
     page silently hiding its own copy behind an animation that will
     never run. */
  .js .reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  .js .icon .draw {
    stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200);
  }
  .js .trait.is-in .icon .draw {
    animation: draw .75s cubic-bezier(.4, 0, .2, 1) forwards;
  }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  .thanks-mark .thanks-check {
    stroke-dasharray: 44; stroke-dashoffset: 44;
    animation: draw .5s .15s cubic-bezier(.4, 0, .2, 1) forwards;
  }

  .is-submitting .spinner { animation: spin .7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

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