:root {
  --navy: #0B1D4D;
  --blue: #0D5BD4;
  --blue-dark: #0a4ab8;
  --bg: #F2F4F7;
  --surface: #ffffff;
  --text: #333A45;
  --muted: #667085;
  --border: #E4E7EC;
  --success: #12B76A;
  --danger: #F04438;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(11, 29, 77, 0.12);
  --font: 'Montserrat', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(13, 91, 212, 0.15), transparent),
    var(--bg);
  z-index: -1;
}

.container {
  width: min(1180px, 94vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand { text-decoration: none; }
.brand-logo { height: 42px; width: auto; display: block; }

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s;
}

.nav a:hover { color: var(--blue); }

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 91, 212, 0.1);
  color: var(--blue);
  border: 1px solid rgba(13, 91, 212, 0.2);
  white-space: nowrap;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0a2558 50%, #0d3a8a 100%);
  color: #fff;
  padding: 4rem 0 5rem;
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.hero h1 em {
  font-style: normal;
  color: #6eb4ff;
}

.hero-copy > p {
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
  font-size: 1.02rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}

.hero-stats span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.hero-visual {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.globe {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4da3ff, var(--blue) 40%, var(--navy) 100%);
  box-shadow: 0 0 80px rgba(77, 163, 255, 0.5), inset 0 0 40px rgba(255, 255, 255, 0.1);
  animation: pulse 4s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.orbit-1 { width: 260px; height: 260px; }
.orbit-2 { width: 300px; height: 300px; animation-duration: 28s; animation-direction: reverse; }
.orbit-3 { width: 340px; height: 340px; animation-duration: 35s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 91, 212, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-hero { padding: 1rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; padding: 1rem; margin-top: 0.5rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: #fff; }

.section-head { margin-bottom: 2rem; }
.section-head.center { text-align: center; }

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Order card */
.order-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.steps {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.step {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.step.active {
  color: var(--blue);
  border-color: rgba(13, 91, 212, 0.35);
  background: rgba(13, 91, 212, 0.08);
}

.hidden { display: none !important; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: #FEF3F2;
  border: 1px solid #FECDCA;
  color: #B42318;
}

/* Dropzone */
.dropzone {
  display: block;
  cursor: pointer;
}

.dropzone-body {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 3rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover .dropzone-body,
.dropzone.dragover .dropzone-body {
  border-color: var(--blue);
  background: rgba(13, 91, 212, 0.04);
}

.dropzone-icon {
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.dropzone-body strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.dropzone-body span {
  color: var(--muted);
  font-size: 0.88rem;
}

.order-card.loading .dropzone-body {
  opacity: 0.7;
  pointer-events: none;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.viewer-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.viewer-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.viewer-header strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.viewer-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.stl-viewer {
  position: relative;
  width: 100%;
  height: min(420px, 52vh);
  min-height: 280px;
  background: #35353b;
}

.stl-viewer canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.viewer-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  color: #c8cad0;
  font-size: 0.9rem;
  background: rgba(53, 53, 59, 0.92);
  z-index: 2;
}

.viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.viewer-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.viewer-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.order-details {
  min-width: 0;
}

@media (max-width: 900px) {
  .order-layout {
    grid-template-columns: 1fr;
  }

  .stl-viewer {
    height: min(360px, 45vh);
  }
}

.file-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.file-bar strong { color: var(--navy); font-size: 0.95rem; }
.file-bar .muted { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0; }

.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

/* Form */
.order-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.order-form input,
.order-form select,
.order-form textarea {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 91, 212, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.quote-box {
  margin: 1.25rem 0 0.5rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 91, 212, 0.08), rgba(11, 29, 77, 0.05));
  border: 1px solid rgba(13, 91, 212, 0.2);
}

.quote-total {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  display: block;
  margin: 0.15rem 0;
}

.quote-note {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.muted { color: var(--muted); }

/* Success */
.success-panel { text-align: center; padding: 2rem 1rem; }

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(18, 183, 106, 0.15);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
}

.success-panel h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.35rem;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.material-chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.material-chip strong {
  display: block;
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.material-chip span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
}

.footer-brand span {
  font-size: 0.82rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
}

.loading { opacity: 0.6; pointer-events: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: 1fr; }
}
