/* submit.css — submit page styles (tokens + shared in common.css) */

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  min-height: 100vh;
}

.container { max-width: 960px; width: 100%; }

/* --- Step progress indicator --- */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.entered .step-progress { opacity: 1; transform: translateY(0); }

.progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--c-border-m);
  background: var(--c-inset);
  color: var(--c-text-dd);
  font-size: var(--fs-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.progress-dot.active {
  border-color: var(--c-accent);
  background: var(--c-accent-bg);
  color: var(--c-accent);
}

.progress-line {
  width: 40px;
  height: 2px;
  background: var(--c-border-m);
  border-radius: 1px;
}

/* --- Steps --- */
.step { display: none; }
.step.active { display: block; }

/* Step 1 centered */
.step[data-step="1"] {
  max-width: 480px;
  margin: 60px auto 0;
}

/* =============================================
   Entrance transitions — JS adds .entered
   to .container after first paint.
   Elements start invisible, then transition in
   with staggered delays.
   ============================================= */
.landing-brand,
.landing-card,
.closed-msg {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.landing-card { transition-delay: 0.12s; }

.entered .landing-brand,
.entered .landing-card,
.entered .closed-msg {
  opacity: 1;
  transform: translateY(0);
}

/* --- Branding --- */
.landing-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-name {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--c-text);
}

.brand-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-accent);
}

/* --- Landing card --- */
.landing-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.landing-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--c-border);
}

.landing-header h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.landing-header p {
  font-size: var(--fs-sm);
  color: var(--c-text-d);
  line-height: 1.5;
}

/* --- How it works tutorial --- */
.landing-how {
  padding: 24px 32px;
  border-bottom: 1px solid var(--c-border);
}

.how-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.how-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.how-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid var(--c-accent);
}

.how-list li div strong {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 2px;
}

.how-list li div span {
  font-size: var(--fs-xs);
  color: var(--c-text-d);
  line-height: 1.4;
}

.landing-body {
  padding: 24px 32px 32px;
}

.landing-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-d);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-md);
}

/* --- Type selector --- */
.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-bottom: 24px;
}

.type-card {
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: var(--c-inset);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
}

.type-card input[type="radio"] { display: none; }
.type-card:hover { border-color: var(--c-border-m); transform: translateY(-1px); }

.type-card.selected {
  border-color: var(--c-accent);
  background: var(--c-accent-bg);
}

.type-card strong {
  font-size: var(--fs-md);
  margin-bottom: 2px;
}

.type-card span {
  font-size: var(--fs-xs);
  color: var(--c-text-d);
}

/* --- Start button --- */
.start-btn {
  display: block;
  width: 100%;
  padding: 11px;
  font-size: var(--fs-md);
  font-weight: 600;
  background: var(--c-accent);
  border: none;
  border-radius: var(--r-md);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.start-btn:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(201, 119, 255, 0.35); }
.start-btn:active { transform: translateY(0); }

/* --- Step 2 entrance --- */
.step[data-step="2"].active {
  animation: fade-up 0.4s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* --- Validation error flash --- */
.field-error {
  border-color: #ff4466 !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* --- Hints --- */
.hint { font-size: var(--fs-base); color: var(--c-text-d); margin-bottom: var(--sp-lg); }

/* --- Success link --- */
.success-link {
  display: inline-block;
  margin-left: var(--sp-md);
  color: var(--c-ok-t);
  text-decoration: underline;
  font-weight: 500;
}

/* --- Closed --- */
.closed-msg {
  text-align: center;
  padding: 48px 24px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  max-width: 480px;
  margin: 60px auto 0;
}

.closed-msg h2 { font-size: 18px; margin-bottom: 8px; }
.closed-msg p { font-size: var(--fs-sm); color: var(--c-text-d); }

/* --- Responsive --- */
@media (max-width: 500px) {
  .step[data-step="1"] { margin-top: 24px; }
  .landing-brand { margin-bottom: 16px; }
  .landing-header { padding: 24px 20px 20px; }
  .landing-how { padding: 20px; }
  .landing-body { padding: 20px; }
  .type-selector { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .type-selector { grid-template-columns: 1fr; }
  .landing-header h1 { font-size: 18px; }
}
