/* ==========================================================================
   Zebussi — main stylesheet
   Palette: cool chalk paper, graphite ink, steel grey, brass accent.
   Type: Jost (headings), IBM Plex Sans (body).
   ========================================================================== */

:root {
  --paper: #f3f4f2;
  --surface: #ffffff;
  --ink: #1d2125;
  --steel: #59636b;
  --rule: #d3d8da;
  --brass: #94652a;
  --brass-soft: #c9a46a;
  --ink-on-dark: #e8ebea;
  --steel-on-dark: #a3acb2;

  --font-head: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 4px;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500;
  text-decoration: none; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--brass); }

.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--surface); }

.btn-light { background: var(--ink-on-dark); color: var(--ink); }
.btn-light:hover { background: var(--brass-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--brass); }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 244, 242, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}

.brand img { width: 150px; height: auto; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 32px; }

.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 28px;
}
.nav-list a {
  text-decoration: none; font-size: .9375rem; color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--brass); }

.nav-aside { display: flex; align-items: center; gap: 20px; }

.lang-switch { display: flex; gap: 2px; font-size: .875rem; }
.lang-switch a {
  text-decoration: none; color: var(--steel);
  padding: 6px 8px; border-radius: var(--radius);
}
.lang-switch a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang-switch a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 22px; height: 1.5px; background: currentColor;
  margin: 0 auto; position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a {
    display: block; padding: 14px 0; font-size: 1.125rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav-list a:hover { border-bottom-color: var(--rule); color: var(--brass); }
  .nav-aside { justify-content: space-between; padding-top: 20px; }
}

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

.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(2.375rem, 3.9vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; }

.hero .lead {
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--steel);
  max-width: 34em;
}

.hero .btn-row { margin-top: 36px; }

.hero-drawing {
  margin: 0;
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--paper) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--rule);
  padding: clamp(12px, 2vw, 24px);
}

/* Technical drawing */
.dwg { width: 100%; height: auto; overflow: visible; }
.dwg text { font-family: var(--font-head); font-size: 13px; fill: var(--brass); }
.dwg-part { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.dwg-thin { stroke-width: .8; }
.dwg-section { fill: url(#hatch); }
.dwg-hatch-line { stroke: var(--steel); stroke-width: .7; opacity: .55; }
.dwg-center { stroke: var(--steel); stroke-width: .8; stroke-dasharray: 18 4 3 4; }
.dwg-hidden { stroke: var(--steel); stroke-width: .8; stroke-dasharray: 5 4; }
.dwg-dim, .dwg-ext { fill: none; stroke: var(--brass); stroke-width: .8; }
.dwg-ext { opacity: .7; }
.dwg-arrow { fill: var(--brass); }
.dwg-titleblock rect, .dwg-titleblock line { fill: none; stroke: var(--ink); stroke-width: .8; }
.dwg-titleblock text { fill: var(--ink); font-size: 11.5px; }

/* One orchestrated moment: the drawing is drawn on page load. */
@media (prefers-reduced-motion: no-preference) {
  .js .dwg .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dwg-draw 1.6s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
  .js .dwg .dwg-section,
  .js .dwg .dwg-hidden,
  .js .dwg .dwg-dims,
  .js .dwg .dwg-titleblock { opacity: 0; animation: dwg-fade .6s ease forwards; }
  .js .dwg .dwg-section { animation-delay: 1.1s; }
  .js .dwg .dwg-hidden { animation-delay: 1.3s; }
  .js .dwg .dwg-dims { animation-delay: 1.5s; }
  .js .dwg .dwg-titleblock { animation-delay: 1.8s; }
}
@keyframes dwg-draw { to { stroke-dashoffset: 0; } }
@keyframes dwg-fade { to { opacity: 1; } }

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

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

.section { padding-block: var(--section-y); }

.section h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.015em;
}

.section h3 {
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 40px;
}

.section-lead { color: var(--steel); max-width: 40em; margin: -16px 0 40px; }

/* Positioning */
.intro { background: var(--surface); border-block: 1px solid var(--rule); }

.intro-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.intro-head h2 { max-width: 14ch; }
.intro-head p { color: var(--steel); font-size: 1.125rem; max-width: 36em; }

.points {
  list-style: none; padding: 0; margin: clamp(48px, 6vw, 80px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.points li { padding: 28px 32px 0 0; }
.points li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.points p { margin-top: 10px; color: var(--steel); }

@media (max-width: 860px) {
  .intro-head { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .points li, .points li + li { padding: 24px 0; border-left: 0; }
  .points li + li { border-top: 1px solid var(--rule); }
}

/* Services */
.service-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.service {
  padding: 36px 40px 40px 0;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.service:nth-child(even) { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--rule); }
.service p { color: var(--steel); max-width: 30em; }
.service .text-link { margin-top: auto; padding-top: 8px; }

@media (max-width: 700px) {
  .service-grid { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding: 28px 0 32px; border-left: 0; }
}

/* Workshop (dark band) */
.workshop { background: var(--ink); color: var(--ink-on-dark); }
.workshop-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.workshop-copy p { margin: 24px 0 36px; color: var(--steel-on-dark); font-size: 1.125rem; max-width: 30em; }

.spec-list { margin: 0; border-top: 1px solid var(--brass-soft); }
.spec-list div {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 24px;
  padding: 18px 0; border-bottom: 1px solid rgba(232, 235, 234, .16);
}
.spec-list dt { font-family: var(--font-head); color: var(--brass-soft); font-size: 1.0625rem; }
.spec-list dd { margin: 0; }

@media (max-width: 860px) {
  .workshop-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .spec-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* Products */
.product-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0 48px;
}
.product {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px;
  padding: 28px 0; border-top: 1px solid var(--rule);
}
.product p { margin-top: 6px; color: var(--steel); }
.product-ask { grid-template-columns: minmax(0, 1fr); }
.product-ask .text-link { display: inline-block; margin-top: 14px; }

.icon {
  width: 44px; height: 44px;
  fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 400px) {
  .product-list { grid-template-columns: 1fr; }
}

/* Process (a real sequence, so it is numbered) */
.process { background: var(--surface); border-block: 1px solid var(--rule); }
.process h2 { margin-bottom: 48px; }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.steps li { counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-head); font-size: 1rem; color: var(--brass);
  width: 36px; height: 36px; border: 1px solid var(--brass); border-radius: 50%;
  display: grid; place-items: center;
}
.steps li::after {
  content: ""; position: absolute; top: 18px; left: 48px; right: -20px;
  border-top: 1px solid var(--rule);
}
.steps li:last-child::after { display: none; }
.steps p { margin-top: 10px; color: var(--steel); }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 32px 60px; }
  .steps li::after { top: 44px; bottom: 8px; left: 18px; right: auto; border-top: 0; border-left: 1px solid var(--rule); }
}

/* CTA */
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta h2 { max-width: 18ch; }
.cta p { margin-top: 14px; color: var(--steel); }

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

.site-footer { background: var(--surface); border-top: 1px solid var(--rule); padding-top: 64px; font-size: .9375rem; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px;
}
.footer-brand img { width: 140px; height: auto; }
.footer-brand p { margin-top: 16px; color: var(--steel); max-width: 22em; }
.footer-title {
  font-family: var(--font-head); font-size: 1rem; font-weight: 500;
  margin-bottom: 14px;
}
.site-footer address { font-style: normal; color: var(--steel); line-height: 1.8; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--brass); }
.footer-links { list-style: none; margin: 0; padding: 0; line-height: 2; }
.legal { color: var(--steel); line-height: 1.8; margin-bottom: 10px; }
.todo { color: var(--brass); }
.footer-bottom {
  margin-top: 56px; padding-block: 24px;
  border-top: 1px solid var(--rule); color: var(--steel); font-size: .875rem;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Inner pages ---------- */

.page-hero { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.page-hero h1 {
  font-weight: 300;
  font-size: clamp(2.375rem, 4.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.page-hero .lead {
  margin-top: 24px; max-width: 36em;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); color: var(--steel);
}

.prose p { color: var(--steel); font-size: 1.125rem; max-width: 36em; }
.prose p + p { margin-top: 1em; }

.workshop .todo { color: var(--brass-soft); }

/* Services page rows */
.service-rows-section { background: var(--surface); border-block: 1px solid var(--rule); }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 96px;
}
.service-row:first-child { border-top: 1px solid var(--ink); }
.service-row-body > p { color: var(--steel); font-size: 1.125rem; max-width: 36em; }
.service-row-body .text-link { display: inline-block; margin-top: 24px; }

.checklist { list-style: none; margin: 24px 0 0; padding: 0; }
.checklist li {
  position: relative; padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--rule);
}
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 19px;
  width: 12px; height: 6px;
  border-left: 1.5px solid var(--brass); border-bottom: 1.5px solid var(--brass);
  transform: rotate(-45deg);
}

@media (max-width: 860px) {
  .service-row { grid-template-columns: 1fr; gap: 16px; }
}

/* Products page rows */
.product-row-head { display: flex; align-items: flex-start; gap: 20px; }
.product-row-head .icon { flex: none; width: 48px; height: 48px; margin-top: 2px; }

.tag-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  padding: 6px 14px; font-size: .9375rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper);
}

/* Contact page */
.contact-section { background: var(--surface); border-block: 1px solid var(--rule); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .9375rem; font-weight: 500; }
.req { color: var(--brass); }

.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; min-height: 160px; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); background-color: var(--surface);
}
.field [aria-invalid="true"] { border-color: #b3261e; }
.field ::placeholder { color: #8a9399; }

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

.form-note { font-size: .9375rem; color: var(--steel); max-width: 40em; }
.form-note a { color: var(--ink); }

.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { font-size: .9375rem; color: var(--steel); }
.form-status.is-success { color: #2e6b3c; }
.form-status.is-error { color: #b3261e; }

.contact-details dl { margin: 0; border-top: 1px solid var(--ink); }
.contact-details dl > div { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.contact-details dt { font-family: var(--font-head); font-size: 1rem; font-weight: 500; margin-bottom: 6px; }
.contact-details dd { margin: 0; color: var(--steel); line-height: 1.7; }
.contact-details dd a { color: var(--ink); }
.contact-details .text-link { display: inline-block; margin-top: 8px; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Legal text */
.legal-section { background: var(--surface); border-top: 1px solid var(--rule); }
.legal-text { max-width: 44em; }
.legal-text h2 {
  font-size: 1.375rem; font-weight: 500; letter-spacing: 0;
  margin: 48px 0 14px;
}
.legal-text h2:first-child { margin-top: 0; }
.legal-text p, .legal-text li { color: var(--steel); }
.legal-text p + p { margin-top: 1em; }
.legal-text ul { margin: 0; padding-left: 1.25em; }
.legal-text li { margin: 6px 0; }
.legal-text strong { color: var(--ink); font-weight: 500; }
.legal-text a { color: var(--ink); }
.legal-updated { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: .9375rem; }
