/* H.W. Machine LLC — site stylesheet
   Design tokens extracted from the live site's generated Elementor/Astra CSS. */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/roboto-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/roboto-slab-latin-400.woff2") format("woff2");
}

:root {
  --brand: #1bae70;
  --brand-dark: #14261c;
  --ink: #4e5652;
  --ink-strong: #14261c;
  --surface: #f4f6f4;
  --white: #ffffff;
  --black: #000000;
  --border: #e1e6e2;

  --font-heading: "Roboto", -apple-system, "Segoe UI", sans-serif;
  --font-subhead: "Roboto Slab", Georgia, serif;
  --font-body: "Roboto", -apple-system, "Segoe UI", sans-serif;

  --container: 1140px;
  --radius-pill: 100px;
  --shadow-card: 0 0 5px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: var(--brand);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 4.4rem);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.2rem);
}

h3 {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: 1.4rem;
}

p {
  margin: 0 0 1em;
  max-width: 65ch;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--white);
  background: var(--brand);
  border: 2px solid var(--brand);
  border-radius: var(--radius-pill);
  padding: 14px 30px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--surface);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  --nav-ink: var(--white);
  transition: background 0.25s, box-shadow 0.25s, padding 0.25s;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header .logo {
  display: block;
  width: 190px;
  height: 40px;
}

.site-header .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-header .logo .logo-dark {
  display: none;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  position: relative;
  display: inline-block;
  color: var(--nav-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 6px;
  transition: color 0.2s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--brand);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.main-nav a[aria-current="page"] {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
  stroke: var(--white);
}

/* Solid header once page has scrolled, or on non-hero pages */
.site-header.is-solid,
.site-header.no-hero {
  --nav-ink: var(--ink-strong);
  background: var(--white);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}

.site-header.is-solid .logo .logo-light,
.site-header.no-hero .logo .logo-light {
  display: none;
}

.site-header.is-solid .logo .logo-dark,
.site-header.no-hero .logo .logo-dark {
  display: block;
}

.site-header.is-solid .nav-toggle svg,
.site-header.no-hero .nav-toggle svg {
  stroke: var(--ink-strong);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.is-open {
    max-height: 320px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 20px;
  }

  .main-nav a {
    display: block;
    padding: 12px 0;
    color: var(--ink-strong);
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  padding: 160px 20px 80px;
  text-align: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 0.5;
  z-index: -1;
}

.hero-inner {
  max-width: 780px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.3em;
}

.hero p.lede {
  font-size: 1.15rem;
  margin: 0 auto 1.6em;
  max-width: 60ch;
}

.page-hero {
  background: var(--brand-dark);
  color: var(--white);
  text-align: center;
  padding: 170px 20px 60px;
}

.page-hero h1 {
  color: var(--white);
  margin: 0;
}

/* ---------- Sections ---------- */

section {
  padding: 70px 0;
}

section.tight {
  padding: 40px 0;
}

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

.section-dark {
  background: var(--brand-dark);
  color: var(--surface);
}

.section-dark h2 {
  color: var(--white);
}

.eyebrow {
  display: block;
  font-family: var(--font-subhead);
  color: var(--brand);
  font-size: 0.95rem;
  margin-bottom: 0.4em;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5em;
}

.section-head p {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Grid layouts ---------- */

.grid {
  display: grid;
  gap: 40px;
}

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

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

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

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.align-center {
  align-items: center;
}

/* ---------- Cards ---------- */

.feature {
  display: flex;
  gap: 18px;
}

.feature-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--brand);
}

.industry-card,
.machine-card {
  text-align: center;
}

.industry-card img,
.machine-card img {
  border-radius: 6px;
  margin-bottom: 1em;
  box-shadow: var(--shadow-card);
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 3rem;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 0.4em;
  color: var(--ink);
}

img.framed {
  border-radius: 6px;
  box-shadow: var(--shadow-card);
}

hr.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* ---------- Contact / icon list ---------- */

.contact-list {
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-list svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--brand);
}

.contact-list a {
  color: var(--ink-strong);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--brand);
}

.map-frame {
  border: 0;
  width: 100%;
  height: 380px;
  border-radius: 6px;
}

/* ---------- Video facade ---------- */

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  background: var(--brand-dark);
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.video-facade:hover img {
  opacity: 1;
}

.video-facade .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-facade .play svg {
  width: 64px;
  height: 64px;
  fill: var(--white);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid.two-col .full {
    grid-column: 1 / -1;
  }
}

label {
  display: block;
  font-weight: 500;
  color: var(--ink-strong);
  margin-bottom: 0.4em;
}

input,
textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink-strong);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 1em;
  font-size: 0.9rem;
  color: var(--ink);
}

.form-error {
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: #8a2c26;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 1.4em;
}

/* ---------- CTA band ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--brand-dark);
  color: var(--white);
  padding: 50px;
  border-radius: 10px;
}

.cta-band h2 {
  color: var(--white);
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-strong);
  color: #b9c2bd;
  padding: 30px 0;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.site-footer a {
  color: #b9c2bd;
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}
