:root {
  color-scheme: light;
  --blue: #053a7d;
  --blue-strong: #062b5e;
  --blue-dark: #08182f;
  --yellow: #f0b429;
  --yellow-strong: #d89212;
  --ink: #0f1720;
  --muted: #657083;
  --line: #dbe2ea;
  --paper: #ffffff;
  --mist: #f4f7fa;
  --steel: #e6ebf1;
  --shadow: 0 18px 50px rgba(8, 24, 47, 0.16);
  --radius: 8px;
  --container: min(1160px, calc(100% - 40px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--yellow);
  color: var(--blue-dark);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(219, 226, 234, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 155px;
}

.brand img {
  width: 155px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--blue-dark);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--mist);
  color: var(--blue);
  outline: none;
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 420px;
  height: clamp(420px, 26.5625vw, 510px);
  display: grid;
  align-items: center;
  overflow: clip;
  isolation: isolate;
  background: var(--blue-dark);
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 24, 47, 0.82) 0%, rgba(8, 24, 47, 0.58) 43%, rgba(8, 24, 47, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 24, 47, 0.18), transparent 42%);
}

.hero-content {
  padding-block: 58px 74px;
  color: var(--paper);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.9rem, 6.4vw, 5.35rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--yellow);
  color: var(--blue-dark);
  border-color: var(--yellow);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #ffd05a;
  outline: none;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.42);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.metrics {
  background: var(--blue);
  color: var(--paper);
}

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

.metrics article {
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 26px 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.metrics article:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.metrics strong {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.metrics span {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.section {
  padding-block: clamp(70px, 10vw, 120px);
}

.section-head {
  max-width: 980px;
  margin-bottom: 32px;
}

.section-head h2,
.about-section h2,
.contact-panel h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow),
.about-section p,
.contact-panel address {
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--blue-dark);
  padding: 0 15px;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip:focus-visible,
.filter-chip.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--paper);
  outline: none;
}

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

.machine-card,
.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(8, 24, 47, 0.08);
}

.machine-card {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.machine-card.has-gallery {
  cursor: zoom-in;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.machine-card.has-gallery:hover,
.machine-card.has-gallery:focus-visible {
  border-color: rgba(5, 58, 125, 0.42);
  box-shadow: 0 16px 38px rgba(8, 24, 47, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.machine-card[hidden] {
  display: none;
}

.machine-media {
  position: relative;
  overflow: hidden;
  background: var(--steel);
}

.machine-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--steel);
}

.image-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(8, 24, 47, 0.84);
  color: var(--paper);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.machine-card.text-card {
  background:
    linear-gradient(150deg, rgba(5, 58, 125, 0.08), rgba(240, 180, 41, 0.12)),
    var(--paper);
}

.machine-card.text-card .machine-card-body {
  min-height: 280px;
}

.machine-card-body,
.service-card {
  padding: 24px;
}

.tag {
  width: max-content;
  margin: 0 0 14px;
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.2);
  color: var(--blue-strong);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.machine-card h3,
.service-card h3,
.lead-form h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.35rem;
  line-height: 1.16;
}

.machine-card p:not(.tag),
.service-card p {
  color: var(--muted);
}

.machine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.machine-meta div {
  display: grid;
  gap: 2px;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  padding: 8px 10px;
}

.machine-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.machine-meta dd {
  margin: 0;
  color: var(--blue-dark);
  font-weight: 900;
}

.machine-card a {
  color: var(--blue);
  font-weight: 900;
}

.machine-card a:hover,
.machine-card a:focus-visible {
  color: var(--blue-strong);
  outline: none;
}

.stock-message {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--mist);
  color: var(--muted);
  padding: 28px;
  font-weight: 800;
}

.stock-error {
  border-color: rgba(216, 60, 60, 0.35);
  background: #fff5f5;
  color: #9b1c1c;
}

.services,
.about-section {
  background: var(--mist);
}

.service-card {
  min-height: 260px;
}

.service-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 6px;
  background: var(--blue);
  color: var(--paper);
  font-weight: 900;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(34px, 7vw, 74px);
  align-items: center;
}

.about-grid img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  font-weight: 800;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--yellow-strong);
  border-bottom: 3px solid var(--yellow-strong);
  transform: rotate(-45deg);
}

.contact-section {
  background: var(--blue-dark);
  color: var(--paper);
}

.contact-panel h2 {
  color: var(--paper);
}

.contact-methods {
  display: grid;
  gap: 10px;
  margin: 30px 0;
}

.contact-methods a {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.contact-methods a:hover,
.contact-methods a:focus-visible {
  border-color: rgba(240, 180, 41, 0.74);
  outline: none;
}

.contact-methods span,
.form-note {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-methods strong {
  font-size: 1.08rem;
}

address {
  font-style: normal;
}

.map-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--yellow);
  font-weight: 900;
}

.lead-form {
  display: grid;
  gap: 16px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
}

.lead-form label {
  display: grid;
  gap: 7px;
  color: var(--blue-dark);
  font-weight: 900;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  color: var(--ink);
  padding: 12px 13px;
}

.lead-form textarea {
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(5, 58, 125, 0.16);
}

.lead-form .button {
  width: max-content;
}

.form-note {
  margin: 0;
  color: var(--muted);
  text-transform: none;
}

.photo-dialog {
  width: min(1000px, calc(100% - 32px));
  max-width: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.photo-dialog::backdrop {
  background: rgba(6, 18, 37, 0.78);
  backdrop-filter: blur(6px);
}

.photo-dialog-shell {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.photo-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 20px clamp(18px, 3vw, 28px);
}

.photo-dialog-header h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.icon-button,
.gallery-nav {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(8, 24, 47, 0.68);
  color: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-color: var(--line);
  background: var(--mist);
  color: var(--blue-dark);
  font-size: 1.5rem;
}

.icon-button:hover,
.icon-button:focus-visible,
.gallery-nav:hover,
.gallery-nav:focus-visible {
  background: var(--yellow);
  color: var(--blue-dark);
  outline: none;
}

.gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(70vh, 640px);
  background: #061225;
}

.gallery-stage img {
  width: 100%;
  height: min(70vh, 640px);
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 2rem;
}

.gallery-nav.previous {
  left: 16px;
}

.gallery-nav.next {
  right: 16px;
}

.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 3vw, 28px) 20px;
}

.gallery-footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  max-width: min(520px, 100%);
  overflow-x: auto;
  padding-bottom: 2px;
}

.gallery-thumb {
  width: 76px;
  height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--steel);
  padding: 0;
  cursor: pointer;
}

.gallery-thumb.is-active,
.gallery-thumb:hover,
.gallery-thumb:focus-visible {
  border-color: var(--yellow);
  outline: none;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  background: #061225;
  color: rgba(255, 255, 255, 0.76);
  padding-block: 28px;
}

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

.footer-inner img {
  width: 126px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--yellow);
  font-weight: 900;
}

@media (max-width: 920px) {
  .header-inner {
    min-height: 78px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: 78px 20px auto 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .site-header.menu-open .site-nav {
    display: flex;
  }

  .site-nav a {
    justify-content: center;
  }

  .hero {
    min-height: 660px;
    height: auto;
    align-items: end;
  }

  .hero-image {
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: top center;
    opacity: 0.82;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(8, 24, 47, 0.12) 0%, rgba(8, 24, 47, 0.5) 34%, rgba(8, 24, 47, 0.84) 100%),
      linear-gradient(90deg, rgba(8, 24, 47, 0.58), rgba(8, 24, 47, 0.08));
  }

  .metrics-grid,
  .stock-grid,
  .service-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100% - 28px, 1160px);
  }

  .brand img {
    width: 132px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 14vw, 4.7rem);
  }

  .hero-content {
    padding-block: clamp(120px, 24vw, 230px) 54px;
  }

  .hero-actions,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .filter-chip {
    width: 100%;
  }

  .metrics-grid,
  .stock-grid,
  .service-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .metrics article,
  .metrics article:last-child {
    border-inline: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .metrics article:first-child {
    border-top: 0;
  }

  .lead-form .button {
    width: 100%;
  }

  .photo-dialog {
    width: calc(100% - 18px);
  }

  .photo-dialog-header,
  .gallery-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-stage,
  .gallery-stage img {
    min-height: 360px;
    height: 56vh;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav.previous {
    left: 10px;
  }

  .gallery-nav.next {
    right: 10px;
  }

  .gallery-thumbs {
    max-width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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