:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --surface: #121418;
  --text: #f4f4f1;
  --muted: #a4a9b0;
  --yellow: #e8bd3f;
  --line: rgba(255,255,255,.11);
  --max: 1440px;
  --header-height: 64px;
}

* { box-sizing: border-box; }

html {
  min-width: 300px;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(255,255,255,.018) 50%, transparent calc(50% + 1px)),
    linear-gradient(145deg, #090a0c 0%, #101216 58%, #08090b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 5px; }

.circuit {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  min-height: var(--header-height);
  margin: 0 auto;
  padding-inline: clamp(42px, 8vw, 160px);
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(7,8,10,.91);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-machines {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: url("header-machinery-panorama.webp");
  background-repeat: no-repeat;
  background-position: center 61%;
  background-size: cover;
  opacity: .23;
  pointer-events: none;
  filter: saturate(.62) contrast(.82) brightness(.82) blur(.35px);
  transform: scale(1.02);
  animation: header-haze 18s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 72%, transparent 100%);
}

@keyframes header-haze {
  from { opacity: .19; transform: scale(1.02) translateX(-.2%); }
  to { opacity: .26; transform: scale(1.035) translateX(.2%); }
}

.header-machines::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,8,10,.68), rgba(235,239,242,.08) 28%, rgba(7,8,10,.2) 58%, rgba(7,8,10,.62)),
    radial-gradient(ellipse at 50% 55%, rgba(235,239,242,.15), transparent 68%);
}

.brand-mini {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: var(--header-height);
  text-decoration: none;
}

.brand-mini::before {
  content: "";
  position: absolute;
  inset: 8px 3px;
  border-radius: 50%;
  background: rgba(245,245,241,.43);
  filter: blur(8px);
}

.brand-mini img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.78));
}

h1 b { color: var(--yellow); }

nav {
  position: relative;
  z-index: 2;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  gap: clamp(.65rem, 1.5vw, 1.45rem);
}

nav a {
  position: relative;
  padding: .65rem .42rem;
  color: #c9ccd1;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  isolation: isolate;
  text-shadow: 0 1px 12px rgba(0,0,0,.7);
  transition: color .25s ease, text-shadow .25s ease, transform .2s ease;
}

nav a::before,
nav a::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}

nav a::before {
  top: 3px;
  left: -2px;
  border-top: 1px solid var(--yellow);
  border-left: 1px solid var(--yellow);
  transform: translate(4px, 4px);
}

nav a::after {
  right: -2px;
  bottom: 3px;
  border-right: 1px solid var(--yellow);
  border-bottom: 1px solid var(--yellow);
  transform: translate(-4px, -4px);
}

nav a:hover {
  color: #fff;
}

nav a.active {
  color: #ffe177;
  text-shadow: 0 0 12px rgba(232,189,63,.32), 0 1px 12px rgba(0,0,0,.72);
}

nav a.active::before,
nav a.active::after {
  opacity: .9;
  transform: translate(0, 0);
}

nav a.nav-pulse {
  animation: nav-press .62s cubic-bezier(.2,.8,.2,1);
}

nav a.nav-pulse::before,
nav a.nav-pulse::after {
  animation: corner-flash .62s cubic-bezier(.2,.8,.2,1);
}

@keyframes nav-press {
  0% { transform: scale(1); }
  28% { transform: scale(.91); color: #fff4bf; text-shadow: 0 0 18px rgba(232,189,63,.82); }
  58% { transform: scale(1.07); color: #ffe177; text-shadow: 0 0 24px rgba(232,189,63,.7); }
  100% { transform: scale(1); }
}

@keyframes corner-flash {
  0% { opacity: 0; filter: drop-shadow(0 0 0 rgba(232,189,63,0)); }
  35% { opacity: 1; filter: drop-shadow(0 0 8px rgba(232,189,63,.95)); }
  100% { opacity: .9; filter: drop-shadow(0 0 2px rgba(232,189,63,.45)); }
}

main { position: relative; z-index: 1; }

.section-anchor {
  position: relative;
  scroll-margin-top: 0;
}

.section-anchor::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 18%;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--yellow) 40%, #fff0a8 58%, transparent);
  filter: drop-shadow(0 0 7px rgba(232,189,63,.9));
  transform: translateX(-120%);
}

.section-anchor.is-energized::before {
  animation: section-current .95s cubic-bezier(.22,.72,.2,1);
}

@keyframes section-current {
  0% { opacity: 0; transform: translateX(-120%); }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translateX(650%); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .62s cubic-bezier(.2,.7,.2,1),
    transform .62s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

.page-enter { animation: page-in .48s ease-out both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.about-hero {
  width: min(var(--max), calc(100% - 64px));
  min-height: calc(100svh - var(--header-height));
  margin: 0 auto;
  padding: clamp(1.5rem, 3.5vh, 2.75rem) 0;
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
}

.about-copy {
  display: block;
}

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--yellow);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .18em;
}

.about-copy h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: clamp(3.45rem, 5vw, 5.5rem);
  line-height: .84;
  letter-spacing: -.055em;
  font-weight: 950;
}

.about-copy h1 span { margin-left: 0; }

.lead {
  max-width: 760px;
  margin: 1.55rem 0 0;
  font-size: clamp(1.12rem, 1.45vw, 1.42rem);
  line-height: 1.35;
  font-weight: 700;
}

.about-text {
  max-width: 640px;
  margin-top: 1.25rem;
  display: grid;
  gap: .62rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.48;
}

.about-text p, .service-copy p { margin: 0; }

.machine-grid {
  min-width: 0;
  height: clamp(360px, 58vh, 610px);
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.machine-card {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  background: #17191d;
}

.machine-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.78) contrast(1.07) brightness(.86);
  transition: transform .7s ease, filter .7s ease;
}

.machine-card.agriculture img,
.machine-card.forestry img,
.machine-card.construction img { object-position: center; }

.machine-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5,6,7,.9) 100%);
  pointer-events: none;
}

.machine-card figcaption {
  position: absolute;
  z-index: 1;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.2rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255,255,255,.32);
  color: #fff;
  font-size: clamp(.74rem, .9vw, .9rem);
  font-weight: 850;
  letter-spacing: .12em;
}

.machine-card:hover img { transform: scale(1.025); filter: saturate(.9) contrast(1.05) brightness(.92); }

.inner-page {
  width: min(var(--max), calc(100% - 64px));
  min-height: calc(100svh - var(--header-height));
  margin: 0 auto;
  padding: clamp(4rem, 8vh, 7rem) 0;
}

.service-section {
  padding: clamp(3rem, 6vh, 5rem) 0;
  display: grid;
  align-items: center;
  border-top: 1px solid var(--line);
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(400px, .92fr) minmax(520px, 1.08fr);
  grid-template-rows: auto auto;
  gap: 1.7rem clamp(3rem, 5vw, 5.5rem);
  align-items: start;
}

.service-copy h2 {
  margin: 0 0 1.35rem;
  font-size: clamp(3.1rem, 4.8vw, 5.2rem);
  line-height: .88;
  letter-spacing: -.055em;
}

.contact-layout h2 {
  margin: 0 0 2rem;
  font-size: clamp(3.25rem, 6.2vw, 6.7rem);
  line-height: .88;
  letter-spacing: -.06em;
}

.service-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.service-copy > .lead { color: var(--text) !important; font-size: 1.45rem !important; line-height: 1.35 !important; }

.work-photo {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  width: min(100%, 500px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #16191d;
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
}

.work-photo img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  filter: saturate(.84) contrast(1.06);
  transition: transform 8s ease;
}

.work-photo:hover img { transform: scale(1.035); }

.price-strip {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  padding: 1.35rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  border-top: 1px solid var(--line);
}

.price-strip > .eyebrow { grid-column: 1 / -1; margin-bottom: .2rem; }
.price-line {
  min-height: 72px;
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  border-left: 2px solid var(--yellow);
  background: rgba(255,255,255,.025);
}
.price-icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
}

.price-icon-suv {
  width: 42px;
}
.price-line strong { font-size: .96rem; line-height: 1.45; }
.price-line em { color: var(--yellow); font-style: normal; white-space: nowrap; }
.price-note { grid-column: 1 / -1; margin: .25rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.contact-layout {
  min-height: calc(100svh - var(--header-height) - 8rem);
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(3rem, 8vw, 10rem);
  align-items: center;
}

.contact-section {
  display: grid;
  align-items: center;
  border-top: 1px solid var(--line);
}

.contact-heading { align-self: center; }

.work-hours {
  width: min(100%, 390px);
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.work-hours-title {
  margin: 0;
  padding: 1rem 0 .75rem;
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.hours-row {
  padding: .85rem 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.hours-row span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.hours-row strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.emergency-hours strong { color: var(--yellow); }

.contact-list { border-top: 1px solid var(--line); }

.contact-list > * {
  position: relative;
  min-height: 128px;
  padding: 1.7rem 3.2rem 1.7rem 0;
  display: grid;
  grid-template-columns: minmax(110px, .35fr) 1fr;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color .2s ease, padding-left .25s ease;
}

.contact-list a:hover { color: var(--yellow); }
.contact-list span { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .15em; }
.contact-list strong { font-size: clamp(1.15rem, 2vw, 2rem); overflow-wrap: anywhere; }
.contact-list i { position: absolute; right: .4rem; font-size: 1.6rem; font-style: normal; }

.phone-details { min-width: 0; }

.email-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
}

.email-address {
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.gmail-link {
  display: inline-flex;
  border-radius: 10px;
  text-decoration: none;
}

.gmail-icon {
  width: 46px;
  height: 46px;
  padding: .5rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  object-fit: contain;
  transition: border-color .2s ease, transform .2s ease;
}

.gmail-link:hover .gmail-icon {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.phone-number {
  display: inline-block;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.message-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.message-links a {
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: #d9dadd;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.message-links img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
  border-radius: 7px;
}

.message-links a:hover {
  border-color: var(--yellow);
  background: rgba(232,189,63,.09);
  transform: translateY(-2px);
}

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 70px 1fr; }
  .service-layout, .contact-layout { grid-template-columns: 1fr; }
  .service-copy { grid-column: 1; grid-row: 1; }
  .price-strip { grid-column: 1; grid-row: 2; grid-template-columns: 1fr 1fr; }
  .price-strip > .eyebrow, .price-note { grid-column: 1 / -1; }
  .work-photo { grid-column: 1; grid-row: 3; }
  .work-photo img { height: auto; min-height: 0; }
  .contact-layout { align-content: center; gap: 1rem; }
}

@media (max-width: 850px) {
  .about-hero {
    min-height: auto;
    padding: 3rem 0;
    grid-template-columns: 1fr;
  }

  .machine-grid {
    height: min(54vw, 430px);
    margin-top: .8rem;
  }
}

@media (max-width: 680px) {
  :root { --header-height: 60px; }
  .about-hero, .inner-page { width: min(100% - 32px, var(--max)); }
  .site-header { width: 100%; min-height: var(--header-height); padding-inline: 16px; grid-template-columns: 42px 1fr; }
  nav { justify-content: flex-end; gap: .3rem; }
  nav a { padding: .52rem .28rem; font-size: .59rem; letter-spacing: .045em; }
  .brand-mini { width: 28px; height: var(--header-height); }
  .brand-mini::before { inset: 9px 0; }
  .brand-mini img { height: 52px; }
  .about-hero { min-height: auto; padding: 3.4rem 0 2rem; }
  .about-copy h1 { font-size: clamp(3.2rem, 18vw, 5.6rem); }
  .lead { margin-top: 1.5rem; }
  .machine-grid { height: auto; grid-template-columns: 1fr; gap: 8px; }
  .machine-card { height: min(72vw, 430px); }
  .inner-page { padding: 3.4rem 0; }
  .service-copy h2, .contact-layout h2 { font-size: clamp(3rem, 14vw, 5.3rem); }
  .work-photo { border-radius: 2px; }
  .work-photo img { height: auto; min-height: 0; }
  .price-strip { grid-template-columns: 1fr; }
  .price-strip > .eyebrow, .price-note { grid-column: auto; }
  .contact-list > * { min-height: 104px; grid-template-columns: 1fr; gap: .55rem; }
  .message-links { margin-top: .8rem; gap: .5rem; }
  .message-links a { width: 48px; min-width: 48px; min-height: 48px; padding: .4rem; }
  .message-links img { width: 27px; height: 27px; flex-basis: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .circuit { display: none; }
  .reveal { opacity: 1; transform: none; }
}
