:root {
  --red: #a51f1f;
  --red-dark: #7f1717;
  --ink: #222222;
  --muted: #666666;
  --line: #dddddd;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --dark: #252525;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
  background: var(--paper);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.site-header {
  background: var(--paper);
  border-top: 6px solid var(--red);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-main {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(560px, 1.05fr);
  gap: 28px;
  align-items: center;
  padding: 20px 0 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  display: block;
  width: min(100%, 440px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brand-name {
  display: block;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
}

.header-info {
  display: grid;
  gap: 8px;
  justify-self: end;
  width: max-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.permits {
  display: grid;
  gap: 4px;
}

.permit {
  display: grid;
  grid-template-columns: 220px minmax(0, max-content);
  gap: 16px;
  align-items: baseline;
  color: var(--red);
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}

.permit-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.permit-label {
  color: var(--red);
  white-space: nowrap;
}

.permit-number {
  color: var(--ink);
  font-weight: 700;
}

.header-contact {
  display: flex;
  gap: 10px 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  line-height: 1.45;
}

.header-contact span {
  white-space: nowrap;
}

.header-locations {
  display: grid;
  gap: 3px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.header-location {
  display: grid;
  grid-template-columns: 100px minmax(0, max-content);
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding-left: 10px;
  border-left: 3px solid rgba(165, 31, 31, 0.22);
  font-size: 11px;
  line-height: 1.35;
}

.header-location span:last-child {
  white-space: nowrap;
}

.header-location-contact {
  color: var(--muted);
  font-weight: 700;
}

.location-name {
  color: var(--red);
  font-weight: 900;
}

.company-lines {
  display: grid;
  gap: 4px;
}

.nav-wrap {
  background: var(--dark);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  min-width: 150px;
  padding: 13px 18px;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--red);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: var(--red-dark);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.32)), url("../images/hero.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  width: min(calc(100% - 40px), 980px);
  text-align: center;
  padding: 64px 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.35;
  letter-spacing: 0;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.hero p {
  margin: 22px auto 0;
  max-width: 720px;
  font-size: 18px;
  font-weight: 700;
}

.button-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.sp-only {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  color: #ffffff;
  font-weight: 800;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: var(--red);
}

.button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.2);
}

.section {
  padding: 78px 0;
}

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

.section-head {
  margin-bottom: 34px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.35;
}

.section-lead {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-number {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.feature h3 {
  margin: 8px 0 8px;
  font-size: 20px;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.vehicle-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.06);
}

.vehicle-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eeeeee;
}

.vehicle-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.vehicle-image-button span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 4px;
}

.vehicle-image-button:hover span,
.vehicle-image-button:focus-visible span {
  background: var(--red);
}

.vehicle-image-button:focus-visible {
  outline: 3px solid rgba(165, 31, 31, 0.35);
  outline-offset: 3px;
}

.vehicle-body {
  padding: 16px 18px 18px;
}

.vehicle-body:has(.vehicle-name:only-child) {
  padding: 14px 18px;
}

.vehicle-name {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  background: var(--red);
  border-radius: 4px;
}

.vehicle-spec {
  margin: 10px 0 7px;
  font-weight: 800;
}

.vehicle-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cta-band {
  padding: 42px 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
}

.cta-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.cta-inner h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.4;
}

.cta-inner p {
  margin: 8px 0 0;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.42)), url("../images/truck-25t-oc.jpg") center / cover;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
}

.page-hero p {
  margin: 10px 0 0;
  max-width: 720px;
  font-weight: 700;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
}

.company-table th,
.company-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.company-table th {
  width: 260px;
  color: var(--red);
  background: #fafafa;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-check {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #ffffff;
}

.field textarea {
  min-height: 180px;
  resize: vertical;
}

.side-box {
  padding: 24px;
  color: #ffffff;
  background: var(--dark);
  border-radius: 8px;
}

.side-box h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.side-box p {
  margin: 0 0 12px;
}

.tel {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-modal.open {
  display: flex;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
}

.gallery-dialog {
  position: relative;
  width: min(100%, 920px);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 22px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.gallery-dialog h2 {
  margin: 0 48px 16px 0;
  font-size: 24px;
  line-height: 1.35;
}

.gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.gallery-main {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #f1f1f1;
  border-radius: 6px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.gallery-thumb {
  padding: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.gallery-thumb.active {
  border-color: var(--red);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-thumb span {
  display: block;
  padding: 5px 8px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.site-footer {
  color: #ffffff;
  background: #222222;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 42px 0;
}

.footer-company {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.footer-company p {
  margin: 0;
}

.footer-logo-panel {
  display: block;
  width: 300px;
  max-width: 100%;
  padding: 0;
}

.footer-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
}

.footer-brand {
  width: min(100%, 300px);
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.footer-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
  font-weight: 700;
}

.copyright {
  margin: 0;
  padding: 14px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .header-main {
    grid-template-columns: 1fr auto;
  }

  .header-info,
  .nav-wrap {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-wrap.open {
    display: block;
  }

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

  .site-nav a {
    min-width: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    border-right: 0;
  }

  .hero {
    min-height: 520px;
  }

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

  .contact-layout,
  .footer-inner,
  .cta-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--max));
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-logo-wrap {
    width: min(100%, 270px);
  }

  .hero {
    min-height: 500px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .sp-only {
    display: inline;
  }

  .hero p {
    font-size: 15px;
  }

  .section {
    padding: 56px 0;
  }

  .feature-grid,
  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .company-table,
  .company-table tbody,
  .company-table tr,
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
  }

  .company-table th {
    padding-bottom: 6px;
  }

  .company-table td {
    padding-top: 8px;
  }

  .contact-form {
    padding: 20px;
  }

  .gallery-modal {
    padding: 14px;
  }

  .gallery-dialog {
    padding: 16px;
  }
}
