/* Johnson Machine Inc. --- hand-written stylesheet, no framework, no build step. */

:root {
  /* Brand palette. Text-bearing reds are deepened from the brand #ED1D24 so that
     white body copy clears WCAG 2.2 AA (5.15:1 instead of 4.38:1). */
  --brand-red: #ed1d24;
  --red-panel: #d81920;
  --red-panel-dark: #b31217;
  --blue: #2849ad;
  --blue-dark: #1e3888;
  --shell: #333438;
  --ink: #0b0b0c;
  --ink-soft: #171719;
  --steel: #45464b;
  --paper: #ffffff;
  --text: #ffffff;
  --muted: #a9a9ae;
  /* white is the only tint that clears 4.5:1 on --red-panel with margin;
     hierarchy on red panels comes from size and weight, not from dimming. */
  --muted-on-red: #ffffff;
  --muted-on-blue: #d6ddf5;
  --focus: #ffc400;

  --wrap: 74rem;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

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

  --radius: 4px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1.1em;
}

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

/* ---------- utility ---------- */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  transition: top 0.15s ease-in;
}

.skip-link:focus {
  top: 0.75rem;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- header ---------- */

.site-header {
  background: var(--shell);
  border-bottom: 3px solid var(--brand-red);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.6rem 0;
}

.brand {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
  border-radius: var(--radius);
}

.brand img {
  width: 132px;
  height: auto;
  aspect-ratio: 1024 / 571;
}

.site-nav ul,
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text);
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--brand-red);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--paper);
}

.site-nav .nav-phone a {
  color: var(--paper);
  background: var(--red-panel);
  border-radius: var(--radius);
  border-bottom-color: transparent;
  letter-spacing: 0.06em;
}

.site-nav .nav-phone a:hover {
  background: var(--red-panel-dark);
}

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

.hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(40, 73, 173, 0.55) 0%, rgba(11, 11, 12, 0.9) 55%),
    linear-gradient(180deg, var(--steel) 0%, var(--ink) 100%);
  padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 10vw, 7rem);
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-red) 0 50%, var(--blue) 50% 100%);
}

.hero-eyebrow {
  display: block;
  font-size: clamp(0.8rem, 0.72rem + 0.4vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 1.3rem + 5.2vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 900;
  text-wrap: balance;
}

.hero h1 .light {
  display: block;
  font-weight: 300;
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 0.62em;
  color: var(--text);
  margin-bottom: 0.1em;
}

.hero-sub {
  margin: 1.25rem auto 0;
  max-width: 36ch;
  font-size: clamp(1.15rem, 0.95rem + 1vw, 1.85rem);
  font-weight: 300;
  line-height: 1.28;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero .btn {
  margin-top: 2rem;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: var(--red-panel);
  color: var(--paper);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--red-panel-dark);
}

.btn-light {
  background: var(--paper);
  color: var(--red-panel-dark);
}

.btn-light:hover {
  background: #f0f0f0;
  color: var(--ink);
}

.btn-blue {
  background: var(--blue);
}

.btn-blue:hover {
  background: var(--blue-dark);
}

/* ---------- section scaffolding ---------- */

.section {
  padding: var(--section-y) 0;
}

.section-red {
  background: var(--red-panel);
}

.section-blue {
  background: var(--blue);
}

.section-steel {
  background: var(--shell);
}

.section-ink {
  background: var(--ink);
}

.section-soft {
  background: var(--ink-soft);
}

.section-title {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.25rem);
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.section-title strong {
  display: block;
  font-weight: 800;
}

.lede {
  max-width: 62ch;
  margin-top: 1.25rem;
  font-weight: 300;
}

.section-red .lede {
  color: var(--muted-on-red);
}

.section-steel .lede {
  color: var(--muted);
}

/* two-column split band */

.split {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

/* grid children default to min-width:auto, which lets a wide child blow the
   track out past the viewport. Reset it. */
.split > * {
  min-width: 0;
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.split-panel {
  padding: var(--section-y) clamp(1.25rem, 5vw, 4rem);
}

.split-panel > * {
  max-width: 34rem;
}

.split-art {
  /* Placeholder band standing in for the photography the live site runs here.
     Kept short on phones so it does not become dead scroll. */
  min-height: 9rem;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0 12px,
      rgba(255, 255, 255, 0) 12px 26px
    ),
    linear-gradient(160deg, var(--steel) 0%, var(--ink) 70%);
  border-bottom: 6px solid var(--brand-red);
}

@media (min-width: 48rem) {
  .split-art {
    min-height: 16rem;
  }
}

@media (min-width: 62rem) {
  .split-art {
    border-bottom: 0;
    border-right: 6px solid var(--brand-red);
  }
}

.split-art--blue {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0 12px,
      rgba(255, 255, 255, 0) 12px 26px
    ),
    linear-gradient(160deg, var(--blue-dark) 0%, var(--ink) 85%);
  border-color: var(--blue);
}

/* ---------- service list ---------- */

.services {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.services h3 {
  font-size: 1.25rem;
  text-transform: none;
  margin-bottom: 0.4rem;
}

.services p {
  color: var(--muted-on-red);
  font-weight: 300;
  font-size: 0.975rem;
}

.svc-icon {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.9rem;
  color: var(--paper);
}

/* ---------- hours card ---------- */

.hours-card {
  background: var(--blue);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  max-width: 30rem;
  margin-inline: auto;
}

.hours-card .hours-label {
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 0.35rem;
}

.hours-card p {
  margin-bottom: 0;
}

.hours-card .hours-big {
  font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0;
}

.hours-card .hours-days {
  margin-top: 0.35rem;
  font-weight: 300;
}

.hours-card .hours-note {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted-on-blue);
}

/* ---------- feature grid ---------- */

.features {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.features li {
  align-content: start;
}

.features h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.features p {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.9375rem;
}

/* ---------- info card (working time / location / call) ---------- */

.info-card {
  background: var(--blue);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 34rem;
  margin-inline: auto;
}

.info-card .info-logo {
  width: 15rem;
  max-width: 100%;
  margin: 0 auto 2rem;
}

.info-block + .info-block {
  margin-top: 1.85rem;
}

.info-block h2,
.info-block h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  margin-bottom: 0.9rem;
}

.info-block p {
  font-weight: 300;
}

.info-block a {
  color: var(--paper);
}

/* ---------- history ---------- */

.history {
  display: grid;
  gap: 2.5rem;
}

.history-entry h3 {
  font-size: 1.5rem;
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.history-entry p {
  color: var(--muted);
  font-weight: 300;
  max-width: 62ch;
}

.history-entry .company {
  color: var(--paper);
  font-weight: 700;
}

/* ---------- legacy prose ---------- */

.prose {
  max-width: 68ch;
  margin-inline: auto;
}

.prose p {
  font-weight: 400;
}

/* ---------- team ---------- */

.team {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  text-align: center;
}

.team img,
.team .team-placeholder {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  object-fit: cover;
  border: 4px solid var(--brand-red);
  background: var(--steel);
}

.team .team-placeholder {
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--muted);
  border-color: var(--steel);
}

.team h3 {
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  /* reserve two lines so a wrapping title does not shove one name out of line */
  min-height: 2.6rem;
}

.team p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9375rem;
}

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

.form-wrap {
  max-width: 40rem;
}

.notice {
  border: 2px solid var(--paper);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  background: rgba(0, 0, 0, 0.28);
}

.notice strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  margin-top: 1.75rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.field .req {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted-on-red);
}

.field .hint {
  display: block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  color: var(--muted-on-red);
  margin-top: 0.25rem;
}

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

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:disabled,
.field textarea:disabled {
  background: #ededee;
  color: #4a4a4e;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn[disabled] {
  background: var(--red-panel-dark);
  border-color: var(--paper);
  cursor: not-allowed;
}

.contact-direct {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.contact-direct a {
  color: var(--paper);
  font-weight: 700;
}

.hiring {
  margin-top: 1.5rem;
  font-weight: 700;
}

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

.site-footer {
  background: var(--shell);
  border-top: 3px solid var(--brand-red);
  padding: 2.25rem 0;
  text-align: center;
  font-size: 0.875rem;
}

.footer-nav ul {
  justify-content: center;
  gap: 0.25rem 0.5rem;
}

.footer-nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.75rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-address {
  margin: 1rem 0 0.35rem;
  color: var(--muted);
}

.footer-address a {
  color: var(--muted);
}

.footer-legal {
  margin: 0;
  color: var(--muted);
}
