/* Bagerstroj – single page site */

:root {
  --yellow: #f5b800;
  --yellow-dark: #d39e00;
  --ink: #16181c;
  --ink-2: #22262c;
  --line: #e3e5e8;
  --text: #2a2e34;
  --muted: #5f6772;
  --bg: #ffffff;
  --bg-alt: #f4f5f6;
  --radius: 10px;
  --header-h: 68px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 1.2em;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.5rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow-dark);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
}

.btn-primary:hover {
  background: #ffcb1f;
}

.btn-ghost {
  border-color: #5a616b;
  color: #fff;
}

.btn-ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.3rem;
}

.logo-text span {
  color: var(--yellow);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  display: flex;
  gap: 1.5rem;
}

.site-nav ul a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.5rem 0;
}

.site-nav ul a:hover {
  color: var(--yellow);
}

.nav-cta {
  min-height: 42px;
  padding: 0.4rem 1rem;
  white-space: nowrap;
}

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

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 26px;
  height: 3px;
  margin-inline: auto;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s, background-color 0.2s;
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -8px;
}

.nav-toggle-bar::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  background: var(--ink);
  color: #d5d9df;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero h1 {
  color: #fff;
}

.hero .accent {
  color: var(--yellow);
}

.hero .eyebrow {
  color: var(--yellow);
}

.lead {
  max-width: 34rem;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

/* Fixed-size frame; the slideshow cross-fades stacked images inside it */
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 520px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 4px solid var(--yellow);
  background: var(--ink-2);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s;
}

.hero-photo img.is-active {
  opacity: 1;
}

.hazard {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 22px,
    var(--ink) 22px 44px
  );
}

/* Sections */

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

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

.section-dark {
  background: var(--ink-2);
  color: #c9ced5;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark .eyebrow {
  color: var(--yellow);
}

.intro {
  max-width: 48rem;
  margin: -0.8rem 0 2rem;
  font-size: 1.12rem;
}

/* FAQ */

.faq {
  max-width: 48rem;
  display: grid;
  gap: 0.7rem;
}

.faq details {
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--ink);
}

.faq summary {
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.faq details p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
}

.faq a {
  color: var(--yellow);
}

/* Service cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: #fff;
}

.card p,
.machine-body p {
  margin: 0;
  color: var(--muted);
}

/* Machines */

.machines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.machine {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.machine img,
.machine-badge {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.machine-badge {
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
  font-size: 3.5rem;
  font-weight: 800;
}

.machine-body {
  padding: 1.2rem 1.3rem 1.4rem;
  border-top: 4px solid var(--yellow);
}

.machine-body h3 {
  margin-bottom: 0.3em;
}

.machines .machine-body p {
  color: #aab1ba;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.gallery a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery a:hover img {
  transform: scale(1.04);
}

.gallery span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1rem 0.8rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-weight: 700;
}

/* Lightbox */

.lightbox {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 0.6em;
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.person {
  padding: 1.2rem 1.3rem;
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fff;
}

.person h3 {
  margin-bottom: 0.4em;
}

.person p {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.person .person-role {
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.person a {
  display: inline-block;
  padding-block: 0.25rem;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.area {
  margin: 1.6rem 0 0;
  color: var(--ink);
}

.company {
  margin-top: 0.8rem;
  font-style: normal;
  color: var(--muted);
}

.company strong {
  color: var(--ink);
}

.contact-form {
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.field {
  margin-bottom: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #b9bec6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

input:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--ink);
}

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

.contact-form .btn {
  width: 100%;
}

.form-note {
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.form-status {
  margin: 0.8rem 0 0;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status.is-ok {
  color: #1c7a3d;
}

.form-status.is-error {
  color: #b3261e;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: #aab1ba;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.6rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a:hover {
  color: var(--yellow);
}

/* Responsive */

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

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 1rem 1.4rem;
    background: var(--ink);
    border-top: 1px solid #2f343b;
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #2f343b;
  }

  .hero-inner,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-height: 380px;
  }
}

@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
