/* ANIMATIONS */

@keyframes option-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes followup-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SHARED STYLES */

#mesh-gradient {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  z-index: -1;
}

.page {
  font-family: var(--font-body);

  min-height: 100vh;

  background-color: var(--bg-primary);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;

  margin: 0 auto;
  padding: 64px 16px;

  max-width: 500px;
  min-height: 100vh;

  animation: page-enter 600ms cubic-bezier(0.25, 0, 0.2, 1) both;
}

.logo {
  width: 75px;
  height: 24px;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;

  width: 100%;
  flex: 1;
}

.content-top {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -1.2px;
  text-transform: uppercase;
  text-align: center;

  color: var(--fg-primary);

  width: 100%;
}

.description {
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  text-align: center;

  color: var(--fg-primary);
}

.description a {
  color: inherit;
  text-decoration: underline;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;

  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;

  color: var(--fg-primary);
}

.textfield {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;

  padding: 8px 12px;

  width: 100%;

  border: 1px solid var(--border-primary);
  background: transparent;
  color: var(--fg-primary);
}

.textfield:focus {
  outline: none;
}

.textfield:-webkit-autofill,
.textfield:-webkit-autofill:hover,
.textfield:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.textfield.invalid {
  border-color: var(--fg-secondary);
}

.error-message {
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;

  color: var(--fg-secondary);

  display: none;
}

.error-message.show {
  display: block;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
}

.intentions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;

  width: 100%;
}

.intention {
  display: flex;
  gap: 24px;
  align-items: flex-start;

  font-size: 18px;
  line-height: 28px;
}

.intention-number {
  width: 22px;
  flex-shrink: 0;

  text-align: center;

  color: var(--fg-primary);
}

.intention-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intention-title {
  font-weight: 300;

  color: var(--fg-primary);
}

.intention-desc {
  font-weight: 300;

  color: var(--fg-secondary);
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 16px;

  width: 100%;
}

.followup {
  display: none;
  flex-direction: column;
  gap: 48px;

  width: 100%;
}

.followup.show {
  display: flex;

  animation: followup-enter 400ms cubic-bezier(0.25, 0, 0.2, 1) both;
}

.followup-label {
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  text-align: center;

  color: var(--fg-primary);
}

.option-btn {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding: 16px;
  width: 100%;
  text-align: left;

  border: 1px solid var(--fg-primary);
  background: transparent;
  color: var(--fg-primary);

  transition: background 0.2s, color 0.2s;
}

.option-btn .option-check {
  visibility: hidden;

  width: 24px;
  height: 24px;

  flex-shrink: 0;
}

.option-btn.selected {
  background: var(--fg-primary);
  color: var(--fg-on-primary);

  animation: option-pop 250ms ease-out;
}

.option-btn.selected .option-check {
  visibility: visible;
}

.btn-outline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  text-align: center;

  padding: 24px;
  width: 100%;

  border: 1px solid var(--border-primary);
  background: transparent;
  color: var(--fg-primary);

  transition: background 0.2s, transform 0.15s;
}

.btn-outline:hover {
  background: rgba(255, 180, 168, 0.05);
}

.btn-outline:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-outline:disabled {
  color: var(--fg-disabled);

  border-color: var(--fg-disabled);

  cursor: not-allowed;
}

.btn-filled {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  text-align: center;

  padding: 24px;
  width: 100%;

  border: 1px solid var(--fg-primary);
  background: var(--fg-primary);
  color: var(--fg-on-primary);

  transition: opacity 0.2s, transform 0.15s;
}

.btn-filled:hover {
  opacity: 0.9;
}

.btn-filled:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;

  width: 100%;
}

.legal-text {
  font-weight: 300;
  font-size: 14px;
  line-height: 16px;
  text-align: center;

  color: var(--fg-primary);
}

.legal-text a {
  color: inherit;
  text-decoration: underline;
}

/* QUESTIONNAIRE */

@keyframes circle-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.q-page {
  display: flex;
  flex-direction: column;

  position: relative;

  margin: 0 auto;
  padding: 64px 16px 24px;

  max-width: 500px;
  height: 100vh;
  height: 100dvh;
}

@media (max-height: 700px) {
  .q-page {
    padding-top: 32px;
  }
}

.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  height: 48px;
}

.q-prev,
.q-next {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;

  display: flex;
  align-items: center;
  gap: 8px;

  height: 48px;
  padding: 0;

  border: none;
  background: transparent;
  color: var(--fg-primary);

  opacity: 1;
  transition: opacity 0.2s;
}

.q-prev.hidden,
.q-next.hidden {
  opacity: 0;

  pointer-events: none;
}

.q-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  flex: 1;
  min-height: 0;
  overflow-x: visible;
  overflow-y: clip;

  width: 100%;
}

.q-slide {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;

  width: 100%;

  transition: transform 300ms cubic-bezier(0.25, 0, 0.2, 1),
              opacity 300ms cubic-bezier(0.25, 0, 0.2, 1);
}

.q-slide.exit-up {
  transform: translateY(-24px);
  opacity: 0;
}

.q-slide.exit-down {
  transform: translateY(24px);
  opacity: 0;
}

.q-slide.enter-up {
  transform: translateY(24px);
  opacity: 0;
  transition: none;
}

.q-slide.enter-down {
  transform: translateY(-24px);
  opacity: 0;
  transition: none;
}

.q-text {
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  text-align: left;

  color: var(--fg-primary);
}

.q-scale {
  display: flex;
  flex-direction: column;
  gap: 16px;

  width: 100%;
}

.q-label {
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;

  color: var(--fg-secondary);
}

.q-label-left {
  text-align: left;
}

.q-label-right {
  text-align: right;
}

.q-circles {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.q-circle {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;

  border: 1px solid var(--fg-primary);
  border-radius: 50%;
  background: transparent;
  color: var(--fg-primary);

  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.q-circle-lg {
  width: 56px;
  height: 56px;
}

.q-circle-md {
  width: 48px;
  height: 48px;
}

.q-circle-sm {
  width: 40px;
  height: 40px;
}

.q-circle .q-check {
  display: none;

  width: 100%;
  height: 100%;
}

.q-circle.selected {
  background: var(--fg-primary);
  color: var(--fg-on-primary);

  animation: circle-pop 300ms ease-out;
}

.q-circle.selected .q-check {
  display: block;
}

.q-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  width: 100%;

  padding-top: 24px;
}

.q-progress {
  width: 100%;
  height: 6px;

  background: var(--border-surface);
  border-radius: 3px;

  overflow: hidden;
}

.q-progress-fill {
  height: 100%;

  background: var(--fg-primary);
  border-radius: 3px;

  transition: width 300ms cubic-bezier(0.25, 0, 0.2, 1);
}

.q-counter {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.24px;
  text-transform: uppercase;

  color: var(--fg-secondary);
}

/* COUNTDOWN */

.countdown-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.countdown-timer {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -1.92px;
  text-transform: uppercase;
  text-align: center;

  color: var(--fg-primary);
}

.countdown-subtitle {
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;
  text-align: center;

  color: var(--fg-secondary);
}

/* RESULTS */

.match-name {
  font-weight: 500;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  text-align: center;

  color: var(--fg-primary);
}
