/* =========================================================
   Precision3D — Additive Manufacturing
   Shared stylesheet for all pages
   ========================================================= */

:root {
  --ink: #0d1117;           /* основной тёмный */
  --ink-2: #161b22;         /* вторичный тёмный */
  --ink-soft: #8b949e;      /* мягкий серый */
  --cream: #f0f6fc;         /* светлый */
  --paper: #ffffff;         /* фон */
  --accent: #58a6ff;        /* акцент (tech blue) */
  --accent-dark: #1f6feb;   /* акцент тёмный */
  --line: rgba(13, 17, 23, 0.12);
  --line-dark: rgba(240, 246, 252, 0.12);

  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", monospace;

  --max: 1280px;

  --shadow-sm: 0 1px 2px rgba(13, 17, 23, 0.06), 0 1px 3px rgba(13, 17, 23, 0.05);
  --shadow-md: 0 4px 12px rgba(13, 17, 23, 0.08), 0 2px 4px rgba(13, 17, 23, 0.05);
  --shadow-lg: 0 18px 48px rgba(13, 17, 23, 0.14), 0 6px 16px rgba(13, 17, 23, 0.08);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 5vw, 4.1rem); }
h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }

/* -------------------- Layout helpers -------------------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-dark);
}
.section { padding: 108px 0; }
.section-tight { padding: 76px 0; }
.lead { font-size: 1.2rem; color: #40474f; max-width: 56ch; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent-dark); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31, 111, 235, .3); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent-dark); color: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--accent-dark); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--accent); gap: 14px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.btn-onaccent { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-onaccent:hover { background: #fff; color: var(--accent-dark); border-color: #fff; }

/* -------------------- Top bar -------------------- */
.topbar {
  background: var(--ink);
  color: var(--ink-soft);
  font-size: .82rem;
  border-bottom: 1px solid var(--line-dark);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 42px; }
.topbar-left { display: flex; gap: 26px; }
.topbar a { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: var(--cream); }
.topbar svg { width: 14px; height: 14px; opacity: .8; }
.topbar-hours { display: inline-flex; align-items: center; gap: 7px; }
.topbar-hours svg { width: 14px; height: 14px; }

/* -------------------- Header -------------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--accent);
  flex: none;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.32rem; color: var(--ink); }
.brand-sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
nav.primary { display: flex; align-items: center; gap: 34px; }
nav.primary a {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
nav.primary a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--accent-dark);
  transition: width .22s ease;
}
nav.primary a:hover, nav.primary a.active { color: var(--accent-dark); }
nav.primary a:hover::after, nav.primary a.active::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 18px; }

/* -------------------- Hero -------------------- */
.hero { background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; padding-top: 92px; padding-bottom: 92px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 em { color: var(--accent-dark); }
.hero .lead { margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; border-top: 1px solid var(--line); padding-top: 30px; }
.stat-num { font-family: var(--serif); font-size: 2.4rem; color: var(--ink); line-height: 1; }
.stat-label { font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; height: 560px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-lg); }
.hero-badge {
  position: absolute; left: -26px; bottom: 34px;
  background: var(--ink); color: #fff;
  padding: 18px 22px; border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px;
}
.hero-badge svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.hero-badge b { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; display: block; }
.hero-badge span { font-size: .78rem; color: var(--ink-soft); }

/* -------------------- Section head -------------------- */
.sec-head { max-width: 640px; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; }

/* -------------------- Cards grid (services) -------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 34px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(31,111,235,.35); }
.card-ico {
  width: 52px; height: 52px; border-radius: 6px;
  background: rgba(88,166,255,.12);
  color: var(--accent-dark);
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.card-ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 12px; }
.card p { color: #4b535b; font-size: .98rem; margin-bottom: 20px; }
.card .btn-ghost { margin-top: auto; }

/* -------------------- Feature image split (about) -------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { width: 100%; height: 500px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-md); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 34px; margin-top: 36px; }
.feature { display: flex; gap: 16px; }
.feature-ico {
  flex: none; width: 44px; height: 44px; border-radius: 6px;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
}
.feature-ico svg { width: 22px; height: 22px; }
.feature h4 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; margin-bottom: 4px; }
.feature p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* -------------------- Process timeline -------------------- */
.process { background: var(--ink); color: var(--cream); }
.process .eyebrow, .process .eyebrow::before { color: var(--accent); background: var(--accent); }
.process .eyebrow { color: var(--accent); }
.process h2 { color: #fff; }
.process .lead { color: var(--ink-soft); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 58px; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 26px; left: 6%; right: 6%;
  height: 1px; background: var(--line-dark);
}
.step { position: relative; }
.step-num {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink-2); border: 1px solid var(--line-dark);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 1rem; font-weight: 500;
  margin-bottom: 22px; position: relative; z-index: 1;
}
.step h4 { font-family: var(--serif); font-weight: 400; font-size: 1.28rem; color: #fff; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* -------------------- Technologies -------------------- */
.tech-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.tech-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.tech-card figure { margin: 0; height: 210px; overflow: hidden; background: var(--ink-2); }
.tech-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tech-card:hover figure img { transform: scale(1.05); }
.tech-body { padding: 28px; }
.tech-body .tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: var(--accent-dark); text-transform: uppercase; }
.tech-body h3 { margin: 8px 0 10px; }
.tech-body p { color: #4b535b; font-size: .95rem; margin: 0; }

/* -------------------- CTA strip -------------------- */
.cta-strip { background: linear-gradient(120deg, var(--accent-dark), #2b7bff 55%, var(--accent)); color: #fff; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 74px 32px; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; max-width: 20ch; }
.cta-strip p { color: rgba(255,255,255,.85); margin-top: 12px; max-width: 46ch; }

/* -------------------- Footer -------------------- */
footer.site { background: var(--ink); color: var(--ink-soft); padding-top: 76px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; }
.foot-brand .brand-name, .foot-brand .brand-mark { }
.foot-brand p { margin-top: 20px; max-width: 34ch; font-size: .92rem; }
.foot-social { display: flex; gap: 12px; margin-top: 22px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 6px;
  border: 1px solid var(--line-dark);
  display: grid; place-items: center; color: var(--ink-soft);
}
.foot-social a:hover { border-color: var(--accent); color: var(--accent); }
.foot-social svg { width: 17px; height: 17px; }
.foot-col h5 { font-family: var(--sans); font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 20px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.foot-col a { color: var(--ink-soft); font-size: .93rem; }
.foot-col a:hover { color: var(--accent); }
.foot-contact li { display: flex; gap: 10px; font-size: .92rem; margin-bottom: 12px; }
.foot-contact svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 3px; }
.foot-bottom {
  margin-top: 62px; border-top: 1px solid var(--line-dark);
  padding: 26px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-size: .84rem;
}
.foot-bottom .brand-name { color: var(--cream); }
.foot-legal { display: flex; gap: 24px; }
.foot-legal a { color: var(--ink-soft); }
.foot-legal a:hover { color: var(--accent); }

/* -------------------- Page hero (inner pages) -------------------- */
.page-hero { background: var(--ink); color: var(--cream); border-bottom: 1px solid var(--line-dark); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -140px; top: -140px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(88,166,255,.22), transparent 70%);
}
.page-hero .wrap { padding: 96px 32px; position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero h1 em { color: var(--accent); }
.page-hero .lead { color: var(--ink-soft); margin-top: 22px; }
.breadcrumb { font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 26px; text-transform: uppercase; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 8px; opacity: .5; }

/* -------------------- Service detail -------------------- */
.svc-body { display: grid; grid-template-columns: 1.4fr 0.85fr; gap: 64px; align-items: start; }
.svc-body img { width: 100%; height: 340px; object-fit: cover; border-radius: 6px; margin-bottom: 30px; box-shadow: var(--shadow-md); }
.includes { list-style: none; margin: 0; padding: 0; }
.includes li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.includes li:last-child { border-bottom: 0; }
.includes svg { width: 21px; height: 21px; color: var(--accent-dark); flex: none; margin-top: 3px; }
.svc-aside {
  background: var(--cream); border: 1px solid var(--line); border-radius: 6px;
  padding: 32px; position: sticky; top: 100px;
}
.svc-aside h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin-bottom: 18px; }
.svc-aside .price { font-family: var(--serif); font-size: 2.1rem; color: var(--ink); }
.svc-aside .price small { font-family: var(--sans); font-size: .82rem; color: var(--ink-soft); font-weight: 400; }
.svc-aside ul { list-style: none; margin: 20px 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.svc-aside ul li { display: flex; justify-content: space-between; font-size: .92rem; border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.svc-aside ul li b { color: var(--ink); font-weight: 600; }

/* -------------------- Contact -------------------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: start; }
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--sans); font-size: 1rem;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 4px; background: #fff; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 148px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(88,166,255,.18);
}
.contact-info { background: var(--ink); color: var(--cream); border-radius: 6px; padding: 40px; }
.contact-info h3 { color: #fff; font-family: var(--serif); font-weight: 400; margin-bottom: 26px; }
.contact-info .info-item { display: flex; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
.contact-info .info-item:last-of-type { border-bottom: 0; }
.contact-info .info-item svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 3px; }
.contact-info .info-item b { color: #fff; display: block; font-family: var(--sans); font-weight: 600; margin-bottom: 2px; }
.contact-info .info-item span { color: var(--ink-soft); font-size: .93rem; }
.map {
  height: 360px; border-radius: 6px; margin-top: 34px;
  background:
    linear-gradient(rgba(13,17,23,.04), rgba(13,17,23,.04)),
    repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(13,17,23,.06) 38px, rgba(13,17,23,.06) 39px),
    repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(13,17,23,.06) 38px, rgba(13,17,23,.06) 39px),
    var(--cream);
  border: 1px solid var(--line);
  position: relative;
}
.map-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  color: var(--accent-dark);
}
.map-pin svg { width: 44px; height: 44px; filter: drop-shadow(0 6px 10px rgba(13,17,23,.25)); }
.map-label {
  position: absolute; left: 50%; top: calc(50% + 12px); transform: translateX(-50%);
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 14px; font-size: .82rem; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* -------------------- Legal / long-form -------------------- */
.prose { max-width: 760px; }
.prose h2 { font-family: var(--serif); font-size: 1.7rem; margin: 48px 0 16px; }
.prose h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 600; margin: 30px 0 10px; }
.prose p { color: #3a4149; }
.prose ul { color: #3a4149; padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose .updated { font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); margin-bottom: 34px; }

/* -------------------- Reveal animation -------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.hero h1, .hero .lead, .hero-actions, .stats, .sec-head, .card, .step, .tech-card, .feature { animation: rise .7s ease both; }
.card:nth-child(2), .tech-card:nth-child(2), .step:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3), .tech-card:nth-child(3), .step:nth-child(3) { animation-delay: .16s; }
.step:nth-child(4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-media img { height: 420px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split img { height: 380px; }
  .svc-body { grid-template-columns: 1fr; gap: 40px; }
  .svc-aside { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 40px; }
  .timeline::before { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .wrap { padding: 0 22px; }
  nav.primary { display: none; }
  .topbar-left { gap: 16px; }
  .topbar .wrap { justify-content: center; }
  .topbar-hours { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .stats { gap: 14px; }
  .stat-num { font-size: 1.9rem; }
  .cta-strip .wrap { flex-direction: column; align-items: flex-start; text-align: left; }
  .foot-grid { grid-template-columns: 1fr; gap: 34px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .hero-badge { left: 12px; }
}
@media (max-width: 480px) {
  .hero-actions .btn, .header-cta .btn { width: 100%; justify-content: center; }
  .header-cta { display: none; }
}
