/* ------------------------------------------------------------------
   Zamoko – design tokens
------------------------------------------------------------------ */
:root {
  --bg: #0e0e0f;
  --surface: #141416;
  --line: #2a2a2c;
  --line-strong: #3a3a3d;
  --text: #f4f4f4;
  --text-2: #9a9a9a;
  --text-3: #5c5c5e;
  --red: #c8232c;
  --red-hover: #e0303a;

  --font-head: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;

  --container: 1120px;
  --gutter: 24px;
  --header-h: 72px;
}
@media (min-width: 768px) {
  :root { --gutter: 48px; --header-h: 84px; }
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--red); color: #fff; padding: 8px 12px;
  font: 500 13px/1 var(--font-head); letter-spacing: .15em; text-transform: uppercase;
}
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------
   Typography helpers
------------------------------------------------------------------ */
.kicker {
  font: 400 13px/1.7 var(--font-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
}
.kicker--rule { position: relative; padding-left: 44px; }
.kicker--rule::before {
  content: ''; position: absolute; left: 0; top: .85em;
  width: 28px; height: 2px; background: var(--red);
}
@media (min-width: 768px) {
  .kicker--rule { padding-left: 88px; }
  .kicker--rule::before { width: 60px; }
}

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 28px;
  border: 1px solid transparent;
  font: 500 14px/1 var(--font-head);
  letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text-2); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 13px; }
.btn__arrow { font-family: var(--font-body); font-size: 18px; line-height: 1; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 15, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  font: 700 26px/1 var(--font-head); letter-spacing: .28em;
}
.brand__bar { width: 4px; height: 32px; background: var(--red); }
.site-nav { display: none; gap: 32px; }
.nav-link {
  font: 500 13px/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-2); padding: 8px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); border-bottom-color: var(--red); }
.site-header__right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; gap: 2px; font: 400 12px/1 var(--font-mono); letter-spacing: .1em; }
.lang-switch__item { padding: 7px 7px; color: var(--text-3); border: 1px solid transparent; transition: color .2s; }
.lang-switch__item:hover { color: var(--text-2); }
.lang-switch__item.is-active { color: var(--text); border-color: var(--line-strong); }
/* Brand + 3 languages + CTA do not fit narrow phones; the hero carries the primary CTA. */
@media (max-width: 479px) {
  .site-header__right .btn { display: none; }
}
@media (min-width: 768px) {
  .site-nav { display: flex; }
  .site-header__right { gap: 24px; }
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  padding: 56px 0 88px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 25% 35%, rgba(14, 14, 15, 0) 0%, var(--bg) 100%),
    linear-gradient(180deg, rgba(14, 14, 15, .2), var(--bg));
}
.hero .container { position: relative; }
.hero__title {
  margin: 28px 0 40px;
  font: 700 clamp(52px, 17.5vw, 168px)/.92 var(--font-head); /* 17.5vw: longest line (9 chars, e.g. MACHINING) must fit 360px phones */
  text-transform: uppercase; letter-spacing: -.01em;
}
.hero__line { display: block; }
.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-3);
  paint-order: stroke fill;
}
.hero__text { max-width: 640px; font-size: 20px; color: var(--text-2); }
.hero__actions { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-top: 56px; }
@media (min-width: 768px) {
  .hero { padding: 120px 0 160px; }
  .hero__title { margin: 32px 0 48px; }
  .hero__actions { flex-direction: row; align-items: center; gap: 24px; }
}

/* Page hero (subpages) */
.hero--page { padding-bottom: 64px; }
.hero__title--page { font-size: clamp(44px, 9.5vw, 104px); margin-bottom: 32px; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 40px; }
.subnav__link {
  display: inline-flex; align-items: baseline; gap: 12px; padding: 8px 0;
  font: 500 14px/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--text-2);
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.subnav__link:hover { color: var(--text); border-bottom-color: var(--red); }
.subnav__num { font: 400 12px/1 var(--font-mono); letter-spacing: .1em; color: var(--red); }
@media (min-width: 768px) {
  .hero--page { padding: 96px 0 96px; }
  .hero__title--page { margin-bottom: 40px; }
  .subnav { gap: 8px 48px; margin-top: 48px; }
}

/* ------------------------------------------------------------------
   Sections
------------------------------------------------------------------ */
.section { padding: 80px 0; }
.section--tight { padding-top: 0; }
.section__lead { max-width: 640px; margin: -16px 0 40px; color: var(--text-2); }
.section__head {
  position: relative; padding-bottom: 32px; margin-bottom: 48px;
  border-bottom: 1px solid var(--text-2);
}
.section__title {
  margin-top: 12px;
  font: 700 clamp(40px, 6vw, 56px)/1 var(--font-head);
  text-transform: uppercase; color: var(--text-2);
}
.section__num {
  display: block; margin-top: 8px;
  font: 700 clamp(88px, 12vw, 120px)/1 var(--font-head);
  color: var(--text);
}
@media (min-width: 768px) {
  .section { padding: 120px 0; }
  .section--tight { padding-top: 0; }
  .section__lead { margin: -24px 0 48px; }
  .section__num { position: absolute; right: 0; top: -16px; margin: 0; }
}

.frame { border: 1px solid var(--text-2); background: var(--surface); }

/* Services */
.services { display: grid; grid-template-columns: 1fr; }
.service { padding: 48px var(--gutter); border-bottom: 1px solid var(--line); }
.service:last-child { border-bottom: 0; }
.icon {
  display: inline-flex; width: 56px; height: 56px;
  align-items: center; justify-content: center;
  border: 1px solid var(--text-2); color: var(--red);
}
.icon svg { width: 24px; height: 24px; }
.icon[class*="icon-"] svg { display: none; }
.icon.icon-mill5 .i-mill5, .icon.icon-mill3 .i-mill3, .icon.icon-lathe .i-lathe, .icon.icon-auto .i-auto { display: block; }
.service__index { margin-top: 32px; font: 400 12px/1 var(--font-mono); letter-spacing: .2em; color: var(--text-3); }
.service__name { margin-top: 16px; font: 500 30px/1.1 var(--font-head); text-transform: uppercase; color: var(--text); }
.service__text { margin-top: 16px; color: var(--text-2); }
.tags { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--text-2); }
.tag {
  padding: 28px var(--gutter); border-bottom: 1px solid var(--line);
  font: 500 15px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
}
.tag:last-child { border-bottom: 0; }
@media (min-width: 768px) {
  .services { grid-template-columns: 1fr 1fr; }
  .service:nth-child(odd) { border-right: 1px solid var(--line); }
  .service:nth-last-child(-n+2) { border-bottom: 0; }
  .tags { grid-template-columns: repeat(4, 1fr); }
  .tag { padding: 28px 12px; border-bottom: 0; border-right: 1px solid var(--line); text-align: center; white-space: nowrap; font-size: 14px; }
  .tag:last-child { border-right: 0; }
}

/* About */
.about { display: grid; grid-template-columns: 1fr; gap: 48px; }
.stat {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 320px; padding: 48px; text-align: center; overflow: hidden;
}
.stat__corner {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  border-top: 72px solid var(--red); border-right: 72px solid transparent;
}
.stat__value { font: 700 clamp(96px, 14vw, 140px)/1 var(--font-head); color: var(--red); }
.stat__label { margin-top: 12px; font: 400 13px/1 var(--font-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--text-2); }
.about__heading { font: 500 clamp(32px, 4.5vw, 44px)/1.15 var(--font-head); color: var(--text-2); }
.about__text { margin-top: 24px; color: var(--text-2); }
.bullets { margin-top: 32px; padding-left: 28px; }
.bullets li { position: relative; padding: 8px 0; color: var(--text-2); }
.bullets li::before {
  content: ''; position: absolute; left: -28px; top: 1.15em;
  width: 12px; height: 2px; background: var(--red);
}
@media (min-width: 768px) {
  .about { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .stat { min-height: 400px; }
}

/* Contact */
.contact { padding: 0 var(--gutter); }
.contact__row {
  display: grid; grid-template-columns: 56px 1fr; column-gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--text-2);
}
.contact__row:last-child { border-bottom: 0; }
.contact__row .icon { grid-row: 1 / span 2; }
.contact__row dt { font: 400 12px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); }
.contact__row dd { margin-top: 10px; font-size: 20px; color: var(--text-2); }
.contact__row dd a { transition: color .2s; }
.contact__row dd a:hover { color: var(--text); }
.contact__map { display: block; }
.contact__map:hover .contact__line:last-child { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.contact__line { display: block; }
@media (min-width: 768px) {
  .contact { padding: 0 48px; }
  .contact__row { padding: 40px 0; }
}

/* Gallery (portfolio) */
.gallery {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  border: 1px solid var(--text-2); background: var(--line);
}
.gallery__item { background: var(--surface); }
.gallery__link { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery__link img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, filter .3s;
}
.gallery__link:hover img { transform: scale(1.04); }
.gallery__zoom {
  position: absolute; right: 0; bottom: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font: 400 26px/1 var(--font-head);
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.gallery__link:hover .gallery__zoom, .gallery__link:focus-visible .gallery__zoom { opacity: 1; transform: none; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

/* Partner logos */
.logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
.logos__item {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 5 / 3; padding: 20px; background: #fff;
  filter: grayscale(1); opacity: .72; transition: filter .3s, opacity .3s;
}
.logos__item:hover { filter: none; opacity: 1; }
.logos__item img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logos--strip .logos__item { aspect-ratio: 2 / 1; padding: 16px 20px; }
.partners__more { display: flex; flex-direction: column; gap: 24px; margin-top: 32px; }
.partners__text { color: var(--text-2); max-width: 560px; }
.cta-row { display: flex; flex-direction: column; gap: 24px; margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.cta-row__text { color: var(--text-2); max-width: 560px; font-size: 20px; }
@media (min-width: 600px) {
  .logos { grid-template-columns: repeat(3, 1fr); }
  .logos--strip { grid-template-columns: repeat(5, 1fr); }
  .logos--strip .logos__item { padding: 12px 16px; }
}
@media (min-width: 900px) {
  .logos { grid-template-columns: repeat(5, 1fr); }
  .partners__more, .cta-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery__link img, .gallery__zoom, .logos__item { transition: none; }
  .gallery__link:hover img { transform: none; }
}

/* Lightbox (native dialog) */
.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text);
  display: none; align-items: center; justify-content: center;
}
.lightbox[open] { display: flex; }
.has-lightbox { overflow: hidden; }
.lightbox::backdrop { background: rgba(14, 14, 15, .94); }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%; }
.lightbox__img {
  display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 120px);
  width: auto; height: auto; object-fit: contain; border: 1px solid var(--line-strong); background: var(--surface);
}
.lightbox__counter { font: 400 12px/1 var(--font-mono); letter-spacing: .2em; color: var(--text-2); }
.lightbox__btn {
  position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font: 300 30px/1 var(--font-body); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.lightbox__btn:hover { border-color: var(--text); background: var(--surface); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (min-width: 768px) {
  .lightbox__img { max-width: calc(100vw - 160px); max-height: calc(100vh - 96px); }
  .lightbox__btn { width: 56px; height: 56px; }
  .lightbox__close { top: 24px; right: 24px; }
  .lightbox__prev { left: 24px; }
  .lightbox__next { right: 24px; }
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 64px; text-align: center; }
.site-footer__name { font: 700 18px/1 var(--font-head); letter-spacing: .24em; text-transform: uppercase; color: var(--text-2); }
.site-footer__line { margin-top: 16px; font: 400 12px/1.6 var(--font-mono); letter-spacing: .08em; color: var(--text-3); }

/* ------------------------------------------------------------------
   Reveal on scroll (only with JS and motion allowed)
------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
