/* =============================================
   PrintMajstor - Design System
   Aesthetic: Industrial Precision / Dark + Accent
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg:          #0d0f12;
  --bg2:         #13161b;
  --bg3:         #1c2028;
  --surface:     #222730;
  --border:      #2e3340;
  --accent:      #f97316;
  --accent-dim:  #7c3a14;
  --accent-glow: rgba(249,115,22,0.18);
  --text:        #e8eaf0;
  --text-muted:  #7a8095;
  --text-dim:    #4a5168;
  --white:       #ffffff;
  --success:     #22c55e;
  --error:       #ef4444;

  --font-display: 'Outfit', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow:      0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.6);
  --glow:        0 0 40px var(--accent-glow);

  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
  --nav-h:       72px;

  /* Background editor variables */
  --grid-opacity:  0.3;
  --grid-size:     60px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  overflow: visible;
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.32;
}
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
p  { color: var(--text-muted); line-height: 1.75; }
a  { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.8; }

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---- NAV ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(13,15,18,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 260px;
}
.nav-logo span { color: var(--accent); }
.nav-logo img {
  height: var(--logo-h, 38px);
  max-height: 48px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.nav-logo-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-logo-text small {
  font-family: var(--font-body);
  font-size: var(--tagline-size, 0.78rem);
  font-weight: 400;
  color: var(--tagline-color, #a0a8c0);
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: var(--bg3);
}
.nav-links a.cta {
  background: var(--accent);
  color: var(--white);
  padding: 8px 18px;
}
.nav-links a.cta:hover {
  background: #ea6c0a;
  opacity: 1;
}
.nav-lang {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-lang a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.nav-lang a.active {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--white); background: var(--bg3); }
.mobile-menu a.cta {
  background: var(--accent);
  color: var(--white);
  text-align: center;
  margin-top: 8px;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  padding-top: var(--nav-h);
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(249,115,22,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(249,115,22,0.04) 0%, transparent 60%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero h1 { color: var(--white); margin-bottom: 24px; }
.hero h1 em { color: var(--accent); font-style: normal; display: block; line-height: 1.35; }
.page-header h1 { overflow: visible; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
}
.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: #ea6c0a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.35);
  color: var(--white);
  opacity: 1;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- SECTION HEADING ---- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-heading { color: var(--white); margin-bottom: 16px; }
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 56px;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 1.4rem;
}

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
}
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.gallery-placeholder svg { opacity: 0.4; }

/* ---- CALCULATOR ---- */
.calc-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 760px;
  margin: 0 auto;
  overflow: visible;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}
.form-input,
.form-select,
.form-textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select { appearance: none; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.input-group {
  position: relative;
}
.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

.calc-result {
  background: var(--bg3);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
  display: none;
}
.calc-result.visible { display: block; }
.calc-result-price {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
}
.calc-result-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.calc-breakdown-item { font-size: 0.85rem; color: var(--text-muted); }
.calc-breakdown-item strong { color: var(--text); }
.calc-note {
  background: rgba(249,115,22,0.06);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.6;
}

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.contact-info-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
}
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-zone-text { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }
.upload-zone-text strong { color: var(--accent); }
.uploaded-files { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85rem;
}
.uploaded-file button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}
.uploaded-file button:hover { color: var(--error); }

/* ---- CLIENTS ---- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.client-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  transition: var(--transition);
  text-decoration: none;
}
.client-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  opacity: 1;
}
.client-card img { max-width: 120px; max-height: 60px; object-fit: contain; filter: brightness(0.7) grayscale(1); transition: var(--transition); }
.client-card:hover img { filter: brightness(1) grayscale(0); }
.client-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.footer-logo span { color: var(--accent); }
.footer-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); opacity: 1; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: var(--error); }

/* ---- PAGE HEADER ---- */
.page-header {
  padding: calc(var(--nav-h) + 64px) 0 72px;
  background: linear-gradient(to bottom, var(--bg2), var(--bg));
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: visible;
  isolation: isolate;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.page-header h1 {
  line-height: 1.25;
  padding-bottom: 0.2em;
  overflow: visible;
}

/* ---- SPECS TABLE ---- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td:first-child { color: var(--text-muted); width: 40%; }
.specs-table td:last-child { color: var(--text); font-weight: 500; }

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.tab-btn {
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- SCROLL ANIMATIONS ---- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .nav-links, .nav-lang { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .calc-result-breakdown { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .calc-wrap { padding: 24px; }
  .contact-form { padding: 24px; }
}
