/*
 * SMB Partner Forum LATAM 2026 - Totem Design System
 *
 * Colours sampled directly from the event artwork:
 *   - public/SMB_TotemVoler.pdf ......... vertical gradient #FEBF23 -> #45B754
 *   - public/Fundo-vertical/the_*.png ... ink surface #202124 + per-archetype gradients
 *
 * NOTE: index.html loads Tailwind from the CDN, so the @tailwind directives that used to
 * sit at the top of this file were never compiled and did nothing. Everything below is
 * plain CSS on purpose.
 */

:root {
  /* Event gradient */
  --smb-yellow: #FEBF23;
  --smb-green: #45B754;

  /* Ink surface, taken from the archetype card background */
  --smb-ink: #202124;
  --smb-ink-soft: #5F6368;
  --smb-line: #E3E4E6;

  /* Darkened ends so gradient TEXT stays legible on white */
  --smb-yellow-deep: #D99B00;
  --smb-green-deep: #2F9440;

  /* Active archetype accent - overwritten from ARCHETYPES by script.js */
  --accent-from: #5832D5;
  --accent-to: #9B3A8C;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--smb-ink);
  /* The exact totem ramp, sampled every 20% off page 1 of the PDF. */
  background: linear-gradient(
    180deg,
    #FEBF23 0%,
    #DFBE32 20%,
    #BDBD3E 40%,
    #98BB48 60%,
    #6DB950 80%,
    #45B754 100%
  );
  background-attachment: fixed;
  min-height: 100vh;
}

/* ---------------------------------------------------------------- surfaces */

/* The white container from the totem artwork. */
.totem-card {
  background: #FFFFFF;
  border-radius: 44px;
  box-shadow: 0 24px 60px -24px rgba(32, 33, 36, 0.45);
}

/* Signature arch: the dome-topped white shape on the printed totem. */
.totem-card--arch {
  border-radius: 220px 220px 44px 44px;
  padding-top: 4.5rem;
}

@media (max-width: 640px) {
  .totem-card--arch {
    border-radius: 150px 150px 32px 32px;
    padding-top: 3rem;
  }
  .totem-card {
    border-radius: 32px;
  }
}

/* Dark surface that mirrors the persona card being generated. */
.ink-card {
  background: var(--smb-ink);
  color: #FFFFFF;
  border-radius: 44px;
  box-shadow: 0 24px 60px -24px rgba(32, 33, 36, 0.6);
}

/* The pill/stadium motif that repeats across the event artwork. */
.pill {
  border-radius: 999px;
}

/* ------------------------------------------------------------------ typography */

.display-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.gradient-text {
  background: linear-gradient(100deg, var(--smb-yellow-deep), var(--smb-green-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smb-ink-soft);
}

/* ------------------------------------------------------------------- buttons */

.btn {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn:active {
  transform: translateY(1px);
}

/*
 * Event gradient with INK text. White text over the #FEBF23 end lands around 1.9:1,
 * which is unreadable; #202124 clears 4.5:1 across the whole ramp.
 */
.btn-primary {
  background: linear-gradient(90deg, var(--smb-yellow), var(--smb-green));
  color: var(--smb-ink);
  box-shadow: 0 12px 28px -10px rgba(32, 33, 36, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(32, 33, 36, 0.6);
}

.btn-dark {
  background: var(--smb-ink);
  color: #FFFFFF;
  box-shadow: 0 12px 28px -12px rgba(32, 33, 36, 0.7);
}

.btn-dark:hover {
  background: #303134;
  transform: translateY(-2px);
}

.btn-ghost {
  background: #FFFFFF;
  color: var(--smb-ink);
  border: 1.5px solid var(--smb-line);
}

.btn-ghost:hover {
  background: #F7F8F8;
  border-color: #C8CACC;
}

/* Google Red, as used in the Cloud mark - reserved for the shutter. */
.btn-capture {
  background: #EA4335;
  color: #FFFFFF;
  box-shadow: 0 14px 30px -12px rgba(234, 67, 53, 0.75);
}

.btn-capture:hover {
  background: #F0554A;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip-event {
  background: linear-gradient(90deg, rgba(254, 191, 35, 0.18), rgba(69, 183, 84, 0.18));
  color: #6B5200;
  border: 1px solid rgba(254, 191, 35, 0.45);
}

/* Tinted with the archetype's own gradient. */
.chip-accent {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  color: #FFFFFF;
}

.chip-ink {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* ------------------------------------------------------------------ quiz bits */

.progress-track {
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.16);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #FFFFFF;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-btn {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--smb-line);
  background: #FFFFFF;
  color: var(--smb-ink);
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.option-btn:hover {
  border-color: #BDBEC0;
  background: #FAFAFA;
  transform: translateY(-1px);
}

.option-btn.is-selected {
  border-color: var(--smb-ink);
  background: #FFFFFF;
  font-weight: 700;
}

.option-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--smb-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: transparent;
}

.option-btn.is-selected .option-mark {
  background: var(--smb-ink);
  border-color: var(--smb-ink);
  color: #FFFFFF;
}

/* Photo-mode selector reuses the same treatment. */
.mode-option-btn {
  padding: 1.1rem 1.25rem;
  border-radius: 28px;
  border: 2px solid var(--smb-line);
  background: #FFFFFF;
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mode-option-btn.is-selected {
  border-color: var(--smb-ink);
  background: #FAFAFA;
}

.radio-indicator {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 2px solid var(--smb-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: transparent;
}

.mode-option-btn.is-selected .radio-indicator {
  background: var(--smb-ink);
  border-color: var(--smb-ink);
  color: #FFFFFF;
}

/* Dark/light preview swatches on the portrait style question. */
.swatch {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid var(--smb-line);
}

.swatch--dark {
  background: var(--smb-ink);
}

.swatch--light {
  background: #F1F3F4;
}

/* ------------------------------------------------------------- choice cards */

.choice-card {
  padding: 1.75rem;
  border-radius: 32px;
  border: 2px solid var(--smb-line);
  background: #FFFFFF;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.choice-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -22px rgba(32, 33, 36, 0.5);
}

.choice-card--primary {
  border-color: transparent;
  background:
    linear-gradient(#FFFFFF, #FFFFFF) padding-box,
    linear-gradient(120deg, var(--smb-yellow), var(--smb-green)) border-box;
  border: 2px solid transparent;
}

.choice-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #F1F3F4;
}

.choice-icon--primary {
  background: linear-gradient(120deg, var(--smb-yellow), var(--smb-green));
}

.choice-icon--sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1rem;
}

/* Compact secondary action - the print row under the AI upgrade. */
.choice-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--smb-line);
  background: #FFFFFF;
  color: var(--smb-ink);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.choice-compact:hover {
  border-color: var(--smb-ink);
  background: #FAFAFA;
  transform: translateY(-1px);
}

/* Archetype reveal badge on the style step. */
.reveal-badge {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  box-shadow: 0 14px 30px -12px rgba(32, 33, 36, 0.55);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Loading copy swaps between phrases. */
.phrase-in {
  animation: phraseIn 0.45s ease both;
}

@keyframes phraseIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------------ misc */

.media-frame {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 44px -22px rgba(32, 33, 36, 0.55);
  background: var(--smb-ink);
}

.info-panel {
  border-radius: 28px;
  padding: 1.1rem 1.25rem;
  background: #F8F9FA;
  border: 1px solid var(--smb-line);
}

.accent-rule {
  height: 4px;
  width: 56px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
}

.spinner {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--smb-yellow);
  animation: spin 0.9s linear infinite;
}

.spinner--accent {
  border-top-color: var(--smb-green);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.step-section {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(32, 33, 36, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 33, 36, 0.4);
}

/* ------------------------------------------------------------------- print */

#print-area {
  display: none;
}

@media print {
  /* Only the persona card goes on the paper. */
  body > *:not(#print-area) {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
  }

  #print-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
  }

  #print-area img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
  }

  @page {
    size: auto;
    margin: 0;
  }
}

/* Kiosk: no text selection or long-press menus on the touch screen. */
.totem-nosel {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
