/* ═══════════════════════════════════════════════════════
   CM AUROPROCESS ENGINEERING — DESIGN SYSTEM
   Industrial Luxury: Navy depths × Molten Gold
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Bebas+Neue&display=swap');

/* ── Variables ─────────────────────────────────────── */
:root {
  --navy-900: #060e1f;
  --navy-800: #0d1b35;
  --navy-700: #1a2f5e;
  --navy-600: #243d55;
  --navy-500: #2d4f72;
  --gold-600: #8a6a1a;
  --gold-500: #b8922a;
  --gold-400: #d4a843;
  --gold-300: #e8c76a;
  --gold-200: #f0d890;
  --white: #ffffff;
  --off-white: #f8f5ee;
  --text-200: #e8e0d0;
  --text-400: #a09080;
  --text-600: #6a5a48;
  --error: #e05555;
  --success: #3aaf6a;

  --font-display: 'Bebas Neue', cursive;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-sm: 2px;
  --radius: 4px;
  --shadow-gold: 0 0 40px rgba(184,146,42,0.15);
  --shadow-deep: 0 20px 60px rgba(0,0,0,0.5);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  --clip-card: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --clip-btn: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --clip-badge: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

/* ── Reset ─────────────────────────────────────────── */
*, *::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(--navy-800);
  color: var(--text-200);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea, select { font-family: var(--font-body); }

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold-500), var(--gold-400)); border-radius: 3px; }

/* ── Typography ────────────────────────────────────── */
.font-display { font-family: var(--font-display); letter-spacing: 0.05em; }
.font-heading { font-family: var(--font-heading); }

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.15; }

/* ── Layout ────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.container--sm { max-width: 900px; margin: 0 auto; padding: 0 28px; }
.section { padding: 100px 0; }
.section--sm { padding: 70px 0; }

/* ── Gold Decorators ───────────────────────────────── */
.gold-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  margin: 16px 0;
}
.gold-line--center { margin: 16px auto; }
.gold-text { color: var(--gold-400); }
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 12px;
}
.section-tag::before {
  content: ''; width: 20px; height: 1px;
  background: var(--gold-500);
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: var(--transition);
  position: relative; overflow: hidden;
  clip-path: var(--clip-btn);
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.5s ease;
}
.btn:hover::before { transform: translateX(100%) skewX(-15deg); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
}
.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(184,146,42,0.4);
}
.btn--outline {
  background: transparent;
  color: var(--gold-400);
  border: 1.5px solid var(--gold-500);
}
.btn--outline:hover {
  background: rgba(184,146,42,0.08);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}
.btn--sm { padding: 10px 22px; font-size: 0.75rem; }
.btn--icon { width: 44px; height: 44px; padding: 0; justify-content: center; clip-path: none; border-radius: 2px; }

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: rgba(26,47,94,0.25);
  border: 1px solid rgba(184,146,42,0.1);
  clip-path: var(--clip-card);
  transition: var(--transition);
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.card:hover {
  border-color: rgba(184,146,42,0.35);
  box-shadow: var(--shadow-gold);
  transform: translateY(-5px);
}
.card:hover::after { transform: scaleX(1); }

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  clip-path: var(--clip-badge);
}
.badge--gold { background: rgba(184,146,42,0.15); color: var(--gold-400); border: 1px solid rgba(184,146,42,0.3); }
.badge--active { background: rgba(58,175,106,0.15); color: #3aaf6a; border: 1px solid rgba(58,175,106,0.3); }
.badge--inactive { background: rgba(224,85,85,0.12); color: var(--error); border: 1px solid rgba(224,85,85,0.25); }
.badge--navy { background: rgba(26,47,94,0.5); color: var(--text-200); border: 1px solid rgba(255,255,255,0.1); }

/* ── Section Headers ───────────────────────────────── */
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .section-tag { justify-content: center; }
.section-header .section-tag::before { display: none; }
.section-header .section-tag::after {
  content: ''; width: 20px; height: 1px;
  background: var(--gold-500);
  display: inline-block;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; color: var(--white);
  line-height: 1.1; margin-bottom: 8px;
}
.section-desc {
  color: var(--text-400);
  font-size: 1rem; line-height: 1.75;
  max-width: 580px; margin: 16px auto 0;
}

/* ── Page Hero ─────────────────────────────────────── */
.page-hero {
  padding: 160px 0 80px;
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(6,14,31,0.96) 0%, rgba(26,47,94,0.82) 100%);
}
.page-hero__content { position: relative; z-index: 1; max-width: 700px; }
.page-hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900; color: var(--white);
  line-height: 1.05; margin: 14px 0 12px;
}
.page-hero__desc {
  color: var(--text-400); font-size: 1rem;
  line-height: 1.75; max-width: 580px;
  margin-top: 16px;
}

/* ── Stats Bar ─────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  border-top: 1px solid rgba(184,146,42,0.15);
  border-bottom: 1px solid rgba(184,146,42,0.15);
  position: relative; overflow: hidden;
}
.stats-bar::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(184,146,42,0.02) 30px, rgba(184,146,42,0.02) 31px);
}
.stats-bar__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.stats-bar__item {
  padding: 44px 28px; text-align: center;
  border-right: 1px solid rgba(184,146,42,0.1);
}
.stats-bar__item:last-child { border-right: none; }
.stats-bar__num {
  font-family: var(--font-display);
  font-size: 3.8rem; color: var(--gold-400);
  letter-spacing: 3px; line-height: 1;
  display: block; margin-bottom: 6px;
}
.stats-bar__label {
  font-family: var(--font-heading);
  font-size: 0.9rem; font-weight: 700;
  color: var(--white); margin-bottom: 4px;
}
.stats-bar__sub {
  font-size: 0.75rem; color: var(--text-400);
  letter-spacing: 0.05em;
}

/* ── Forms ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-400);
}
.form-input {
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--white); font-size: 0.92rem;
  outline: none; transition: border-color var(--transition);
  border-radius: 0;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(184,146,42,0.08); }
.form-input::placeholder { color: rgba(255,255,255,0.2); }
.form-textarea { resize: vertical; min-height: 140px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23b8922a'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-select option { background: var(--navy-800); }
.form-error { color: var(--error); font-size: 0.78rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Messages ──────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-left: 3px solid;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.alert--success { background: rgba(58,175,106,0.1); border-color: var(--success); color: #3aaf6a; }
.alert--error { background: rgba(224,85,85,0.1); border-color: var(--error); color: var(--error); }
.alert--info { background: rgba(184,146,42,0.08); border-color: var(--gold-500); color: var(--gold-400); }

/* ── Loading Screen ────────────────────────────────── */
#page-loader {
  position: fixed; inset: 0;
  background: var(--navy-900);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-logo {
  font-family: var(--font-display);
  font-size: 4rem; color: var(--gold-400);
  letter-spacing: 8px; margin-bottom: 32px;
  animation: logoPulse 2s ease infinite;
}
.loader-bar {
  width: 200px; height: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  animation: loaderFill 1.2s ease forwards;
}
@keyframes logoPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.6; }
}
@keyframes loaderFill {
  from { width: 0; } to { width: 100%; }
}

/* ── Scroll Reveal ─────────────────────────────────── */
.sr {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.sr.sr--left { transform: translateX(-32px); }
.sr.sr--right { transform: translateX(32px); }
.sr.sr--scale { transform: scale(0.94); }
.sr.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}
.sr--delay-1 { transition-delay: 0.1s; }
.sr--delay-2 { transition-delay: 0.2s; }
.sr--delay-3 { transition-delay: 0.3s; }
.sr--delay-4 { transition-delay: 0.4s; }
.sr--delay-5 { transition-delay: 0.5s; }

/* ── Utilities ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-gold { color: var(--gold-400); }
.text-muted { color: var(--text-400); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .form-row { grid-template-columns: 1fr; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar__item { border-right: none; border-bottom: 1px solid rgba(184,146,42,0.1); }
  .stats-bar__item:nth-child(odd) { border-right: 1px solid rgba(184,146,42,0.1); }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .stats-bar__grid { grid-template-columns: 1fr; }
  .stats-bar__item { border-right: none !important; }
}
