/* =========================================
   VARIÁVEIS (Design System)
   ========================================= */

:root {
  /* Cores - Background */
  --bg-primary: #020202;
  --bg-secondary: #111012;
  --bg-tertiary: #24222e;

  /* Cores - Content */
  --content-primary: #ffffff;
  --content-secondary: #c7c9cc;
  --content-tertiary: #d9d9d9;
  --brand-color: #c58de7;

  /* Gradientes */
  --gradient-border: linear-gradient(
    90deg,
    #77c0a4 0%,
    #d1dc97 14.84%,
    #e9a9b3 32.15%,
    #d586e0 65.79%,
    #91a1fa 84.58%
  );
  --gradient-bg: linear-gradient(180deg, #d586e0 0%, #91a1fa 100%);

  /* Tipografia */
  --font-sora: "Sora", sans-serif;
  --font-roboto-mono: "Roboto Mono", monospace;
  --font-roboto-flex: "Roboto Flex", sans-serif;
}

/* =========================================
   RESET E BASE
   ========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  /* DICA: Adicione aqui a sua imagem de background com os grafismos e listras do Figma */
  /* background-image: url('caminho/para/seu/bg.png'); */
  background-size: cover;
  background-position: center;
  color: var(--content-primary);
  font-family: var(--font-roboto-flex);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Utilitário para o JS esconder views */
.hidden {
  display: none !important;
}

/* =========================================
   LAYOUT PRINCIPAL
   ========================================= */

.container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  gap: 80px;
  padding: 40px 20px;
}

.info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.app-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =========================================
   TIPOGRAFIA
   ========================================= */

h1 {
  font-family: var(--font-sora);
  font-size: 72px;
  font-weight: 800; /* ExtraBold */
  line-height: 110%;
  text-transform: uppercase;
  margin-top: 16px;
}

h2 {
  font-family: var(--font-sora);
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.overline {
  font-family: var(--font-roboto-mono);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--content-secondary);
}

p {
  color: var(--content-secondary);
  font-size: 16px;
  line-height: 150%;
}

/* =========================================
   COMPONENTES - LADO ESQUERDO
   ========================================= */

.logo {
  height: 40px;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: auto;
}

.faq-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.faq-item h3 {
  font-family: var(--font-roboto-flex);
  font-size: 16px;
  font-weight: 500;
  color: var(--brand-color);
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 14px;
}

/* =========================================
   COMPONENTES - FORMULÁRIO (DIREITA)
   ========================================= */

.app-header {
  margin-bottom: 40px;
}

.input-group {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.input-field label {
  font-family: var(--font-roboto-flex);
  font-size: 12px;
  font-weight: 500;
  color: var(--content-secondary);
}

.input-field input {
  background-color: var(--bg-tertiary);
  border: none;
  border-radius: 8px;
  color: var(--content-primary);
  font-family: var(--font-roboto-flex);
  font-size: 32px; /* Label large no Figma */
  font-weight: 700;
  text-align: center;
  padding: 16px 8px;
  width: 100%;
  outline: none;
  transition: background 0.3s ease;
}

.input-field input:focus {
  background-color: #312e3d;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--content-primary);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--brand-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  font-family: var(--font-roboto-flex);
  font-size: 16px;
  font-weight: 700;
  color: var(--content-primary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg-tertiary), var(--bg-tertiary)) padding-box,
    var(--gradient-border) border-box;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

/* =========================================
   COMPONENTES - TELA DE RESULTADO
   ========================================= */

#result-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.result-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 48px;
}

.sub-overline {
  font-family: var(--font-roboto-flex);
  font-size: 14px;
  color: var(--content-secondary);
}

.numbers-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
  min-height: 100px;
}

.number-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: var(--brand-color);
  border-radius: 20px;
  color: var(--bg-primary);
  font-family: var(--font-sora);
  font-size: 40px;
  font-weight: 800;
}

.number-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: var(--brand-color);
  border-radius: 0;
  color: transparent;
  font-family: var(--font-sora);
  font-size: 40px;
  font-weight: 800;

  animation: revealNumber 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes revealNumber {
  0% {
    border-radius: 15%;
    transform: rotate(0deg) scale(0.8);
    color: transparent;
  }
  100% {
    border-radius: 50%;
    transform: rotate(360deg) scale(1);
    color: var(--bg-primary);
  }
}

/* =========================================
   RESPONSIVO (MOBILE)
   ========================================= */

@media (max-width: 900px) {
  .container {
    flex-direction: column;
    gap: 60px;
  }

  h1 {
    font-size: 48px;
  }

  .input-group {
    flex-direction: column;
  }

  .app-section {
    margin-top: -20px;
  }
}
