/* ==========================================================================
   Brand: change these to match the channel
   ========================================================================== */
:root {
  --brand: #fffc00;
  --brand-2: #ff8a00;
  --brand-gradient: linear-gradient(135deg, var(--brand) 0%, #ffc400 45%, var(--brand-2) 100%);
  --brand-ink: #111111;
  --brand-soft: #fff8c7;
  --brand-soft-2: #ffe3c2;
  --brand-ring: rgba(255, 138, 0, 0.35);

  --ink: #111114;
  --ink-2: #3d3d45;
  --muted: #6e6e78;
  --bg: #fafaf7;
  --surface: #ffffff;
  --border: #e7e7e2;
  --border-strong: #cfcfc8;

  --success: #0e9f6e;
  --success-soft: #e6f6ef;
  --danger: #d92d20;
  --danger-soft: #fef0ef;
  --warning: #b54708;
  --warning-soft: #fff4e0;
  --info: #3a47c2;
  --info-soft: #eef0ff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 20, 0.04), 0 10px 30px rgba(17, 17, 20, 0.06);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(760px 460px at 12% -160px, var(--brand-soft), transparent 70%) no-repeat,
    radial-gradient(760px 460px at 88% -160px, var(--brand-soft-2), transparent 70%) no-repeat,
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 540px;
}

.container.wide {
  max-width: 1200px;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.nowrap {
  white-space: nowrap;
}

/* ==========================================================================
   Impostor warning (shown when the site is opened on a non-official domain)
   ========================================================================== */
.impostor-warning {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: var(--danger);
  color: #fff;
  font-size: 0.95rem;
}

.impostor-warning strong {
  display: block;
  font-size: 1.05rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  padding: 18px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  min-width: 0;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 3px rgba(150, 60, 0, 0.18));
}

.official-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: 36px;
  padding-bottom: 28px;
  text-align: center;
}

.hero-compact {
  padding-bottom: 20px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 800;
}

.hero-compact h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.highlight {
  padding: 0 0.08em;
  background-image: linear-gradient(90deg, var(--brand), var(--brand-2));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 34%;
}

.lead {
  max-width: 34em;
  margin: 16px auto 0;
  color: var(--ink-2);
  font-size: 1.1rem;
}

.hero .btn {
  margin-top: 24px;
}

/* ==========================================================================
   Card
   ========================================================================== */
.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-title {
  margin-bottom: 20px;
  font-size: 1.25rem;
}

@media (max-width: 480px) {
  .card {
    padding: 22px 18px;
    border-radius: 20px;
  }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.92rem;
  font-weight: 600;
}

.input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder {
  color: #a5a5ae;
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.15);
}

.input:disabled {
  background: #f3f3ef;
  cursor: not-allowed;
}

.input-code {
  height: 60px;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.input-group {
  position: relative;
}

.input-prefix {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

.input-group .input {
  padding-left: 33px;
}

textarea.input {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

select.input {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236e6e78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 500;
}

.field-error:empty {
  display: none;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.form-alert {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.form-footnote svg {
  flex-shrink: 0;
  color: var(--success);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background-color 0.15s, box-shadow 0.15s, opacity 0.15s, filter 0.15s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--brand-ring), 0 0 0 1.5px var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  border-color: rgba(0, 0, 0, 0.1);
  background: var(--brand-gradient);
  color: var(--brand-ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover:not(:disabled) {
  background: #2a2a30;
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
}

.btn-block {
  width: 100%;
  height: 54px;
  margin-top: 20px;
  font-size: 1.05rem;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.btn-xs {
  height: 30px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Redeem success
   ========================================================================== */
.success {
  text-align: center;
  animation: pop 0.35s ease-out;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.success h2 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.success h2:focus {
  outline: none;
}

.success p {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.reference-box {
  margin-bottom: 14px;
  padding: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--bg);
}

.reference-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.reference-row code {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   SMS verification step
   ========================================================================== */
.verify {
  text-align: center;
  animation: pop 0.35s ease-out;
}

.verify-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.verify-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.verify h2 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.verify h2:focus {
  outline: none;
}

.verify-text {
  margin: 0 0 22px;
  color: var(--ink-2);
}

.verify-text strong {
  white-space: nowrap;
}

.verify label,
.verify .field-hint {
  text-align: left;
}

.input-otp {
  font-size: 1.7rem;
  letter-spacing: 0.5em;
  padding-left: calc(14px + 0.5em);
}

.verify-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.link-button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

.verify-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.82rem;
  text-align: left;
}

.verify-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--success);
}

.form-alert-info {
  background: var(--success-soft);
  color: var(--success);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-top: 64px;
}

.section-title {
  margin-bottom: 24px;
  font-size: 1.6rem;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: var(--brand-ink);
  font-weight: 800;
}

.steps h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.safety {
  padding: 36px;
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
}

.safety h2 {
  margin-bottom: 6px;
  font-size: 1.6rem;
}

.safety > p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.7);
}

.safety-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safety-list li {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.safety-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: var(--brand-ink);
}

.safety-list strong {
  display: block;
  margin-bottom: 2px;
}

.safety-list p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .steps,
  .safety-list {
    grid-template-columns: 1fr;
  }

  .safety {
    padding: 26px 20px;
    border-radius: 22px;
  }
}

/* ==========================================================================
   Status page
   ========================================================================== */
.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-message {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.details {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg);
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #efefea;
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-fulfilled,
.badge-active {
  background: var(--success-soft);
  color: var(--success);
}

.badge-rejected,
.badge-revoked {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-redeemed {
  background: var(--info-soft);
  color: var(--info);
}

.badge-expired {
  color: var(--muted);
}

/* ==========================================================================
   Rules page
   ========================================================================== */
.prose h2 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose p {
  margin: 0 0 12px;
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.prose li + li {
  margin-top: 6px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 72px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.disclaimer {
  max-width: 62em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 420px) {
  .official-pill {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .verify-spinner {
    animation: none;
  }
}
