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

:root {
  --bg:       #0a0a0a;
  --surface:  #111111;
  --surface2: #181818;
  --border:   #222222;
  --accent:   #ff6b35;
  --accent2:  #ff8c5a;
  --text:     #e8e8e8;
  --muted:    #888888;
  --green:    #22c55e;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── NAV ─────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: .45rem; }
.brand .icon { color: var(--accent); font-size: 1.25rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .875rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--accent); color: #fff !important; padding: .4rem 1rem; border-radius: 6px; font-weight: 600; }
.nav-cta:hover { background: var(--accent2) !important; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  padding: 6rem 2rem 3rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,107,53,.1) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: .3rem .9rem;
  background: rgba(255,107,53,.12); border: 1px solid rgba(255,107,53,.3);
  border-radius: 20px; color: var(--accent); font-size: .8rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 40%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 520px; margin: 0 auto 2.5rem; }
.btn-hero {
  display: inline-block; padding: .85rem 2.25rem;
  background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 8px; font-weight: 700; font-size: 1rem;
  transition: background .15s, transform .1s;
}
.btn-hero:hover { background: var(--accent2); transform: translateY(-1px); }
.hero-stats {
  display: flex; justify-content: center; align-items: center;
  gap: 0; margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat { padding: 0 2.5rem; text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-div { width: 1px; height: 40px; background: var(--border); }

/* ── HOW IT WORKS ────────────────────────────────────────── */
.how { padding: 5rem 2rem; text-align: center; }
.how h2 { font-size: 2rem; font-weight: 700; margin-bottom: 3rem; }
.steps {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 1rem; flex-wrap: wrap; max-width: 900px; margin: 0 auto;
}
.step { flex: 1; min-width: 200px; max-width: 260px; padding: 0 1rem; }
.step-num { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: .5rem; }
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.step p { font-size: .875rem; color: var(--muted); }
.step-arrow { font-size: 1.5rem; color: var(--border); align-self: center; margin-top: -1rem; }

/* ── MATERIALS ───────────────────────────────────────────── */
.materials {
  padding: 5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.materials h2 { font-size: 2rem; font-weight: 700; margin-bottom: 2.5rem; }
.mat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; max-width: 900px; margin: 0 auto;
}
.mat-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.5rem 1.25rem; text-align: left;
  transition: border-color .15s;
}
.mat-card:hover { border-color: var(--accent); }
.mat-swatch { width: 36px; height: 36px; border-radius: 50%; margin-bottom: 1rem; }
.mat-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.mat-card p { font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.mat-price { font-size: .8rem; font-weight: 700; color: var(--accent); }

/* ── UPLOAD SECTION ──────────────────────────────────────── */
.upload-section { padding: 5rem 2rem; }
.upload-card {
  max-width: 680px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem;
}
.upload-header { text-align: center; margin-bottom: 2rem; }
.upload-header h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: .4rem; }
.upload-header p { color: var(--muted); font-size: .9rem; }

.form-row { margin-bottom: 1.25rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.field select {
  width: 100%; padding: .65rem .9rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: .9rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  padding-right: 2.25rem;
}
.field select:focus { outline: none; border-color: var(--accent); }

/* Drop zone */
.file-drop-area {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 2.5rem 1rem; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg);
}
.file-drop-area:hover, .file-drop-area.drag-over {
  border-color: var(--accent); background: rgba(255,107,53,.04);
}
.drop-content { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.drop-icon { font-size: 2.5rem; margin-bottom: .25rem; }
.drop-content p { font-size: .9rem; color: var(--text); }
.muted-sm { color: var(--muted) !important; font-size: .8rem !important; }
.link-btn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: inherit; text-decoration: underline; padding: 0;
}

/* 3D Model preview */
.model-preview-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: #050505;
  position: relative;
  min-height: 120px;
}
#preview-canvas {
  display: block;
  width: 100%;
}
.preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .6rem;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}
.preview-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .45rem .8rem;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: #888;
  pointer-events: none;
}

/* Submit */
.btn-submit {
  width: 100%; padding: 1rem;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .15s, transform .1s;
  margin-top: .5rem;
}
.btn-submit:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Status / quote */
.status-area { margin-top: 1.5rem; }
.status-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 2rem; text-align: center;
}
.status-box p { color: var(--muted); margin-top: .75rem; }
.error-box { border-color: #7f1d1d; background: #1a0a0a; }
.error-msg { color: #f87171; font-weight: 600; margin-bottom: 1rem; }
.btn-retry {
  display: inline-block; padding: .55rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); text-decoration: none;
  font-size: .875rem; cursor: pointer;
}

.quote-card {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
}
.quote-preview { flex-shrink: 0; }
.preview-thumb {
  width: 140px; height: 140px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}
.preview-placeholder {
  width: 140px; height: 140px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--muted);
}
.quote-details { flex: 1; }
.quote-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.quote-price { font-size: 3rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: .75rem; }
.quote-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.quote-meta span { font-size: .8rem; color: var(--muted); }
.btn-pay {
  width: 100%; padding: .85rem 1.5rem;
  background: var(--green); color: #fff; border: none;
  border-radius: 8px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.btn-pay:hover:not(:disabled) { background: #16a34a; }
.btn-pay:disabled { opacity: .6; cursor: not-allowed; }
.secure-note { font-size: .75rem; color: var(--muted); text-align: center; margin-top: .6rem; }

/* Spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── WHY US ──────────────────────────────────────────────── */
.why {
  padding: 5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem; max-width: 900px; margin: 0 auto;
}
.why-item { text-align: center; }
.why-icon { font-size: 2rem; margin-bottom: .75rem; }
.why-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.why-item p { font-size: .85rem; color: var(--muted); }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .8rem;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 4rem 1.25rem 2rem; }
  .hero-stats { gap: 0; }
  .stat { padding: 0 1.25rem; }
  .stat-num { font-size: 1.5rem; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .two-col { grid-template-columns: 1fr; }
  .quote-card { flex-direction: column; }
  .preview-thumb, .preview-placeholder { width: 100%; height: 180px; }
  .nav-links { display: none; }
  .upload-card { padding: 1.5rem; }
}
