/* ДК Мастер — лазерная резка металла. Стиль вдохновлён минимализмом Xiaomi.com */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #ff6a00;
  --accent-dark: #e65f00;
  --border: #d2d2d7;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
  --container: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

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

.section {
  padding: 88px 0;
}
.section--alt { background: var(--bg-alt); }
.section--dark { background: #1d1d1f; color: #fff; }

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 640px;
  margin-bottom: 48px;
}
.section--dark .section-subtitle { color: #a1a1a6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.22); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text); }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  opacity: .8;
}
.nav-links a:hover { opacity: 1; color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.35) 40%, rgba(10,10,12,.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-title {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  z-index: 1;
}

/* Advantages grid */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.adv-card, .service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.adv-card:hover, .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.adv-icon {
  font-size: 30px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  margin-bottom: 18px;
}
.adv-card h3, .service-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.adv-card p, .service-card p { color: var(--text-muted); font-size: 15px; }

/* Services */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-price {
  margin-top: auto;
  padding-top: 16px;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.portfolio-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  cursor: pointer;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,0));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .2s ease;
}
.portfolio-item:hover .portfolio-caption { opacity: 1; }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

/* Price tables */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
.price-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  background: #fff;
  font-size: 14px;
}
.price-table th, .price-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.price-table thead th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}
.price-table td.price-material, .price-table th:first-child {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: #fff;
}
.price-table thead th:first-child { background: var(--bg-alt); }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover td { background: var(--bg-alt); }
.price-table tbody tr:hover td.price-material { background: var(--bg-alt); }

/* Steps */
.steps {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}
.step { position: relative; padding-left: 8px; }
.step-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  opacity: .35;
  margin-bottom: 8px;
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 14px; }

/* Contact / CTA */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info h2 { color: #fff; }
.contact-list { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.contact-list a, .contact-list div { font-size: 17px; }
.contact-list .label { color: #a1a1a6; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.contact-form {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.form-checkbox input { width: auto; flex: none; margin-top: 3px; }
.form-checkbox a { color: var(--accent); text-decoration: underline; }
.form-msg { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.form-msg.ok { background: #eefaf0; color: #1e7e34; }
.form-msg.err { background: #fff1f0; color: #c0392b; }

/* Footer */
.site-footer {
  background: #0f0f10;
  color: #a1a1a6;
  padding: 48px 0 24px;
  font-size: 14px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 20px;
}
.footer-top .logo { color: #fff; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.admin-link { opacity: .35; font-size: 12px; }
.admin-link:hover { opacity: .7; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 20px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .header-phone { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links {
    display: flex;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .section { padding: 64px 0; }
  .hero { min-height: 80vh; }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --bg-alt: #1a1a1c;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --border: #333336;
    --shadow: 0 2px 20px rgba(0,0,0,.4);
    --shadow-hover: 0 12px 32px rgba(0,0,0,.5);
  }
  .site-header { background: rgba(15,15,16,.8); border-bottom-color: rgba(255,255,255,.08); }
  .nav-links a { color: #f5f5f7; }
  .site-header.open .nav-links { background: #0f0f10; }
  .adv-card, .service-card, .contact-form { background: #1a1a1c; }
  .price-table { background: #1a1a1c; }
  .price-table td.price-material, .price-table th:first-child { background: #1a1a1c; }
  .price-table thead th { background: #232326; }
  .price-table thead th:first-child { background: #232326; }
  .btn-outline { color: #f5f5f7; }
  .form-row input, .form-row textarea { background: #0f0f10; color: #f5f5f7; }
}
