:root {
  --bg: #0f1115;
  --bg-alt: #161a21;
  --surface: #1c222b;
  --text: #e8ecf1;
  --text-muted: #a2acba;
  --accent: #c0392b;
  --accent-hover: #e04b39;
  --border: #2a313c;
  --max-width: 1140px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  background: #000;
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

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

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

/* Fixed machine.jpg — stays still; page scrolls over it */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/machine.jpg") center/cover no-repeat;
  pointer-events: none;
}
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #2b2b2b;
}
.main-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
}
.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8d8d8;
  transition: color 0.2s;
}
.main-nav a:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #d8d8d8;
  transition: 0.25s;
}

/* Hero — transparent so fixed machine shows through */
.hero {
  position: relative;
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.hero-content {
  text-align: center;
  padding: 72px 24px;
  max-width: 900px;
}
.hero h1 {
  font-family: "Iceland", cursive;
  font-size: 81px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: #2a2a2a;
  margin: 0 0 14px;
  line-height: 1.1;
}
.hero-tagline {
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  color: #2a2a2a;
  font-size: 19px;
  font-weight: 300;
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 48px; }
  .hero-tagline { font-size: 14px; letter-spacing: 0.12em; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-muted); background: rgba(255,255,255,0.04); }

/* Sections — opaque layers that scroll over the fixed machine */
.section {
  position: relative;
  z-index: 2;
  padding: 84px 0;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 14px;
  border-radius: 0;
}
.section-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 0 40px;
}

/* Services */
#services {
  background: #0a0a0a url("assets/hero-bg.jpg") center/cover no-repeat;
  background-attachment: fixed;
}
#services .section-title,
#services .section-lead {
  text-align: center;
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  font-weight: 300;
  text-transform: uppercase;
}
#services .section-title {
  letter-spacing: 0.14em;
}
#services .section-title::after {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin-left: auto;
  margin-right: auto;
  border-radius: 2px;
}
#services .section-lead {
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.19em;
  font-size: 0.95rem;
  line-height: 1.55;
}
.services-catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.services-group {
  padding: 36px 32px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.services-group:last-child { border-right: 0; }
.services-group-title {
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--accent);
  margin: 0 0 28px;
}
.services-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.services-group li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.services-group li:last-child { border-bottom: 0; }
.services-group li::before {
  content: "•";
  color: var(--text);
}

@media (max-width: 820px) {
  #services { background-attachment: scroll; }
  .services-catalog { grid-template-columns: 1fr; }
  .services-group {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 28px 0 12px;
  }
  .services-group:last-child { border-bottom: 0; }
}

/* Our Work — white panel scrolling over machine (matches screencast) */
#work {
  background: #fff;
  color: #2a2a2a;
  padding: 84px 0 0;
}
#work .section-title,
#work .section-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
#work .section-title {
  font-family: "Jost", "Futura Light", "Futura", "Helvetica Neue", sans-serif;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: #2a2a2a;
}
#work .section-title::after {
  width: 48px;
  height: 2px;
  background: #2a2a2a;
  margin: 18px auto 18px;
}
#work .section-lead {
  color: #555;
  font-size: 1rem;
  margin-bottom: 36px;
}
#work .container {
  max-width: none;
  padding: 0 20px 40px;
}

/* Gallery — flush 3-column grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

/* About */
.about-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.about-text .section-title::after { margin-left: auto; margin-right: auto; }
.about-text p { color: var(--text-muted); margin-bottom: 18px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
address { font-style: normal; color: var(--text-muted); margin-bottom: 24px; }
address a { color: var(--accent-hover); }

.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.form-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 14px; }
.form-sent {
  color: #7dcea0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.form-sent.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  background: #0b0d10;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: flex; }
  .main-nav ul {
    position: absolute;
    top: 52px;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #2b2b2b;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav ul.open { max-height: 360px; }
  .main-nav li { border-top: 1px solid #3a3a3a; }
  .main-nav a { display: block; padding: 16px 20px; text-align: center; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
}
