@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root{
  --paper:#fcf9f3;
  --card:#ffffff;
  --ink:#2e2a3d;
  --muted:#8a879c;
  --purple:#7e6edf;
  --purple-deep:#6a59d4;
  --purple-soft:#efeaff;
  --lav:#e4dcfb;
  --mint:#dcf5e7;
  --butter:#ffeec2;
  --sky:#dceafb;
  --line:#eceaf4;
  --shadow:0 24px 70px rgba(88,70,160,.12);
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--paper)}
body{
  margin:0;min-height:100vh;color:var(--ink);
  font-family:"Vazirmatn",Tahoma,sans-serif;
  background:
    radial-gradient(ellipse at 88% 8%, #f3edff 0, transparent 34%),
    radial-gradient(ellipse at 4% 78%, #eaf8f0 0, transparent 30%),
    radial-gradient(ellipse at 60% 100%, #fff6df 0, transparent 26%),
    var(--paper);
  overflow-x:hidden;
}
.scene{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:0}
.blob{position:absolute;border-radius:50%;opacity:.55;animation:float 10s ease-in-out infinite}
.blob-1{width:190px;height:190px;right:-70px;top:16%;background:#eadfff}
.blob-2{width:120px;height:120px;left:6%;top:30%;background:#e2f6ea;animation-delay:-3s}
.blob-3{width:70px;height:70px;left:14%;bottom:10%;background:#ffeec9;animation-delay:-5s}
.blob-4{width:48px;height:48px;right:16%;bottom:14%;background:#e0edfb;animation-delay:-7s}

/* ---------- header ---------- */
.topbar{
  position:relative;z-index:2;height:76px;max-width:1160px;margin:auto;
  padding:0 28px;display:flex;align-items:center;justify-content:space-between;
}
.brand{display:flex;align-items:center;gap:11px;color:var(--purple-deep);font-weight:800;font-size:22px;text-decoration:none}
.brand-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:16px;background:var(--purple-soft);color:var(--purple)}
.brand-name small{display:block;font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.2px}
.profile{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;border:1.5px solid var(--line);background:#fff;color:#a49fbe}

/* ---------- hero layout ---------- */
.shell{position:relative;z-index:1;max-width:1160px;margin:auto;padding:20px 28px 54px}
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:44px;align-items:center}
.hero-art{order:2;min-width:0}
.panel{order:1;min-width:0}

.drawing-art{width:100%;max-width:520px;height:auto;display:block;filter:drop-shadow(0 18px 30px rgba(88,70,160,.10))}
.features{display:flex;gap:26px;justify-content:center;margin-top:26px;flex-wrap:wrap}
.feature{display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;max-width:150px}
.feature-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%}
.feature-icon svg{width:24px;height:24px}
.fi-amber{background:var(--butter);color:#a8741a}
.fi-mint{background:var(--mint);color:#2e8b5b}
.fi-lav{background:var(--lav);color:var(--purple-deep)}
.feature span{font-size:12.5px;font-weight:600;color:#6d6a80;line-height:1.9}

/* ---------- workflow card ---------- */
.card{
  width:min(100%,470px);margin-inline:auto;background:var(--card);
  border:1px solid #f1ecff;border-radius:28px;padding:30px 32px 30px;
  box-shadow:var(--shadow);animation:rise .7s cubic-bezier(.2,.7,.3,1) both;
}
.steps{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.steps-label{font-size:12.5px;font-weight:700;color:var(--muted)}
.dots{display:flex;gap:6px;margin-inline-start:auto}
.dot{width:9px;height:9px;border-radius:50%;background:#e6e2f4;transition:.3s}
.dot.done{background:#c9bdf5}
.dot.active{background:var(--purple);box-shadow:0 0 0 4px #7e6edf22;width:22px;border-radius:7px}

.title{font-size:clamp(22px,3.4vw,27px);line-height:1.6;margin:0 0 8px;font-weight:800;letter-spacing:-.3px}
.lead{font-size:14px;line-height:2;color:var(--muted);margin:0 0 20px}
.stack{display:grid;gap:13px}
.label{font-weight:700;font-size:13.5px}

/* upload area (visible on every stage like the mockup, live on stage 3) */
.dropzone{
  position:relative;min-height:150px;border:1.6px dashed #cdc2ef;border-radius:20px;
  background:#fbfaff;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:7px;color:var(--purple);cursor:pointer;transition:.2s;padding:16px;text-align:center;
}
.dropzone:hover,.dropzone:focus-within{background:#f5f2ff;border-color:var(--purple)}
.dropzone input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.dropzone-title{font-weight:700;color:var(--ink);font-size:14px}
.dropzone-hint,.dropzone-file{font-size:11.5px;color:var(--muted)}
.dropzone-file{color:#3f8a63;font-weight:600}
.dropzone.locked{opacity:.62;cursor:not-allowed;background:#faf9fc}
.dropzone.locked:hover{background:#faf9fc;border-color:#cdc2ef}
.dropzone.locked input{pointer-events:none}

/* fields */
.field-wrap{position:relative}
.field-wrap > svg{position:absolute;top:50%;inset-inline-start:15px;transform:translateY(-50%);color:#a89fc9;pointer-events:none}
.field{
  font-family:inherit;width:100%;height:54px;border:1.5px solid var(--line);border-radius:15px;
  padding:0 16px;font-size:16px;color:var(--ink);background:#fdfcff;transition:.2s;
}
.field-wrap .field{padding-inline-start:46px}
.field:focus{outline:0;border-color:var(--purple);box-shadow:0 0 0 4px #7e6edf1f}
.field::placeholder{color:#b7b3c8}
.field-code{letter-spacing:11px;text-align:center;font-size:22px;font-weight:700;padding-inline-start:16px}
.hint{font-size:11.5px;color:var(--muted);margin:0;line-height:1.9}
.demo-code{font-size:12px;background:var(--butter);color:#7d5a12;border-radius:11px;padding:9px 13px;margin:0;text-align:center;font-weight:700}

/* buttons */
.btn{
  font-family:inherit;font-size:14.5px;font-weight:700;border:0;border-radius:15px;
  min-height:52px;padding:12px 20px;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;
}
.btn:focus-visible{outline:3px solid #2b2344;outline-offset:3px}
.btn-primary{color:#fff;background:linear-gradient(115deg,#7563d8,#9a89f2);box-shadow:0 10px 22px #7e6edf3d}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 14px 26px #7e6edf55}
.btn-muted{background:#f1eff7;color:#a5a1b5;cursor:not-allowed}
.btn-ghost{background:#f3f0fa;color:#6557b7}
.btn-ghost:hover{background:#eae5fb}
.btn-pulse{animation:pulse 2.4s ease-in-out infinite}

/* flashes */
.flashes{position:relative;z-index:3;max-width:470px;margin:12px auto 0;padding:0 20px}
.flash{font-size:12.5px;margin:8px 0;padding:11px 15px;border-radius:13px;animation:rise .3s ease both}
.flash-error{background:#fdeeee;color:#a63737}
.flash-success{background:#e9f8f0;color:#27744e}

/* result page */
.mode-badge{display:inline-flex;border-radius:50px;padding:6px 13px;font-size:11.5px;font-weight:700;margin:0 0 15px}
.mode-demo{background:var(--butter);color:#80590a}
.mode-live{background:var(--mint);color:#27744e}
.drawing{display:block;width:100%;max-height:290px;object-fit:contain;border-radius:18px;background:#faf9ff;border:1px solid var(--line);margin:0 0 16px}
.insights{padding:0;margin:0 0 20px;list-style:none;display:grid;gap:9px}
.insight{padding:12px 14px;background:#fbfaff;border-radius:13px;font-size:13px;line-height:1.9;border-inline-start:3px solid #b9adf3;animation:rise .45s both;animation-delay:calc(var(--i)*.12s)}

.footnote{text-align:center;color:#a29fb2;font-size:11px;margin:26px 0 0;line-height:1.9}

@keyframes rise{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-22px)}}
@keyframes pulse{0%,100%{box-shadow:0 10px 22px #7e6edf3d}50%{box-shadow:0 10px 27px #7e6edf66}}

/* ---------- responsive: mockup mobile order (logo, drawing, heading, card) ---------- */
@media (max-width:980px){
  .hero{grid-template-columns:1fr;gap:26px}
  .hero-art{order:0;max-width:440px;margin-inline:auto}
  .panel{order:1}
  .features{gap:18px;margin-top:18px}
}
@media (max-width:560px){
  .topbar{height:64px;padding:0 18px}
  .brand{font-size:19px}
  .brand-mark{width:40px;height:40px}
  .shell{padding:14px 16px 42px}
  .card{padding:24px 20px;border-radius:22px}
  .footnote{max-width:320px;margin-inline:auto}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
}
