/* Quick Prints web funnel — Deep Space tokens mirrored from src/theme/tokens.ts */

:root {
  --bg-top: #131B38; --bg-mid: #0A0E1F; --bg-bot: #05060C;
  --glass: rgba(255,255,255,0.055); --glass-strong: rgba(255,255,255,0.09);
  --sheet: rgba(18,24,48,0.96);
  --border: rgba(130,155,255,0.22); --border-strong: rgba(130,155,255,0.55);
  --accent: #4A6FFF; --cyan: #00D4FF; --on-gradient: #04101E;
  --text: #F2F5FF; --dim: #AEB6D6; --faint: #7C84A6;
  --success: #2EDF8F; --danger: #FF5A6E;
  --selected: rgba(74,111,255,0.22); --disabled-bg: #1A2440; --disabled-text: #5F688C;
  --r-sm: 9px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px;
}

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

body {
  min-height: 100vh; color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bot) 100%) fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 4px;
}
.logo {
  font-size: 1.25rem; font-weight: 900; letter-spacing: .2px;
  background: linear-gradient(95deg, #8FA8FF, var(--accent) 45%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none;
}
.badge {
  font-size: .78rem; color: var(--dim); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; background: var(--glass);
}

/* ---- hero ---- */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  align-items: center; padding: 34px 4px 44px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; line-height: 1.12; }
.hero h1 .grad {
  background: linear-gradient(95deg, #8FA8FF, var(--accent) 45%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { color: var(--dim); margin: 14px 0 8px; font-size: 1.05rem; line-height: 1.55; }
.price-line { color: var(--text); font-weight: 700; margin: 10px 0 22px; }
.price-line .free { color: var(--success); }
.hero-img {
  width: 100%; height: auto; border-radius: var(--r-xl); border: 1px solid var(--border);
  box-shadow: 0 18px 60px rgba(74,111,255,0.28); display: block;
  max-width: 420px; margin: 0 auto;
}
.steps { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.step { display: flex; gap: 10px; align-items: center; color: var(--dim); font-size: .92rem; }
.step b {
  display: inline-flex; width: 26px; height: 26px; border-radius: 999px;
  align-items: center; justify-content: center; color: var(--on-gradient);
  background: linear-gradient(95deg, var(--accent), var(--cyan)); font-size: .85rem;
}

/* ---- buttons ---- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 1rem; border-radius: var(--r-md);
  padding: 15px 30px; color: var(--on-gradient);
  background: linear-gradient(95deg, var(--accent), var(--cyan));
  box-shadow: 0 8px 26px rgba(74,111,255,0.4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(74,111,255,0.55); }
.btn:disabled { background: var(--disabled-bg); color: var(--disabled-text); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: var(--glass); color: var(--text); border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--border-strong); }
.btn.wide { width: 100%; text-align: center; }

/* ---- panels / cards ---- */
.panel { display: none; }
.panel.active { display: block; }
.card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
}
.card + .card { margin-top: 16px; }
h2.section { font-size: 1.45rem; font-weight: 900; margin: 8px 0 18px; }
.hint { color: var(--faint); font-size: .85rem; }

/* ---- create (upload + fields) ---- */
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

.drop {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  background: var(--glass); text-align: center; padding: 30px 18px;
  cursor: pointer; transition: border-color .15s ease;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 300px; justify-content: center;
}
.drop:hover { border-color: var(--border-strong); }
.drop.has-img { padding: 12px; min-height: 0; }
.drop img { max-width: 100%; max-height: 380px; border-radius: var(--r-md); }
.drop .big { font-size: 2rem; }
.drop .cta { color: var(--text); font-weight: 700; }
.photo-rules {
  list-style: none; text-align: left; color: var(--dim);
  font-size: .92rem; line-height: 1.9; margin-top: 4px;
}
.photo-rules li::before { content: "✓  "; color: var(--success); font-weight: 800; }

.examples-title { color: var(--dim); font-size: .9rem; font-weight: 700; margin-bottom: 10px; }
.examples-strip { display: flex; gap: 10px; margin-bottom: 16px; }
.examples-strip img {
  width: calc((100% - 20px) / 3); aspect-ratio: 2/3; object-fit: cover;
  border-radius: var(--r-md); border: 1px solid var(--border);
  cursor: zoom-in;
}
.lightbox {
  position: fixed; inset: 0; z-index: 1000; cursor: zoom-out;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
}
.lightbox img {
  max-width: 94vw; max-height: 94vh; border-radius: var(--r-lg);
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}
.form-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; color: var(--dim); font-size: .9rem; font-weight: 600; margin-bottom: 7px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select {
  width: 100%; padding: 13px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: rgba(10,14,31,0.6);
  color: var(--text); font-size: 1rem; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--border-strong); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; gap: 10px; }
.seg button {
  flex: 1; padding: 13px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border); background: rgba(10,14,31,0.6);
  color: var(--dim); font-size: 1rem; font-weight: 700;
}
.seg button.active { background: var(--selected); border-color: var(--border-strong); color: var(--text); }

.err {
  display: none; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,90,110,0.12); border: 1px solid rgba(255,90,110,0.4);
  color: #FFB3BD; font-size: .92rem;
}
.err.show { display: block; }

/* ---- working ---- */
.working { text-align: center; padding: 70px 20px; }
.spinner {
  width: 54px; height: 54px; margin: 0 auto 24px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.working h3 { font-size: 1.3rem; margin-bottom: 8px; }
.working p { color: var(--dim); min-height: 24px; }

/* ---- result + products ---- */
.result-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 26px; align-items: start; }
.preview-wrap { position: sticky; top: 18px; }
.preview-wrap img {
  width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border);
  box-shadow: 0 18px 60px rgba(74,111,255,0.25); aspect-ratio: 2/3; object-fit: cover;
}
.preview-actions { display: flex; gap: 10px; margin-top: 12px; }
.preview-actions .btn { flex: 1; text-align: center; padding: 13px 10px; font-size: .95rem; }

.product-card { margin-bottom: 16px; }
.product-head { display: flex; gap: 14px; align-items: center; }
.mock {
  width: 92px; height: 92px; border-radius: var(--r-md); flex: none;
  background: var(--glass-strong); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mock img { width: 100%; height: 100%; object-fit: cover; }
.mock .mini-spin {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--cyan);
  animation: spin .9s linear infinite;
}
.product-head h3 { font-size: 1.08rem; }
.product-head p { color: var(--faint); font-size: .85rem; margin-top: 3px; }
.sizes { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.size {
  border: 1px solid var(--border); background: rgba(10,14,31,0.6);
  color: var(--text); border-radius: var(--r-md); cursor: pointer;
  padding: 10px 14px; font-size: .95rem; font-weight: 700;
}
.size small { display: block; color: var(--faint); font-weight: 600; margin-top: 2px; }
.size.active { background: var(--selected); border-color: var(--border-strong); }
.size.active small { color: var(--dim); }

.orderbar {
  position: sticky; bottom: 14px; margin-top: 20px;
  background: var(--sheet); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 -6px 30px rgba(0,0,0,0.45);
}
.orderbar .sel { color: var(--dim); font-size: .95rem; }
.orderbar .sel b { color: var(--text); }

/* ---- checkout ---- */
.checkout-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
.summary-row { display: flex; justify-content: space-between; color: var(--dim); padding: 7px 0; }
.summary-row.total { color: var(--text); font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }
.summary-thumb { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.summary-thumb img { width: 64px; border-radius: var(--r-sm); aspect-ratio: 2/3; object-fit: cover; }
#payment-element { margin: 18px 0; }
.free-ship { color: var(--success); font-weight: 700; }

/* ---- success ---- */
.success { text-align: center; padding: 70px 20px; }
.success .mark {
  width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%;
  background: rgba(46,223,143,0.15); border: 2px solid var(--success);
  color: var(--success); font-size: 2.1rem; display: flex; align-items: center; justify-content: center;
}
.success h2 { font-size: 1.7rem; margin-bottom: 10px; }
.success p { color: var(--dim); max-width: 520px; margin: 6px auto; line-height: 1.6; }

footer.site { margin-top: 60px; text-align: center; color: var(--faint); font-size: .85rem; }
footer.site a { color: var(--dim); text-decoration: none; margin: 0 10px; }

/* ---- mobile ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 16px; }
  .hero-img { max-width: 340px; }
  .create-grid, .result-grid, .checkout-grid { grid-template-columns: 1fr; }
  .preview-wrap { position: static; max-width: 340px; margin: 0 auto; }
  .orderbar { flex-direction: column; align-items: stretch; text-align: center; }
}
