/*
  asparGo voucher redemption — single-page static styles.
  Colors mirror the app: teal #1B6A5C, gold #DAA520. Manrope for UI,
  JetBrains Mono for the code.
*/

:root {
  --primary: #1B6A5C;
  --primary-dark: #134A40;
  --secondary: #DAA520;
  --accent: #F2C94C;
  --text: #1A1A1A;
  --text-muted: #5B6B68;
  --surface: #FFFFFF;
  --surface-alt: #F7F8F6;
  --border: #E5E7E5;
  --error: #C62828;
  --success: #1F8F4B;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(20, 40, 30, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px 48px;
  max-width: 520px;
  margin: 0 auto;
}

/* --- Brand header --- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 32px;
}
.brand__mark {
  color: var(--secondary);
  font-size: 22px;
  line-height: 1;
}
.brand__name {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.lang-toggle {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.22); }

/* --- Card --- */

.card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px 28px;
}

.state h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.state .lead {
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
  font-size: 14px;
}

/* --- Input --- */

.code-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.code-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
#code-input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 120ms ease;
  background: var(--surface-alt);
  color: var(--text);
}
#code-input:focus {
  border-color: var(--primary);
}

/* --- Buttons --- */

.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  text-decoration: none;
  transition: filter 120ms ease, transform 120ms ease;
  margin-top: 8px;
}
.btn--primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--primary:active { transform: scale(0.98); }
.btn--primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover { color: var(--text); }

/* --- Hint --- */

.hint {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.hint p { margin: 0 0 8px; }
.hint ol { margin: 0; padding-left: 18px; }

/* --- Preview --- */

.preview {
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 20px;
  text-align: center;
}
.preview__code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}
.preview__duration {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.preview__batch {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
.preview__stacking {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.preview__stacking strong {
  color: var(--success);
  font-weight: 700;
}

/* --- Spinner --- */

.spinner {
  width: 36px;
  height: 36px;
  margin: 8px auto 16px;
  border: 3px solid var(--surface-alt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Success / Error indicators --- */

.check, .warn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  font-weight: 700;
  color: #FFFFFF;
}
.check { background: var(--success); }
.warn { background: var(--error); }

/* --- Footer --- */

.foot {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* --- Responsive tweaks --- */

@media (max-width: 360px) {
  .shell { padding: 24px 14px 32px; }
  .card { padding: 24px 18px 22px; }
  #code-input { font-size: 16px; }
}
