:root {
  --ink: #121b22;
  --muted: #64717d;
  --line: #d9e0e5;
  --paper: #f5f7f8;
  --white: #ffffff;
  --steel: #2e3f4b;
  --blue: #0f6fb7;
  --red: #c5272d;
  --shadow: 0 18px 48px rgba(18, 27, 34, 0.14);
  --font-xs: 0.72rem;
  --font-sm: 0.86rem;
  --font-base: 0.95rem;
  --font-md: 1rem;
  --font-lg: 1.08rem;
  --font-h3: clamp(1.08rem, 1.1vw, 1.28rem);
  --font-h2: clamp(1.55rem, 2.25vw, 2.18rem);
  --font-page-title: clamp(1.85rem, 3vw, 2.75rem);
  --font-hero-title: clamp(3.1rem, 6vw, 5.4rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(245, 247, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 154px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--steel);
  font-size: var(--font-sm);
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a.is-current::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.hero {
  position: relative;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: end;
  padding: clamp(48px, 7vw, 86px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(18, 27, 34, 0.93) 0%, rgba(18, 27, 34, 0.7) 48%, rgba(18, 27, 34, 0.12) 100%),
    linear-gradient(0deg, rgba(18, 27, 34, 0.76), transparent 48%);
}

.hero-media {
  position: absolute;
  inset: 0;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: min(750px, 100%);
}

.hero-panel {
  align-self: end;
  padding: 18px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.hero-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
}

.hero-panel span {
  color: #dce6ee;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: var(--font-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.applications .section-kicker {
  color: #ff767b;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: var(--font-page-title);
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: var(--font-h2);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: var(--font-h3);
  line-height: 1.16;
}

p {
  font-size: var(--font-base);
}

.hero h1 {
  font-size: var(--font-hero-title);
  line-height: 0.9;
}

.hero p {
  max-width: 590px;
  color: #e7eef3;
  font-size: var(--font-lg);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: var(--font-sm);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button.primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 12px 28px rgba(197, 39, 45, 0.24);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.54);
}

.button.dark {
  background: var(--ink);
}

.text-link {
  display: inline-flex;
  width: fit-content;
  color: var(--blue);
  font-size: var(--font-sm);
  font-weight: 900;
}

.text-link::after {
  content: ">";
  margin-left: 8px;
  transition: transform 160ms ease;
}

.text-link:hover::after {
  transform: translateX(4px);
}

.section {
  padding: clamp(50px, 7vw, 82px) clamp(18px, 4vw, 56px);
}

.section-heading {
  width: min(780px, 100%);
  margin-bottom: 28px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 6vw, 84px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.intro p:last-child,
.project-copy p,
.contact-section p,
.tab-panel p,
.detail-copy p {
  color: var(--muted);
  font-size: var(--font-md);
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #e9eef2;
}

.metric {
  min-height: 108px;
  padding: 20px clamp(18px, 4vw, 36px);
  border-right: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin-bottom: 16px;
  color: var(--red);
  font-size: var(--font-h3);
}

.metric span {
  font-size: var(--font-base);
  font-weight: 900;
}

.tabs {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(18, 27, 34, 0.05);
  overflow: hidden;
}

.tab-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #e9eef2;
}

.tab-button {
  min-height: 56px;
  padding: 0 16px;
  color: var(--steel);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font: inherit;
  font-size: var(--font-base);
  font-weight: 900;
  cursor: pointer;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button.is-active {
  color: var(--white);
  background: var(--steel);
}

.tab-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(22px, 3.5vw, 34px);
  animation: panelIn 220ms ease;
}

.tab-panel.is-active {
  display: grid;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  min-height: 214px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(18, 27, 34, 0.05);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.service-index {
  display: block;
  margin-bottom: 42px;
  color: var(--blue);
  font-weight: 900;
}

.service-card p {
  color: var(--muted);
  font-size: var(--font-base);
}

.cylinder-gallery {
  background: #eef2f5;
}

.power-unit-gallery {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
}

.units-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-card {
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(18, 27, 34, 0.05);
}

.gallery-card.large {
  grid-row: span 2;
}

.gallery-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  background: #ffffff;
  transition: transform 420ms ease;
}

.gallery-card.large img {
  height: 488px;
  object-fit: contain;
  padding: 18px;
}

.gallery-card:hover img {
  transform: scale(1.025);
}

.gallery-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: 700;
}

.applications {
  color: var(--white);
  background: var(--steel);
}

.application-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.application-list div {
  min-height: 82px;
  display: flex;
  align-items: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  font-size: var(--font-base);
  font-weight: 800;
  transition: background 180ms ease;
}

.application-list div:hover {
  background: rgba(255, 255, 255, 0.16);
}

.project-feature,
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  background: var(--white);
}

.project-image {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.project-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-image:hover img {
  transform: scale(1.035);
}

.project-copy ul,
.detail-copy ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.project-copy li,
.detail-copy li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.detail-page .site-header {
  position: sticky;
}

.detail-copy {
  max-width: 680px;
}

.detail-copy h1 {
  max-width: 620px;
  text-wrap: balance;
}

.detail-hero {
  min-height: auto;
  padding: clamp(46px, 6vw, 70px) clamp(18px, 4vw, 56px);
}

.detail-hero .project-image {
  align-self: stretch;
}

.detail-hero .project-image img {
  height: 100%;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(42px, 6vw, 64px) clamp(18px, 4vw, 56px);
}

.detail-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-card h2 {
  font-size: var(--font-h3);
}

.detail-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--font-base);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(42px, 6vw, 64px) clamp(18px, 4vw, 56px);
  background: #e9eef2;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 760px;
}

.contact-section p {
  max-width: 720px;
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 56px);
  color: #dce4eb;
  background: var(--ink);
}

.site-footer img {
  width: 124px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.site-footer p {
  margin: 0;
  color: #b8c3cc;
  font-size: var(--font-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  :root {
    --font-hero-title: clamp(2.9rem, 9vw, 4.6rem);
    --font-page-title: clamp(1.75rem, 5.5vw, 2.55rem);
    --font-h2: clamp(1.45rem, 4.5vw, 2rem);
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 75px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 10px;
  }

  .hero,
  .intro,
  .project-feature,
  .detail-hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .detail-copy,
  .detail-copy h1 {
    max-width: 760px;
  }

  .hero-panel {
    width: min(460px, 100%);
  }

  .metric-band,
  .service-grid,
  .application-list,
  .gallery-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card.large {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --font-xs: 0.68rem;
    --font-sm: 0.82rem;
    --font-base: 0.92rem;
    --font-md: 0.96rem;
    --font-lg: 1rem;
    --font-page-title: clamp(1.72rem, 8.5vw, 2.35rem);
    --font-hero-title: clamp(2.75rem, 13vw, 4rem);
    --font-h2: clamp(1.35rem, 6.4vw, 1.85rem);
    --font-h3: clamp(1.05rem, 4.8vw, 1.22rem);
  }

  .site-header {
    min-height: 68px;
  }

  .brand img {
    width: 132px;
  }

  .main-nav {
    top: 68px;
  }

  .hero {
    min-height: 540px;
    padding-top: 38px;
  }

  .detail-hero {
    padding-top: 34px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .metric-band,
  .service-grid,
  .application-list,
  .gallery-grid,
  .detail-grid,
  .tab-buttons,
  .tab-panel {
    grid-template-columns: 1fr;
  }

  .gallery-card.large {
    grid-column: auto;
  }

  .gallery-card.large img,
  .gallery-card img {
    height: 260px;
  }

  .metric {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tab-button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-card {
    min-height: auto;
  }

  .service-index {
    margin-bottom: 26px;
  }

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

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