/* generator.css — Brand generator form, loading state.
   Shared by generator.ejs and loading.ejs.
   Inherits design tokens from theme.css (loaded first). */

/* ===== PAGE SHELL ===== */
.gen-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.gen-page .hero-gradient {
  position: fixed;
  bottom: -30%;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== HEADER ===== */
.gen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.gen-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  text-decoration: none;
}

.gen-logo:hover {
  color: var(--accent);
}

.gen-header-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.gen-header-action {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.gen-header-action:hover {
  opacity: 0.8;
}

/* ===== MAIN CONTENT ===== */
.gen-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 80px;
  position: relative;
  z-index: 2;
}

/* ===== HERO ===== */
.gen-hero {
  text-align: center;
  margin-bottom: 56px;
}

.gen-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 28px;
}

.gen-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gen-sub {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== ERROR STATE ===== */
.gen-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 32px;
  font-size: 15px;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gen-error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== FORM ===== */
.gen-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gen-fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}

.gen-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.gen-hint {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 4px;
  line-height: 1.5;
}

.gen-input,
.gen-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  resize: vertical;
}

.gen-input:focus,
.gen-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.gen-input::placeholder,
.gen-textarea::placeholder {
  color: var(--fg-dim);
}

.gen-textarea {
  min-height: 110px;
}

/* ===== SUBMIT ===== */
.gen-submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.gen-submit {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0c0a09;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  padding: 15px 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.3);
}

.gen-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.4);
}

.gen-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gen-submit-note {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ===== DEMO LINK ===== */
.gen-demo-link {
  margin-top: 48px;
  text-align: center;
  font-size: 14px;
  color: var(--fg-dim);
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.gen-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.gen-link:hover {
  text-decoration: underline;
}

/* ===== LOADING PAGE ===== */
.loading-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  text-align: center;
  padding-top: 0;
}

.loading-pulse {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  margin: 0 auto 36px;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

.loading-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.loading-sub {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 48px;
  min-height: 24px;
  transition: opacity 0.3s;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
  max-width: 380px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--fg-dim);
  transition: color 0.3s;
}

.loading-step.active {
  color: var(--fg);
}

.loading-step.done {
  color: var(--accent);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s;
}

.loading-step.active .step-dot {
  background: var(--fg-muted);
  animation: step-pulse 1s ease-in-out infinite;
}

.loading-step.done .step-dot {
  background: var(--accent);
  animation: none;
}

@keyframes step-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .gen-header {
    padding: 16px 20px;
  }

  .gen-main {
    padding: 48px 20px 60px;
  }

  .gen-hero {
    margin-bottom: 40px;
  }

  .gen-submit-row {
    align-items: stretch;
  }

  .gen-submit {
    text-align: center;
  }
}
